From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) Description of problem: fdisk appears (from a quick strace) to use the HDIO_GETGEO_BIG ioctl to get the geometry of drives. The pd driver does not implement this ioctl but does implement HDIO_GETGEO so fdisk should fall back if the _BIG version fails. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. attach a parallel port hard disk drive 2. modprobe epat (my enclosure uses this chipset) 3. modprobe pd 4. fdisk -l 5. fdisk /dev/pda (same geometry errors as fdisk -l) Actual Results: Disk /dev/pda: 1 heads, 4224528 sectors, 1 cylinders Units = cylinders of 4224528 * 512 bytes Device Boot Start End Blocks Id System /dev/pda1 1 1 2096608+ 6 FAT16 Partition 1 has different physical/logical beginnings (non-Linux?): phys=(0, 1, 1) logical=(0, 0, 64) Partition 1 has different physical/logical endings: phys=(519, 127, 63) logical=(0, 0, 4193280) Partition 1 does not end on cylinder boundary: phys=(519, 127, 63) should be (519, 0, 4224528) Disk /dev/hda: 255 heads, 63 sectors, 2432 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 6 48163+ 83 Linux /dev/hda2 7 1024 8177085 5 Extended /dev/hda5 7 72 530113+ 82 Linux swap /dev/hda6 73 327 2048256 83 Linux Expected Results: Disk /dev/pda: 16 heads, 63 sectors, 4191 cylinders Units = cylinders of 1008 * 512 bytes etc etc Additional info: Note that this drive was actually partitioned with 523/128/63 as its geometry as this is what the DOS device driver uses. As pd.c does not do the same fixups on the partition table that ide.c does fdisk will always get this wrong (unless I can get the pd.c maintainer to add PTBL fixups to pd.c). None the less, fdisk should be fixed so that ioctl failures are detected and worked around (or at least reported to the user).
Looks like this is the same problem as bug 56638 (fdisk problem with cpqarray). cpqarray does not have HDIO_GETGEO_BIG ioctl either. Building a standard fdisk from util-linux-2.11n.tar.gz results in working fdisk as it uses HDIO_GETGEO not HDIO_GETGEO_BIG. *** This bug has been marked as a duplicate of 56638 ***