3 # desc: create a boot floppy or configure hard disk to boot plan 9
4 # prereq: systype copydist
9 case checkdone checkready
10 if(~ $#fats 0 || ~ $#9fat 1 && ~ `{fstype $9fat} dos && ~ $didbootsetup 1)
18 echo 'Setup Plan 9 FAT boot partition (9fat)'
25 prompt $default 'Plan 9 FAT partition' $fats
29 if(! test -f /tmp/plan9.ini) {
35 echo 'bootfile='^$bootfile
36 echo 'bootargs=local!'^$fs
39 echo 'mouseport='^$mouseport
40 echo 'monitor='^$monitor
41 echo 'vgasize='^$vgasize
42 if(test -f '#ec/*nomp')
48 if(! ~ `{fstype $9fat} dos)
50 if(! test -f /srv/dos)
52 if(! mount -c /srv/dos /n/9fat $9fat >[2]/dev/null)
54 if not if(! test -f /n/9fat/plan9.ini)
57 if(~ $need9fatformat yes){
58 log Initializing Plan 9 FAT partition.
59 disk/format -r 2 -d -b /386/pbs $9fat
60 mount -c /srv/dos /n/9fat $9fat
62 logprog rm -f /n/9fat/^(9bootfat plan9.ini 9pcf 9pccpuf)
63 logprog cp /n/newfs/386/9bootfat /n/9fat/9bootfat
64 # make file continous on disk
65 logprog chmod +al /n/9fat/9bootfat
66 logprog cp /tmp/plan9.ini /n/9fat/plan9.ini
67 logprog cp /n/newfs/386/9pcf /n/9fat/9pcf
68 logprog cp /n/newfs/386/9pccpuf /n/9fat/9pccpuf
71 echo 'There are myriad ways to boot a Plan 9 system.'
72 echo 'You can use any of the following.'
74 echo ' plan9 - make the plan 9 disk partition the default for booting'
75 echo ' winnt - add a plan 9 option to windows nt/2000/xp boot manager'
77 echo 'If you are upgrading an extant third edition installation and booting'
78 echo 'from something other than a floppy, you needn''t run anything here.'
79 echo 'Just type ctl-d.'
81 oldbootsetup=$didbootsetup
84 prompt 'Enable boot method' plan9 winnt
87 didbootsetup=$oldbootsetup