From 24f96acf8067ef332fde0ef3808c1de14836bffb Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 28 Apr 2011 22:38:29 +0000 Subject: [PATCH] inst: ask to ream filesystem, use 16K blocksize for copydist, fix missed mount in bootsetup --- rc/bin/inst/bootsetup | 8 ++---- rc/bin/inst/copydist | 2 +- rc/bin/inst/mountcwfs | 64 +++++++++++++++++++++++++++---------------- 3 files changed, 43 insertions(+), 31 deletions(-) diff --git a/rc/bin/inst/bootsetup b/rc/bin/inst/bootsetup index 90d3389f1..71175960d 100755 --- a/rc/bin/inst/bootsetup +++ b/rc/bin/inst/bootsetup @@ -24,17 +24,16 @@ case go echo 'mouseport='^$mouseport echo 'monitor='^$monitor echo 'vgasize='^$vgasize + echo '*nomp=1' } >/tmp/plan9.ini } - if(! test -f /tmp/plan9ini.bak) - cp /tmp/plan9.ini /tmp/plan9ini.bak need9fatformat=no if(! isfat $fat) need9fatformat=yes if(! test -f /srv/dos) 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 if not if(! test -f /n/9fat/plan9.ini) need9fatformat=yes @@ -44,10 +43,7 @@ case go disk/format -r 2 -d -b /386/pbs $fat /n/newfs/386/9bootfat mount -c /srv/dos /n/9fat $fat } - 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/9pcf /n/9fat/9pcf diff --git a/rc/bin/inst/copydist b/rc/bin/inst/copydist index 375b6ff84..7c5fe5737 100755 --- a/rc/bin/inst/copydist +++ b/rc/bin/inst/copydist @@ -17,7 +17,7 @@ case checkready } case go 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 case checkdone diff --git a/rc/bin/inst/mountcwfs b/rc/bin/inst/mountcwfs index f19efa57c..afbe014a3 100644 --- a/rc/bin/inst/mountcwfs +++ b/rc/bin/inst/mountcwfs @@ -44,33 +44,50 @@ case go fsother=$rd export fsother - if(! test -f /tmp/fsconfig){ - { - 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 - } + ream=no + if(! ~ $fstype `{fstype $fs}) + ream=yes + prompt -d $ream 'Ream the filesystem?' yes no + ream=$rd log Starting $fstype file server for $fs unmount /n/newfs >[2]/dev/null echo halt >>/srv/cwfs.cmd >[2]/dev/null rm -f /srv/cwfs /srv/cwfs.cmd - if(! $fstype -c -f $fs /tmp/fsconfig + } + echo 'Reaming filesystem' + if(! $fstype -f $fs -c >/srv/cwfs.cmd + sleep 5 log Mounting $fstype file server for $fs if(! logprog mount -c /srv/cwfs /n/newfs){