Fdisk seems to be broken with big disks.
If I use disk_get_entry() to get info about a 30GB disk, the info
obtained shows:
./disk /dev/hd0
blk_offset = 0
num_sectors = 58633344
disk_sectors = 58633344
cylinders = 38778
heads = 16
track_sectors = 10
disk_type = 2
disk_drv = 0
reserved = [0 0 0]
driver_name = EIDE Drvr
size = 30020.3MB
Where size is disk_sectors * 512.0 / 1000000
If I use fdisk it reports C/H/S as 38778/16/10 and a size of 3029MB,
a factor of 10 too small. I imagine it got this by doing
C * H * S * 512 / (1024*1024)
(Note that the Linux big disk HOWTO says 1MB should be 10e6 not
1024*1024 which implies that fdisk is wrong here too.)
Am I wrong? I am using QNX 4.25E - is there a more recent version of
fdisk? Can one force fdisk to use LBA instead of CHS?
Where is disk_get_entry() getting its information from, the BIOS or
the disk itself (the latter would seem more reasonable)?
I mention this in relation to on-going problems installing on some big
disks (yes I know about the 1024 cylinder boot problem). How should I
partition and format these disks under QNX if fdisk is broken? Is
there a port of cfdisk anywhere?
Thanks in advance
William Morris
wrm@innovation-tk.com