diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-12-06 06:35:36 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-12-06 06:35:36 +0100 |
commit | b929f24b929f1c2452d12d9a6987d5485c4a4ed0 (patch) | |
tree | ef90aa9d941adb64e37cdba2107de4530e362a7d | |
parent | c3105131feb2344f64ae5169df3b024ecdbe814c (diff) | |
download | plan9front-b929f24b929f1c2452d12d9a6987d5485c4a4ed0.tar.xz |
inst: remove broken winnt boot setup
-rwxr-xr-x | rc/bin/inst/bootplan9 | 45 | ||||
-rwxr-xr-x | rc/bin/inst/bootsetup | 22 | ||||
-rwxr-xr-x | rc/bin/inst/bootwinnt | 47 |
3 files changed, 22 insertions, 92 deletions
diff --git a/rc/bin/inst/bootplan9 b/rc/bin/inst/bootplan9 index 8e4ca0bc8..3f4820f6b 100755 --- a/rc/bin/inst/bootplan9 +++ b/rc/bin/inst/bootplan9 @@ -7,17 +7,6 @@ if(! ~ $#p9offset 1) { exit bad } -if(test $p9offset -gt 4128695) { # 65536 * 63 - 10 - echo - echo 'Your Plan 9 partition is more than 2GB into your disk,' - echo 'and the master boot records used by Windows 9x/ME' - echo 'cannot access it (and thus cannot boot it).' - echo - echo 'You can install the Plan 9 master boot record, which can load' - echo 'partitions far into the disk.' - echo -} - echo 'If you use the Windows NT/2000/XP master boot record' echo 'or a master boot record from a Unix clone (e.g., LILO or' echo 'FreeBSD bootmgr), it is probably safe to continue using' @@ -31,19 +20,25 @@ case y disk/mbr -m /386/mbr /dev/$disk/data } -log Setting Plan 9 partition active. -p9part=`{disk/fdisk /dev/$disk/data >[2]/dev/null </dev/null | +prompt 'Mark the Plan 9 partition active' y n +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 '' '|'){ - echo - echo 'The Plan 9 partition is now marked as active.' - exit '' + 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 '' '|'){ + echo + echo 'The Plan 9 partition is now marked as active.' + exit '' + } + exit $x } -exit $x +exit '' diff --git a/rc/bin/inst/bootsetup b/rc/bin/inst/bootsetup index c004eb6ba..4b83fd5e0 100755 --- a/rc/bin/inst/bootsetup +++ b/rc/bin/inst/bootsetup @@ -81,27 +81,9 @@ case go logprog cp /n/newfs/386/9pcf /n/9fat/9pcf logprog cp /n/newfs/386/9pccpuf /n/9fat/9pccpuf - echo - echo 'There are myriad ways to boot a Plan 9 system.' - echo 'You can use any of the following.' - echo - echo ' plan9 - make the plan 9 disk partition the default for booting' - echo ' winnt - add a plan 9 option to windows nt/2000/xp boot manager' - echo - echo 'If you are upgrading an extant third edition installation and booting' - echo 'from something other than a floppy, you needn''t run anything here.' - echo 'Just type ctl-d.' - - oldbootsetup=$didbootsetup - didbootsetup=1 - export didbootsetup - - prompt 'Enable boot method' plan9 winnt - disk=`{basename `{basename -d $9fat}} - - if(! boot$rd){ - didbootsetup=$oldbootsetup + if(bootplan9){ + didbootsetup=1 export didbootsetup } } diff --git a/rc/bin/inst/bootwinnt b/rc/bin/inst/bootwinnt deleted file mode 100755 index ee92f5d76..000000000 --- a/rc/bin/inst/bootwinnt +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/rc - -if(! c: || ! test -f /n/c:/boot.ini) { - echo 'Could not find NT''s boot.ini on the first FAT disk.' - exit bad -} - -if(test -f /n/c:/boot.p9) { - echo 'A Plan 9 backup already exists; will not edit boot.ini again.' - exit bad -} - -if(! cp /n/c:/boot.ini /n/c:/boot.p9) { - echo 'Could not back up boot.ini; will not continue.' - exit bad -} - -chmod +w /n/c:/boot.ini - -if(! grep -si '\[operating systems\]' /n/c:/boot.ini) { - echo 'Could not parse boot.ini.' - exit bad -} - -if(grep -si 'Plan 9' /n/c:/boot.ini) { - p9file=`{grep 'Plan 9' /n/c:/boot.ini | sed 1q | sed 's/=.*//'} - if(! ~ $p9file [Cc]:'\'*) { - echo 'Unexpected Plan 9 entry in boot.ini already; not continuing.' - exit bad - } -} - -if not { - p9file='c:\bootsect.p9' - echo 'c:\bootsect.p9 = "Plan 9 from Bell Labs"
' >>/n/c:/boot.ini -} - -p9file=/n/^`{echo $p9file | sed 's!\\!/!g'} - - -if(dd -if /dev/$disk/plan9 -bs 512 -count 1 -of $p9file >/dev/null >[2]/dev/null) { - echo 'Plan 9 added to Windows NT boot menu.' - exit '' -} - -echo 'Error copying Plan 9 boot sector to file.' -exit bad |