inst: ask to ream filesystem, use 16K blocksize for copydist, fix missed mount in bootsetup

This commit is contained in:
cinap_lenrek 2011-04-28 22:38:29 +00:00
parent d1a1034cbe
commit 24f96acf80
3 changed files with 43 additions and 31 deletions

View file

@ -24,17 +24,16 @@ case go
echo 'mouseport='^$mouseport echo 'mouseport='^$mouseport
echo 'monitor='^$monitor echo 'monitor='^$monitor
echo 'vgasize='^$vgasize echo 'vgasize='^$vgasize
echo '*nomp=1'
} >/tmp/plan9.ini } >/tmp/plan9.ini
} }
if(! test -f /tmp/plan9ini.bak)
cp /tmp/plan9.ini /tmp/plan9ini.bak
need9fatformat=no need9fatformat=no
if(! isfat $fat) if(! isfat $fat)
need9fatformat=yes need9fatformat=yes
if(! test -f /srv/dos) if(! test -f /srv/dos)
dossrv dossrv
if not if(! mount -c /srv/dos /n/9fat /dev/$disk/9fat >[2]/dev/null) if(! mount -c /srv/dos /n/9fat $fat >[2]/dev/null)
need9fatformat=yes need9fatformat=yes
if not if(! test -f /n/9fat/plan9.ini) if not if(! test -f /n/9fat/plan9.ini)
need9fatformat=yes need9fatformat=yes
@ -44,10 +43,7 @@ case go
disk/format -r 2 -d -b /386/pbs $fat /n/newfs/386/9bootfat disk/format -r 2 -d -b /386/pbs $fat /n/newfs/386/9bootfat
mount -c /srv/dos /n/9fat $fat mount -c /srv/dos /n/9fat $fat
} }
logprog cp /tmp/plan9.ini /n/9fat/plan9.ini logprog cp /tmp/plan9.ini /n/9fat/plan9.ini
if(test -f /tmp/plan9ini.bak)
logprog cp /tmp/plan9ini.bak /n/9fat/plan9ini.bak
logprog cp /n/newfs/386/9bootfat /n/9fat/9bootfat logprog cp /n/newfs/386/9bootfat /n/9fat/9bootfat
logprog cp /n/newfs/386/9pcf /n/9fat/9pcf logprog cp /n/newfs/386/9pcf /n/9fat/9pcf

View file

@ -17,7 +17,7 @@ case checkready
} }
case go case go
rm -f /tmp/copydone rm -f /tmp/copydone
disk/mkfs -s /n/dist -d /n/newfs /sys/lib/sysconfig/proto/allproto disk/mkfs -z 16384 -p -s /n/dist -d /n/newfs /sys/lib/sysconfig/proto/allproto
touch /tmp/copydone touch /tmp/copydone
case checkdone case checkdone

View file

@ -44,33 +44,50 @@ case go
fsother=$rd fsother=$rd
export fsother export fsother
if(! test -f /tmp/fsconfig){ ream=no
{ if(! ~ $fstype `{fstype $fs})
echo service cwfs ream=yes
echo config $fs prompt -d $ream 'Ream the filesystem?' yes no
ream=$rd
# new config option
echo noauth
echo filsys main c'('$fs')('$fsworm')'
echo filsys dump o
if(! ~ $fsother ''){
echo filsys other '('$fsother')'
echo ream other
}
echo ream main
echo end
} >/tmp/fsconfig
}
log Starting $fstype file server for $fs log Starting $fstype file server for $fs
unmount /n/newfs >[2]/dev/null unmount /n/newfs >[2]/dev/null
echo halt >>/srv/cwfs.cmd >[2]/dev/null echo halt >>/srv/cwfs.cmd >[2]/dev/null
rm -f /srv/cwfs /srv/cwfs.cmd rm -f /srv/cwfs /srv/cwfs.cmd
if(! $fstype -c -f $fs </tmp/fsconfig){
mountfs=ready if(~ $ream yes){
export mountfs if(! test -f /tmp/fsconfig){
exit oops {
echo service cwfs
echo config $fs
# new config option
echo noauth
echo filsys main c'('$fs')('$fsworm')'
echo filsys dump o
if(! ~ $fsother ''){
echo filsys other '('$fsother')'
echo ream other
}
echo ream main
echo end
} >/tmp/fsconfig
}
echo 'Reaming filesystem'
if(! $fstype -f $fs -c </tmp/fsconfig){
mountfs=ready
export mountfs
exit oops
}
}
if not {
echo 'Entering manual configuration mode. when done, type end'
if(! $fstype -n cwfs -f $fs -c){
mountfs=ready
export mountfs
exit oops
}
} }
log Configuering $fstype file server for $fs log Configuering $fstype file server for $fs
@ -91,9 +108,8 @@ case go
echo create /usr/$user/tmp $user $user 750 d echo create /usr/$user/tmp $user $user 750 d
echo cfs main echo cfs main
} }
# not synchronized
sleep 5
} >>/srv/cwfs.cmd } >>/srv/cwfs.cmd
sleep 5
log Mounting $fstype file server for $fs log Mounting $fstype file server for $fs
if(! logprog mount -c /srv/cwfs /n/newfs){ if(! logprog mount -c /srv/cwfs /n/newfs){