LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-19-2006, 12:29 PM   #1
Flz
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 10.2
Posts: 38

Rep: Reputation: 15
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?
 
Old 04-19-2006, 01:10 PM   #2
anti.corp
Member
 
Registered: Nov 2005
Location: Copenhagen
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576

Rep: Reputation: 30
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

Last edited by anti.corp; 04-19-2006 at 01:18 PM.
 
Old 04-19-2006, 04:19 PM   #3
Flz
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 10.2
Posts: 38

Original Poster
Rep: Reputation: 15
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?
 
Old 04-23-2006, 11:26 AM   #4
Flz
Member
 
Registered: Dec 2005
Location: UK
Distribution: Slackware 10.2
Posts: 38

Original Poster
Rep: Reputation: 15
I don't really like bumping topics but it's now been four days.

Can anyone help?
 
Old 04-23-2006, 01:52 PM   #5
anti.corp
Member
 
Registered: Nov 2005
Location: Copenhagen
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576

Rep: Reputation: 30
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,
 
Old 04-23-2006, 05:41 PM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
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.
 
Old 04-24-2006, 09:46 AM   #7
anti.corp
Member
 
Registered: Nov 2005
Location: Copenhagen
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576

Rep: Reputation: 30
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".

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,
 
Old 04-24-2006, 09:58 AM   #8
tataiermail
Member
 
Registered: Apr 2006
Location: calcutta, IND
Distribution: RHEL AS 4, openSUSE 10.2
Posts: 48

Rep: Reputation: 15
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 ?
 
Old 04-24-2006, 10:37 AM   #9
anti.corp
Member
 
Registered: Nov 2005
Location: Copenhagen
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576

Rep: Reputation: 30
Quote:
Originally Posted by tataiermail
whats keeping u away from formatting ?
Scroll up and read the toppost

regards,
 
Old 04-24-2006, 02:22 PM   #10
kriton12
Member
 
Registered: Oct 2002
Posts: 81

Rep: Reputation: 16
Quote:
Originally Posted by anti.corp
Scroll up and read the toppost

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.

Last edited by kriton12; 04-24-2006 at 02:30 PM.
 
Old 04-24-2006, 06:06 PM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
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?
 
Old 04-24-2006, 06:22 PM   #12
kriton12
Member
 
Registered: Oct 2002
Posts: 81

Rep: Reputation: 16
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.

Last edited by kriton12; 04-24-2006 at 06:26 PM.
 
Old 04-24-2006, 06:36 PM   #13
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
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.
 
Old 04-25-2006, 08:01 AM   #14
kriton12
Member
 
Registered: Oct 2002
Posts: 81

Rep: Reputation: 16
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write a bash script to replace all "KH" to "K" in file ABC??? cqmyg5 Slackware 4 07-24-2007 09:00 AM
Hard disk/partition woes. "In interrupt handler - not syncing" Nathan-H2-Dog Linux - Laptop and Netbook 3 01-27-2006 04:54 PM
usb drive "protocol device" - why cannot I write to it? lefty.crupps Linux - Hardware 2 04-28-2005 09:32 PM
USB drive keeps mounting as "read only" I need to write to it. Lossenelin Linux - Hardware 1 02-12-2004 06:49 PM
Why I can only write in mounted windows partition in "su" mode Allen T Linux - Software 5 02-18-2003 01:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration