inst: remove broken winnt boot setup

This commit is contained in:
cinap_lenrek 2012-12-06 06:35:36 +01:00
parent c3105131fe
commit b929f24b92
3 changed files with 22 additions and 92 deletions

View file

@ -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'
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
}
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 ''

View file

@ -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
}
}

View file

@ -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