debian/linux parted error: partition table on /dev/hda is inconsistent...
Hi !
I've seen similar posts, but most of them (if not all of them) associated to "Partition Magic". I'm running under debian/linux sarge (testing version), and when I run parted I get the following message:
Using /dev/hda
Error: The partition table on /dev/hda is inconsistent. There are many reasons why this might be the case. However, the most likely reason is that Linux detected the BIOS geometry for /dev/hda incorrectly. GNU Parted suspects the real geometry should be 4864/255/63 (not 77520/16/63). You should check with your BIOS first, as this may not be correct. You can inform Linux by adding the parameter hda=4864,255,63 to the command line. See the LILO or GRUB documentation for more information. If you think Parted's suggested geometry is correct, you may select Ignore to continue (and fix Linux later). Otherwise, select Cancel (and fix Linux and/or the BIOS now).
Ignore/Cancel?
My boot loader is grub, and I was planning to create a new boot partition so I make the boot partition independent upon the OS, since I'm planning to play around with debian/hurd as well (I already have XP under a small partition just for bios updates). So the idea is to reduce a bit the linux partition to create a boot one, and later on doing more changes...
Just in case, I ran fdisk with the following result:
# fdisk -l
Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 4 32098+ de Dell Utility
/dev/hda2 * 5 641 5116702+ 7 HPFS/NTFS
/dev/hda3 4743 4864 979965 82 Linux swap
/dev/hda4 642 4742 32941282+ 83 Linux
Partition table entries are not in disk order
The parted sarge version is:
# parted --version
GNU Parted 1.6.6
And the fdisk sarge version is:
# fdisk -v
fdisk v2.12
Just for the record, I'm using kernel 2.6.0. Any way to fix this previous to doing something wrong? Any suggestions? Also the grub sarge version is:
Nobody has answered yet (too bad for me), but I came to the conclusion that I should accept parted suggestion instead of linux indication. Some extractions from the parted manual:
1.- Grub automatically uses LBA if it is available.
2.- LBA solves all CHS problems. However there is no reliable way for Linux or Parted to know that you're using LBA, so parted may give you warnings about cylinders not being aligned, or the BIOS geometry being inconsistent, etc. You can ignore this messages if you're using LBA mode.
3.- When your disk is in LBA mode, Parted (and most other programs) will say your CHS geometry is */255/63 - unless you switched from CHS to LBA.
Now parted warning includes:
GNU Parted suspects the real geometry should be 4864/255/63 (not 77520/16/63).
So it might be that it's under LBA mode since the geometry parted detected is */255/63 and I'm using grub as the boot loader, which tries to use LBA mode when available. However I'm not really sure about being under LBA mode, so hdparm cen provide more information:
It says LBA=yes, so I interpret this as I'm running under LBA mode (I still don't know for sure since LBA=yes might mean the BIOS accepts LBA mode, but still not being under it, notice it also provides the linux CSH, which is the one parted detects as wrong). Although I'm still not certain everything points to being under LBA mode, and therefore I just can ignore the geometry inconsitency...
I'll use parted ignoring the warnings believing that's OK, but if any one thinks otherwise, please let me know.
Sorry I didn't answer earlier - I come here once a week, usually on the weekends.
A disk's geometry, more by virtue of history than current construction, is described by the ordered triplet (Cylinders, heads, sectors). Your disk most likely has a geometry of 77,520 cylinders, 16 heads, and 63 sectors per track as seen by the BIOS.
You probably do have LBA turned on. LBA remaps this "physical" geometry to an equivalent logical geometry by increasing the number of heads and decreasing the number of cylinders. It uses the extra heads as a cylinder offset to add to the desired cylinder.
LBA isn't necessary for Linux. It was a kluge as disks grew beyond DOS's 1024 cylinder limit. The capability is still there and is used by older Windows systems that have higher cylinder limits, but still can't handle today's disks. This issue can be confusing because a controller using LBA will report one thing but a direct query of the disk will report another. This is why parted is giving you the message it does. It sounds like Linux is not really using LBA. Linux has no need of LBA because it can handle the larger values directly (and to my knowledge so does XP, but take the XP statement with a grain of salt).
BTW, modern disks no longer use the relatively simple physical geometry of (cylinders, heads, sectors) either. It produces very high areal bit densities near the center of a platter but lesser densities at the outer edge. At the very least, modern disk controllers divide the platter into rings, or zones, and use different sectors per track in different zones to keep areal densities close to the same high figure. This approach maximizes disk capacity. However, operating systems and BIOSes are all built around the old physical geometry where cylinders, heads, and sectors per track were assumed to be constant. The disk controller translates to the BIOS-driven understanding of geometry from the more complex true physical geometry.
As a matter of general principle most Linux gurus recommend not using LBA as it forces two translations - from physical to logical and logical to kludge, and so I do not use it. Next time you set up your disk, turn it off, then make sure you can boot into all your operating systems. Chances are you will be able to. If so, then leave it off.
If you are interested, you can find out more at http://www.pcguide.com/ref/hdd/geom/geom.htm. Check out that page and the hyperlink at the bottom of it to the page labeled "Physical Geometry."
jevv
3 Posts
543
0
Posted April 22nd, 2004 00:00
Javier.