#!/bin/rc # look for esp and format it when not already done esp=`{ls /dev/$disk/esp >[2]/dev/null} if(~ $#esp 1 && ! ~ `{fstype $esp} dos){ echo echo 'Here appears to be a unformated EFI system partition:' echo ' ' $esp echo prompt 'Initialize FAT on EFI system partition' yes no switch($rd) { case yes # 4k clusters to force FAT32 disk/format -d -c 8 -l ESP $esp } } # look for plan9 partition in the DOS partition table (if any) p9part=`{disk/fdisk /dev/$disk/data >[2]/dev/null [2]/dev/null >/dev/null x=$status if(~ $x '' '|'){ echo echo 'The Plan 9 partition is now marked as active.' exit '' } exit $x } exit ''