Fw: Drive geometry problem

Tyler Packer tyler.packer at ladnesk.com
Wed Mar 16 09:43:13 PST 2005


Subject: Drive geometry problem


I've used LFS to create a LFS bootable CD.   (with some changes of course..)

I'm using a 2.6.10 kernel on the cdrom and Im testing the cd on an old Dell P3-500 Mhz with an IBM ATA 20GB drive.  Works pretty good with 1 exception:

Disk utils cannot read the drive geometry of IDE hardrive on the booted system.  Here's why...

my 2.6.10 kernel IDE driver detects the HD geometry at boot time as:
44150400 LBA sectors CHS: 43800/16/63   

This is good.

The proc filesystem shows in /proc/ide/ide0/hda/geometry:
physical 16383/16/63
logical 43800/16/63

Although the pysical is the kernel saying.. "uh.. bigger than 8GB..."  The logical is correct...  This is good.

hdparm -g /dev/hda shows:
43800/16/63

This is good.

{s,c,}fdisk -l /dev/hda says:
/dev/hda 82220544 bytes, 82MB,  16 heads, 63 sectors, 159 Cylendars

This is BAD!   It appears that the disk utils are using the (incorrectly reported) physical geometry instead of the logical.   I know I can force the partition data in the kernel params but this is a bootable CD intended to run on not just 1 machine so that isn't a valid option.   I can manually force the partitions in fdisk, but I don't want to have to do that on every machine I use my cd on.   

If I boot a 2.4.x kernel on the same machine (knoppix cd) the /proc/ide/ide0/hda/geometry reports :

physical 43800/16/63   (note: this it the same as "logical" on 'my' boot cd)
logical 2748/255/63

and fdisk, hdparm, parted etc. all work correctly.


Any Ideas what is going on?

Thanks   -Tyler



More information about the lfs-chat mailing list