Dobrica Pavlinušić's random unstructured stuff
GNU fdisk broken: Revision 2
I have been backing up whole disk image from Eee PC, and mounting it using loop file system to access partition in it. However, I have problems with GNU fdisk which reports 4Gb image as: Disk /backup/eee/hda: 3 GB, 3997486080 bytes 255 heads, 63 sectors/track, 486 cylinders, total 7807590 sectors Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System For a start, disk size is wrong: $ ls -al hda -rwxrwxrwx 1 dpavlin root 4001292288 2008-01-20 00:59 hda And then, even more wrong, offsets of partition seem to be wrong. When same image is examined using fdisk from util-linux, sectors are reported like this: Disk hda: 0 MB, 0 bytes 255 heads, 63 sectors/track, 0 cylinders, total 0 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x332b332a
Device Boot Start End Blocks Id System And this is correct (let's ignore size for now). I can verify this by mounting second file system as: sudo mount hda 1 -o loop,offset=`expr 4819500 \* 512` This seems to be off-by-one error. There is bug reported against Debian package which seems related, but than again, in my case I'm examining same disk image. |