LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-20-2004, 12:34 PM   #1
pen^2
Member
 
Registered: Mar 2003
Distribution: SuSE 9.0
Posts: 51

Rep: Reputation: 15
Fixing a bad partition table


I had been using SuSE for a while, but recently I made the mistake of installing Fedora Core 2. Like many other people, it arsed up my partitions and I could no longer boot my Windows XP partition. I did manage to work around the problem though by entering the following command as root.

sfdisk -d /dev/hda | sfdisk --no-reread --force -H255 /dev/hda

Windows would now boot, it complained about an invalid boot.ini, but it worked.

Anyway now I am trying to install Slackware 10 and get rid of the Fedora nightmare. But when I start cfdisk I get the following error:

FATAL ERROR: Bad primary partition 2: Partition ends in the final partial cylind

Press any key to exit cfdisk

So it seems Fedora has decided to fuck me over once again. What I would like to know is, do I have any hope of fixing this without having to just wipe my entire hard drive and reformat/partition it? I really don't want to lose my windows data, or waste the time it takes to install it.

Any help would be very greatly appreciated.
 
Old 07-20-2004, 01:03 PM   #2
RobertP
Member
 
Registered: Jan 2004
Location: Manitoba, Canada
Distribution: Debian
Posts: 454

Rep: Reputation: 32
cfdisk is very fussy. Try fdisk, sfdisk or parted.

If you get in, try reading the partition data for that other OS, in cylinders or sectors. Record that. Clear the table. Re-enter the data for that other OS and write the new table. If you want to use cfdisk to write the new table, you can tell it not to read from the disk with
sfdisk -l
cfdisk -z Here, set up the new partition table as you like it.
 
Old 07-21-2004, 06:25 AM   #3
pen^2
Member
 
Registered: Mar 2003
Distribution: SuSE 9.0
Posts: 51

Original Poster
Rep: Reputation: 15
I was a little nervous about trying that, but I went ahead with it anyway and now everything is working perfectly. I am also quite impressed with Slackware at this early stage.

Thank you very much for your help.
 
  


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
fixing a partition table on new hard drive demerson3 Linux - Newbie 18 12-18-2019 05:14 PM
Need help fixing the partition table Hungry ghost Linux - Newbie 2 02-08-2005 01:52 PM
Bad Partition Table? tommcfarlin4 Linux - Software 2 08-21-2004 11:03 AM
Fixing An Incorrect Partition Table? Leben Linux - Hardware 6 01-25-2003 01:43 PM
bad partition table thetruevoice Linux - Software 2 08-23-2001 04:34 AM

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

All times are GMT -5. The time now is 04:54 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