LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   cfdisk cannot partition hard drive because it's "write protected" (http://www.linuxquestions.org/questions/linux-general-1/cfdisk-cannot-partition-hard-drive-because-its-write-protected-436792/)

Flz 04-19-2006 01:29 PM

cfdisk cannot partition hard drive because it's "write protected"
 
Ok I just got a new computer, it's a Dell Dimension 3100. I started using it for a few weeks and setting up everything I needed (on windows) and then realised that I hadn't installed Linux on it.

So then I resized my windows partition from 160GB to 120GB with Partition Magic and then left the remaining space unpartitioned for Linux.

Then when I have everything ready, I insert the boot disc and restart my pc, everything goes fine up until I have to partition my HD (I was installing Slackware by the way). Then I type in cfdisk and it says something like "you do not have permissions to write to this disk" even though this is my PC and I'm the only one who uses it, so I am the admin of it.

So then I loaded up windows again and used partition magic to change the unpartitioned space into a Linux ext2 partition, loaded up the boot disc again, got to the cfdisk part, the exact same thing happens.

But the wierdest thing of all, is that I tryed to use a Debian LiveCD to see if I could install that, but no, it says something like "could not detect partitionable media, please make sure the HD is connected to the computer".

What is going on? How do I fix it? Can anyone help please?

anti.corp 04-19-2006 02:10 PM

Hi,

I had a similar problem when I used PM and CFdisk afterwards. I tryed Linux' other partitioning program 'fdisk' and that solved the problem.
Using fdisk is a little more demanding than cfdisk, but it is worth the effort!

And I really wouldnt recommend that you use PM to resize or do anything with your paritions. It caused me alot of problems that without any doubt is related to PM.

You can get the info you need about fdisk here:
http://www.tldp.org/HOWTO/text/Partition

A possible fix could also be to format your MBR using the good old MS fdisk program. fdisk /mbr then reboot and try to see if it detects the free space.

regards

Flz 04-19-2006 05:19 PM

Ok well, I tryed using fdisk, and every command I gave it was just not allowed, not working. It wouldn't even let me see the partition table with the print "p" command, it just comes up blank, with no partitions at all.

Then I tried your fdisk /mbr to format the MBR, but it wouldn't let me do that either. Is this really all down to PM? That's mad, didn't really know it would do that much damage.

So basically I'm stumped, have no clue what else to do. If worst comes to worst, if I formatted the whole hard drive, would that solve the problem as a last resort?

Flz 04-23-2006 12:26 PM

I don't really like bumping topics but it's now been four days.

Can anyone help?

anti.corp 04-23-2006 02:52 PM

Hi again.

What type of drive is it; IDE or SATA?

Did you try to actually boot your computer from win98floppy or win98CD into dos, and then use the fdisk program?

regards,

saikee 04-23-2006 06:41 PM

OK let stop the rubbish.

You need root privilege to do certain things in Linux. Not too sure how you can get it from Slackware but the standard way is to preceed the "cfdisk" with "sudo". Thus to "cfdisk /dev/hda" you have to type sudo "cfdisk /dev/hda".

Generally you can become the root user by typing at the terminal
Code:

su
An installed Linux will demand the root password but many Linux LiveCd waive such demand.

If you get desperate try using Slax which is a modern version of Slackware but smaller. You can find the root password in its desktop and so you can the full access to everything when log in as root.

Older Debians will have a problem to recognise your Sata sda.

anti.corp 04-24-2006 10:46 AM

Quote:

Originally Posted by saikee
OK let stop the rubbish.

You need root privilege to do certain things in Linux. Not too sure how you can get it from Slackware but the standard way is to preceed the "cfdisk" with "sudo". Thus to "cfdisk /dev/hda" you have to type sudo "cfdisk /dev/hda".


:rolleyes: right!

He didnt even install linux yet, so I assume you referrs to your own 'rubbish', and just forgot to put that sentence at the end of your post.

regards,

tataiermail 04-24-2006 10:58 AM

just format the hdd.
1st> install ur windows edition.on a partition. keep unpartitioned space. for linux
2nd> boot from linux CD , create partitions, it works.

why use PM. back up ur data on a CD. whats keeping u away from formatting ?

anti.corp 04-24-2006 11:37 AM

Quote:

Originally Posted by tataiermail
whats keeping u away from formatting ?

Scroll up and read the toppost :rolleyes:

regards,

kriton12 04-24-2006 03:22 PM

Quote:

Originally Posted by anti.corp
Scroll up and read the toppost :rolleyes:

regards,

Yeah, I agree, you guys need to read what the guy has already written. He's trying to install from a slackware installation CD, he doesn't need to become root or sudo... he already is.

As for your problem. Hmm.. sounds very strange. I would suggest using PM again and try to give the unpartitioned space back to windows and see what happens. After that I would try to use your windows reinstallation disks to put a fresh copy of windows on there and try again from scatch.

In my opinion, Partition Magic is definitely doing something funky to your disk because cfdisk and fdisk should be able to access the space. My only question is, are you sure cfdisk is pointed at your hard disk and not at the cd? I'm assuming it's pointed properly at the hard disk, but one can never be sure.

Oh, and the SATA vs. IDE is a good point, you need to make sure the kernel is able to handle the disk. The only other possibility I can think of is that your CD didn't burn properly, but that should't be it because you said you tried Debian Live cd too. Strange...

Tell you what, give us some info on how you have the devices hooked up. Where is your hard drive located in terms of devices. (i.e. primary hard drive /dev/hda corresponds to master device on first IDE channel, hdc is master (first) device on the second ide channel. It's possible cfdisk is looking at hdc instead of hda or that your cdrom is physically in reverse places of your hard drive etc.) If you can give us the layout it might help us out.

saikee 04-24-2006 07:06 PM

anti.corp,

Many LiveCDs are installable and so one can use cfdisk and fdisk in vain while not logging as root.

The poster did stated

Then I type in cfdisk and it says something like "you do not have permissions to write to this disk"

I have not known any installer that does not give the permission to write a hard disk from the 100+ Linxu I installed in the box. Perhaps you can name one?

kriton12 04-24-2006 07:22 PM

Quote:

Originally Posted by saikee
anti.corp,

Many LiveCDs are installable and so one can use cfdisk and fdisk in vain while not logging as root.

The poster did stated

Ah yes, but they also said they were booting a slackware 10.2 CD, which is not a live CD, but an installation disc. After the kernel on the boot disc loads you have to login as root to gain access to the setup tools. I still think he's calling cfdisk and pointing it to the wrong device.

When you issue the cfdisk command how exactly are you calling it?

cfdisk /dev/hda ? or cfdisk /dev/hdc ? etc.

saikee 04-24-2006 07:36 PM

I have Slackware 10.0 installed in hda27 and Slackware 10.2 installed in hdc35 but can't remember any problem in the installation.

So I pop the first CD of Slackware 10.2 into the drive, selected the keyboard, typed root to log in, tried "fdisk /dev/hda" and then "cfdisk /dev/hda" and both responded successfully as expected.

kriton12 04-25-2006 09:01 AM

Quote:

Originally Posted by saikee
I have Slackware 10.0 installed in hda27 and Slackware 10.2 installed in hdc35 but can't remember any problem in the installation.

So I pop the first CD of Slackware 10.2 into the drive, selected the keyboard, typed root to log in, tried "fdisk /dev/hda" and then "cfdisk /dev/hda" and both responded successfully as expected.

I'm sorry, i didn't mean for you to post your information, but for the original poster with the problem to post his information.


All times are GMT -5. The time now is 11:28 PM.