LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-31-2006, 05:03 AM   #1
Bill Jones
LQ Newbie
 
Registered: Jul 2005
Location: Brecon
Posts: 5

Rep: Reputation: 0
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?
 
Old 05-31-2006, 05:43 AM   #2
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,477

Rep: Reputation: 51
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
 
Old 05-31-2006, 07:21 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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?
 
Old 05-31-2006, 04:34 PM   #4
Bill Jones
LQ Newbie
 
Registered: Jul 2005
Location: Brecon
Posts: 5

Original Poster
Rep: Reputation: 0
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
 
Old 05-31-2006, 05:40 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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.
 
Old 06-01-2006, 06:27 AM   #6
Bill Jones
LQ Newbie
 
Registered: Jul 2005
Location: Brecon
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 06-01-2006, 08:58 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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....
 
Old 06-02-2006, 12:00 PM   #8
Bill Jones
LQ Newbie
 
Registered: Jul 2005
Location: Brecon
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 06-02-2006, 02:50 PM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
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.
 
Old 06-02-2006, 03:08 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,963

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
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?
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bad Partition Table halflife28 Linux - Hardware 1 05-28-2006 12:56 AM
trying to fix a bad partition table poiuytrewq Linux - Hardware 1 11-22-2004 12:07 PM
Bad Partition Table? tommcfarlin4 Linux - Software 2 08-21-2004 12:03 PM
Fixing a bad partition table pen^2 Linux - General 2 07-21-2004 07:25 AM
bad partition table thetruevoice Linux - Software 2 08-23-2001 05:34 AM


All times are GMT -5. The time now is 10:52 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration