Matt, Could we not use fdisk in a non-interactive means? We already should know which harddrive it's on (ie - /dev/hda or /dev/sda) and then run the command 'fdisk -l $rootdev' and examine the results for a partition type '41'... Running fdisk in this fashion is equivilent to hitting 'p' to print the partition table... For instance my Motorola PReP machine would respond with:
marvin:~# fdisk -l /dev/sda Disk /dev/sda: 67 heads, 62 sectors, 1009 cylinders Units = cylinders of 4154 * 512 bytes Device Boot Start End Blocks Id System /dev/sda1 1 923 1917040 83 Linux /dev/sda2 924 925 4154 41 PPC PReP Boot /dev/sda3 926 985 124620 82 Linux swap This could be handled sanely enuf to check for the existence of the PPC PReP Boot partition (/dev/sda2 in example)... Respectfully, Jeremy T. Bouse UnderGrid Network Services, LLC Matt Porter was said to been seen saying: > Yes, this is exactly how I implemented things in boot-floppies for PReP > systems. Fortunately, we have libfdisk there with calls to detect > partition types. Anybody know what is available from user space to > accomplish this? > -- ,-----------------------------------------------------------------------------, | Jeremy T. Bouse - UnderGrid Network Services, LLC - www.UnderGrid.net | | All messages from this address should be atleast PGP/GPG signed | | Public PGP/GPG fingerprint and location in headers of message | | If received unsigned (without requesting as such) DO NOT trust it! | | [EMAIL PROTECTED] - NIC Whois: JB5713 - [EMAIL PROTECTED] | `-----------------------------------------------------------------------------'
pgpWM0jVoaDMh.pgp
Description: PGP signature