LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Bad partition table (https://www.linuxquestions.org/questions/linux-newbie-8/bad-partition-table-450164/)

Bill Jones 05-31-2006 04:03 AM

Bad partition table
 
I was using Ubuntu 5.10 very happily until I added some more memory. I now have two hard drives both of which report bad partition tables. That is, the output from fdisk -l differs from the information in the BIOS.

Can someone please tell me how to repair the partition tables so that I can reformat the drives?

BobNutfield 05-31-2006 04:43 AM

Hi

Welcome to LQ! Your question is a little confusing (for me at least). If you plan on reformatting the drives, why is it necessary to repair the partition tables? Reformatting is going to wipe them out anyway (unless you are talking about reformatting just a single partition). Also, while I cannot offer an expert opinion, I do not understand how adding more ram has corrupted your partition tables.

If you could explain a little further, maybe more specific help could be offered.

Bob

pixellany 05-31-2006 06:21 AM

Post the output of fdisk -l and tell us specifically what the bios is reporting.

What exactly was the sequence of events---ie did you shut down, add RAM, and then reboot and found this problem?

Bill Jones 05-31-2006 03:34 PM

Pixellany,

Here is the output of fdisk -l


Disk /dev/sda: 4095 MB, 4095737856 bytes
126 heads, 62 sectors/track, 1024 cylinders
Units = cylinders of 7812 * 512 = 3999744 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 1024 3999713 c W95 FAT32 (LBA)

Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 9557 76766571 83 Linux
/dev/hda2 9558 9964 3269227+ 5 Extended
/dev/hda5 9558 9964 3269196 82 Linux swap / Solaris

Disk /dev/hdb: 30.7 GB, 30758289408 bytes
255 heads, 63 sectors/track, 3739 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 3739 30033486 c W95 FAT32 (LBA)

This is the information I have gleened from the BIOS.

Primary Master, i.e. hda:
39237 cylinders
16 heads
255 sectors

Primary slave, i.e. hdb:
59598 cylinders
16 heads
63 sectors

pixellany 05-31-2006 04:40 PM

Ignoring sda, the fdisk output looks normal.
The bios data--even though the CHS values are different, still gives the right total capacity. I do not know if the difference between BIOS and fdisk is significant.

Questions still outnumber answers:
1. Why do you believe you have bad partition tables? You said the drives reported bad partition tables--how did that appear? In what context?
2. does the system boot into either Windows or Linux? If not, what happens when you try and boot?
3. What did you do before the problem? (You said install RAM--anything else?)
4. Is sda relevant? What is on each of the 3 drives?

When (if) the fog clears, you may find that re-formatting and re-installing is the easiest way out.

Bill Jones 06-01-2006 05:27 AM

1. When I couldn't boot into Linux (I have no windows partition) I ran some programs from a live CD which reported 'bad partition table'. I compared the fdisk output with the BIOS & assumed that that was the problem. Parted reports that it is 'unable to align partition properly, because it didn't have the correct BIOS geometry.

2. The system won't boot now because I've succeeded in clearing the disks -- so far as I can tell. When I try to install Ubuntu the installation hangs during the format stage, at about 13%.

3. At the same time that I installed the extra RAM I removed a SCSI card which I wasn't using any more.

4. There's nothing on hda apart from a swap partition. Nothing on hdb. And sda is an USB drive which has all my data backed up.

pixellany 06-01-2006 07:58 AM

In such cases, I usually resort to brute-force methods---eg try wiping the drives using a utility such as DBAN (dban.sourceforge.net)

To dig a bit deeper, a disk such as the"Ultimate Boot CD" has various disk testing routines.

Unplug that backup drive before getting out the big power tools....;)

Bill Jones 06-02-2006 11:00 AM

It's always the same story. Everything is running fine & then the computer hangs. I suppose I shall just have to replace the disks. Thank you for youlr help, anyway.

pixellany 06-02-2006 01:50 PM

Quote:

Originally Posted by Bill Jones
It's always the same story. Everything is running fine & then the computer hangs. I suppose I shall just have to replace the disks. Thank you for youlr help, anyway.

Not sure how you came to that conclusion.....However, if the disks are old and have lots of hours on them, then replacing them may be the right answer.

michaelk 06-02-2006 02:08 PM

Hindsight is 20/20 but... A good rule of thumb if something stops working to undo the last change. Did you remove the memory to see if the problem went away? Did you veriy the the new memory was inserted correctly and did you run any checks to see if it was good?


All times are GMT -5. The time now is 08:05 PM.