ref: f09e3684912a86d31ea1687e99f82b4d7de25bb5
parent: dec7039ad95bc2cba6f83b78b35760f2593a8c27
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun May 31 12:41:46 EDT 2015
inst/bootplan9: skip mbr installation and active partition switching when we have no plan9 dos partition on efi systems, there is no plan9 partition in the dos partition table that could be marked active and the mbr should be left alone.
--- a/rc/bin/inst/bootplan9
+++ b/rc/bin/inst/bootplan9
@@ -1,10 +1,10 @@
#!/bin/rc
-p9offset=`{grep '^part 9fat ' /dev/$disk/ctl |awk '{print $3}'}-if(! ~ $#p9offset 1) {- echo 'could not find plan 9 partition.'
- echo 'cannot happen'
- exit bad
+# look for plan9 partition in the DOS partition table (if any)
+p9part=`{disk/fdisk /dev/$disk/data >[2]/dev/null </dev/null | grep PLAN9 | sed 1q | sed 's/ *(p.) .*/\1/'}+if(~ $#p9part 0){+ # nothing can be done
+ exit ''
}
echo
@@ -26,13 +26,6 @@
case n
;
case y
- p9part=`{disk/fdisk /dev/$disk/data >[2]/dev/null </dev/null | - grep PLAN9 | sed 1q | sed 's/ *(p.) .*/\1/'}
- if(~ $#p9part 0){- echo 'You have no Plan 9 partitions (How could this happen?)' >[1=2]
- exit 'no plan 9 partition found'
- }
- p9part=$p9part(1)
{ echo 'A '^$p9part; echo w } | disk/fdisk /dev/$disk/data >[2]/dev/null >/dev/nullx=$status
if(~ $x '' '|'){--
⑨