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.
This commit is contained in:
parent
8278f6e34c
commit
52c6b751c0
1 changed files with 5 additions and 12 deletions
|
@ -1,10 +1,10 @@
|
||||||
#!/bin/rc
|
#!/bin/rc
|
||||||
|
|
||||||
p9offset=`{grep '^part 9fat ' /dev/$disk/ctl |awk '{print $3}'}
|
# look for plan9 partition in the DOS partition table (if any)
|
||||||
if(! ~ $#p9offset 1) {
|
p9part=`{disk/fdisk /dev/$disk/data >[2]/dev/null </dev/null | grep PLAN9 | sed 1q | sed 's/ *(p.) .*/\1/'}
|
||||||
echo 'could not find plan 9 partition.'
|
if(~ $#p9part 0){
|
||||||
echo 'cannot happen'
|
# nothing can be done
|
||||||
exit bad
|
exit ''
|
||||||
}
|
}
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -26,13 +26,6 @@ switch($rd) {
|
||||||
case n
|
case n
|
||||||
;
|
;
|
||||||
case y
|
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
|
{ echo 'A '^$p9part; echo w } | disk/fdisk /dev/$disk/data >[2]/dev/null >/dev/null
|
||||||
x=$status
|
x=$status
|
||||||
if(~ $x '' '|'){
|
if(~ $x '' '|'){
|
||||||
|
|
Loading…
Reference in a new issue