diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-05-31 16:41:46 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-05-31 16:41:46 +0200 |
commit | 52c6b751c07b8de53479a311bd372eabe763052d (patch) | |
tree | d6f0981927d3685b2c228b21f072f9e1558f83cd | |
parent | 8278f6e34c8d09b85703effb576f7cb14a9d6068 (diff) | |
download | plan9front-52c6b751c07b8de53479a311bd372eabe763052d.tar.xz |
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.
-rwxr-xr-x | rc/bin/inst/bootplan9 | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/rc/bin/inst/bootplan9 b/rc/bin/inst/bootplan9 index 553028bb4..c7eb185b4 100755 --- 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 @@ switch($rd) { 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/null x=$status if(~ $x '' '|'){ |