Bugzilla – Bug 121699
fdisk does not know about the Amiga partition table
Last modified: 2005-11-20 19:24:05 UTC
Pegasos uses the Amiga partition table on HDDs. fdisk does not know anythinga about it: czp:~ # fdisk -l Disk /dev/hda: 40.0 GB, 40020664320 bytes 255 heads, 63 sectors/track, 4865 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/hda doesn't contain a valid partition table fdisk is also used in some boot scripts, so this last line is visible during system start-up. parted has no problem with it at all, so fdisk should probably be replaced by parted: czp:~ # parted /dev/hda print Disk geometry for /dev/hda: 0kB - 40GB Disk label type: amiga Number Start End Size File system Name Flags 1 8225kB 1078MB 1069MB ext2 boot 2 1078MB 2147MB 1069MB linux-swap swap 3 2147MB 12GB 9656MB reiserfs debian 4 12GB 21GB 9656MB ext3 ubuntu 5 21GB 31GB 9656MB ext3 gentoo Information: Don't forget to update /etc/fstab, if necessary. (ps: I did not change the 'Name' field, but two partitions are already running SuSE)
Which bootscripts?
The script is /etc/rc.d/boot.swap So, during boot, there is a message: "Disk /dev/hda doesn't contain a valid partition table"
Rudi, would it be an option to use parted in /etc/init.d/boot.swap?
since parted is in Minimal: yes. anyone has a patch ? the problem is not really parsing the output, but getting the correct device name. "fdisk -l" simply outputs all devices ...
`parted' has NO listing mode for all devices. Therefore you can not search with `parted'.
OK we may use just this get_swap_id() { local maj min blks dev type while read maj min blks dev ; do test "$dev" != name || continue test -n "$dev" || continue test -d /sys/block/$dev || continue while read min type; do case "$type" in *type=82|*type=82,*) echo /dev/${dev}${min} esac done < <(parted -s /dev/$dev print quit) done < /proc/partitions } BUT it is MUCH slower than this old solution!
Now we run parted in the case that fdisk fails.
Where? I still get the fdisk error messages on bootup, and couldn't find parted related lines in /etc/init.d/boot.swap