]> git.lizzy.rs Git - plan9front.git/commitdiff
inst: remove broken winnt boot setup
authorcinap_lenrek <cinap_lenrek@gmx.de>
Thu, 6 Dec 2012 05:35:36 +0000 (06:35 +0100)
committercinap_lenrek <cinap_lenrek@gmx.de>
Thu, 6 Dec 2012 05:35:36 +0000 (06:35 +0100)
rc/bin/inst/bootplan9
rc/bin/inst/bootsetup
rc/bin/inst/bootwinnt [deleted file]

index 8e4ca0bc8f34e1e4d52c21aa0c2006a4625e4395..3f4820f6b02fd861e3bda77535b67cc3ca5daeff 100755 (executable)
@@ -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 ''
index c004eb6baf3b40cbac021c0f48fa1552327d0f17..4b83fd5e055b7d92b3efde2ef6aebb6ac9a649c9 100755 (executable)
@@ -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 (executable)
index ee92f5d..0000000
+++ /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"\r' >>/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