This patch eliminates kfs from the installation and revitalises the fossil+venti installation method. Venti is not started during the installation because it does not fit onto the floppy, but its partitions are created and the plan9.ini is written for starting venti on the first bootup. Removed files: isext2, iskfs, mountkfs Notes: Mon Mar 28 14:52:12 EST 2005 rsc I'm unhappy about losing support for reading from kfs partitions, but maybe that's not too common a case. (I hadn't realized that that went away before. I thought Tim told me he kept that. But kfs is definitely gone from the proto file.) I'm more unhappy about losing support for reading ext2 partitions. I think a Linux user installing from their Linux partition is probably a much more common case than the kfs one, now. I added fcp to the proto file, per Tim's warning. Instead of putting the venti binaries in the floppy, why not make a separate venti formatting pass that happens after the file system has been initialized? Then we can use the Venti binaries from the new file system and not need floppy space. Also, if we're going to rename /n/kfs, let's call it /n/newfs so that it's clear what it is. There are too many /n paths and I've forgotten which is which. Thanks for the patch. I'm glad to see the install program being updated. If you submit a new patch that addresses the above I'll apply it. Russ Reference: /n/sources/patch/sorry/install-added-venti Date: Sun Mar 27 12:52:40 CES 2005 Reviewed-by: rsc --- /sys/lib/dist/pc/inst/bootfloppy Sun Mar 27 12:35:26 2005 +++ /sys/lib/dist/pc/inst/bootfloppy Sun Mar 27 12:35:23 2005 @@ -33,7 +33,7 @@ log Formatting boot floppy disk/format -b /386/pbs \ - -fd $adisk /n/kfs/386/9load /n/kfs/386/9pcdisk.gz \ + -fd $adisk /n/fossil/386/9load /n/fossil/386/9pcdisk.gz \ /tmp/plan9ini.bak x=$status --- /sys/lib/dist/pc/inst/bootsetup Sun Mar 27 12:35:43 2005 +++ /sys/lib/dist/pc/inst/bootsetup Sun Mar 27 12:35:40 2005 @@ -31,6 +31,10 @@ echo bootfile'='$bootfs!/386/9pcdisk echo 'bootdisk=local!'^$sfs } + if(~ $fstype fossil+venti){ + venti=`{echo $ventiarena(1) | sed 's;/dev;#S;'} + echo venti'='^$venti + } grep -v '(^\[)|menuitem|adisk|bootfile|bootdisk|bootargs|nobootprompt|mouseport|vgasize|monitor|cdboot' /tmp/plan9.orig echo 'mouseport='^$mouseport echo 'monitor='^$monitor @@ -51,7 +55,7 @@ if(~ $need9fatformat yes){ log Initializing Plan 9 FAT partition. disk/format -r 2 -d -b /386/pbs \ - /dev/$disk/9fat /n/kfs/386/9load + /dev/$disk/9fat /n/fossil/386/9load # silently install pbslba if the partition is way into the disk. # it''s our only hope. only need this for >8.5GB into the disk. # but... @@ -73,8 +77,8 @@ } if(! test -f /n/9fat/4e){ - logprog cp /n/kfs/386/9load /n/9fat/9load - logprog cp /n/kfs/386/9pcf /n/9fat/9pcf + logprog cp /n/fossil/386/9load /n/9fat/9load + logprog cp /n/fossil/386/9pcf /n/9fat/9pcf if(test -f /n/9fat/plan9.ini && ! test -f /n/9fat/plan9-3e.ini) logprog mv /n/9fat/plan9.ini /n/9fat/plan9-3e.ini if(test -f /n/9fat/9pcdisk && ! test -f /n/9fat/9pc3e) --- /sys/lib/dist/pc/inst/bootwin9x Sun Mar 27 12:36:05 2005 +++ /sys/lib/dist/pc/inst/bootwin9x Sun Mar 27 12:36:01 2005 @@ -23,7 +23,7 @@ exit bad } -if(! cp /n/kfs/386/^(9load ld.com 9pcdisk) /tmp/plan9ini.bak /n/c:/plan9) { +if(! cp /n/fossil/386/^(9load ld.com 9pcdisk) /tmp/plan9ini.bak /n/c:/plan9) { echo 'Could not copy Plan 9 boot files into /n/c:/plan9.' exit bad } --- /sys/lib/dist/pc/inst/configfs Sun Mar 27 12:36:29 2005 +++ /sys/lib/dist/pc/inst/configfs Sun Mar 27 12:36:25 2005 @@ -4,7 +4,7 @@ switch($1){ case checkdone - if(! ~ $fstype kfs fossil){ + if(! ~ $fstype fossil fossil+venti){ configfs=ready export configfs } @@ -12,13 +12,13 @@ case go echo 'You can install the following types of file systems:' echo - echo ' fossil an archival (dump) file server' - echo ' kfs the old Plan 9 on-disk file server' + echo ' fossil the new Plan9 fileserver' + echo ' fossil+venti fossil + a archival dump server' echo - echo 'If you choose to install fossil, you can add Venti later,' - echo 'assuming you leave enough disk space for it.' - echo - prompt -d fossil 'File system' fossil kfs + echo '(fossil+venti only reserves and formats the partitions' + echo ' venti will need, but it will be started on the first' + echo ' boot.)' + prompt -d fossil 'File system' fossil fossil+venti fstype=$rd export fstype } --- /sys/lib/dist/pc/inst/copydist Sun Mar 27 12:36:57 2005 +++ /sys/lib/dist/pc/inst/copydist Sun Mar 27 12:36:53 2005 @@ -10,7 +10,7 @@ export copydist exit } - if(test -f /n/kfs/dist/replica/didplan9){ + if(test -f /n/fossil/dist/replica/didplan9){ copydist=done export copydist exit @@ -18,13 +18,13 @@ case go inst/watchfd applylog 0 `{ls -l /n/dist/dist/replica/plan9.log | awk '{print $6}'} 'Installing file system' & replica/pull -c /rc/bin/inst/replcfg - if(~ $status '' *conflicts || test -f /n/kfs/dist/replica/didplan9witherrors) - >/n/kfs/dist/replica/didplan9 + if(~ $status '' *conflicts || test -f /n/fossil/dist/replica/didplan9witherrors) + >/n/fossil/dist/replica/didplan9 if not - >/n/kfs/dist/replica/didplan9witherrors + >/n/fossil/dist/replica/didplan9witherrors case checkdone - if(! test -f /n/kfs/dist/replica/didplan9){ + if(! test -f /n/fossil/dist/replica/didplan9){ copydist=notdone export copydist } --- /sys/lib/dist/pc/inst/defs Sun Mar 27 12:37:29 2005 +++ /sys/lib/dist/pc/inst/defs Sun Mar 27 12:37:25 2005 @@ -159,21 +159,4 @@ grep -s $1 /net/ipifc/*/status >[2]/dev/null } -fn kfsname { - echo $1 | sed 's;/;_;g' -} - -# make sure the kfs server for /dev/$1/fs is running. -# we use /srv/kfs.$1 -# - -fn runkfs { - if(! test -f /srv/kfs.$1 || ! mount /srv/kfs.$1 /n/kremvax) { - rm -f /srv/kfs.$1 /srv/kfs.$1.cmd - disk/kfs -n$1 -f /dev/$1/fs - } - disk/kfscmd -n$1 allow -} - -fstype=fossil --- /sys/lib/dist/pc/inst/download Sun Mar 27 12:38:04 2005 +++ /sys/lib/dist/pc/inst/download Sun Mar 27 12:38:01 2005 @@ -30,24 +30,22 @@ # BUG make restartable echo 'Downloading distribution package...' - if(! hget -vo /n/kfs/dist/_plan9.iso.bz2 $installurl/plan9.iso.bz2 |[2] bargraph -w 145,129,445,168 'downloading '^plan9.iso.bz2) + if(! hget -vo /n/fossil/dist/_plan9.iso.bz2 $installurl/plan9.iso.bz2 |[2] bargraph -w 145,129,445,168 'downloading '^plan9.iso.bz2) exit - mv /n/kfs/dist/_plan9.iso.bz2 /n/kfs/dist/plan9.iso.bz2 + mv /n/fossil/dist/_plan9.iso.bz2 /n/fossil/dist/plan9.iso.bz2 if(~ $fstype fossil){ echo fsys main sync >>/srv/fscons } - kname=`{kfsname $fs} - disk/kfscmd -n$kname sync echo 'The distribution is downloaded.' - srvmedia=(disk/kfs -f $fs -n $kname) - mountmedia=(mount /srv/kfs.$kname /n/distmedia) + srvmedia=() + mountmedia=(mount /srv/fossil /n/distmedia) distmediadir=/dist - export srvmedia mountmedia distmediadir + export distmediadir mountmedia distmedia case checkdone - if(! test -f /n/kfs/dist/plan9.iso.bz2) { + if(! test -f /n/fossil/dist/plan9.iso.bz2) { download=notdone export download } --- /sys/lib/dist/pc/inst/fmtfossil Sun Mar 27 12:38:43 2005 +++ /sys/lib/dist/pc/inst/fmtfossil Sun Mar 27 12:38:40 2005 @@ -1,7 +1,7 @@ #!/bin/rc # desc: initialize disks for a fossil server -# prereq: +# prereq: configfs switch($1){ case checkready checkdone @@ -72,18 +72,18 @@ # that retire after three days, in addition to the daily dumps at 5am if(~ $fstype fossil+venti){ v='' - snap='-s 60 -a 0500 -t 2880' + snap='fsys main snaptime -s 60 -a 0500 -t 2880' } # otherwise, take the daily dumps but nothing else -- # we can't retire snapshots unless dumps are being archived if not{ v='-V' - snap='-a 0500' + snap='' } echo \ 'fsys main config '^$f^' fsys main open '^$v^' -c '^$m^' -# fsys main snaptime '^$snap^' +'^$snap^' ' | fossil/conf -w $f } --- /sys/lib/dist/pc/inst/fmtventi Sun Mar 27 12:39:26 2005 +++ /sys/lib/dist/pc/inst/fmtventi Sun Mar 27 12:39:23 2005 @@ -1,7 +1,7 @@ #!/bin/rc # desc: initialize disks for a venti server -# prereq: choosefs +# prereq: configfs switch($1){ case checkready checkdone @@ -10,13 +10,18 @@ export fmtventi exit } - ff=`{ls /dev/sd*/v.arenas* /dev/fs/v.arenas* >[2]/dev/null} + ff=`{ls /dev/sd*/arenas* /dev/fs/arenas* >[2]/dev/null} + if(~ $#ff 0){ + fmtventi=notdone + export fmtventi + exit + } gg=() for(f in $ff) if(isventi $f) gg=($gg $f) if(~ $#gg 0){ - fmtventi=notdone + fmtventi=ready export fmtventi exit } @@ -25,10 +30,10 @@ exit case go - ff=`{ls /dev/sd*/v.arenas* /dev/fs/v.arenas* >[2]/dev/null} + ff=`{ls /dev/sd*/arenas* /dev/fs/arenas* >[2]/dev/null} if(~ $#ff 0){ echo 'You need to create a partition or partitions to hold the Venti arenas.' - echo 'The arena partition names must begin with "v.arenas".' + echo 'The arena partition names must begin with "arenas".' echo fmtventi=notdone export fmtventi @@ -56,10 +61,10 @@ ventiarena=$aa export ventiarena - gg=`{ls /dev/sd*/v.index* /dev/fs/v.index* >[2]/dev/null} + gg=`{ls /dev/sd*/isect* /dev/fs/isect* >[2]/dev/null} if(~ $#gg 0){ echo 'You need to create a partition or partitions to hold the Venti indices.' - echo 'The index partition names must begin with "v.index".' + echo 'The index partition names must begin with "isect".' echo fmtventi=notdone export fmtventi @@ -123,7 +128,7 @@ for(a in $fmta $fmti){ d=`{echo $a | sed 's!.*:(/.*/).*!\1!'} if(! ~ $d $dd) - $dd=($dd $d) + dd=($dd $d) } for(d in $dd){ { @@ -139,7 +144,7 @@ i=`{echo $a | sed 's!(.*):(/.*/)(.*)!\1 \2 \2\3!'} if(~ $i(2) $d){ echo $i(3) ... - venti/isect $i(1) $i(3) || echo bad >/tmp/fmt + venti/fmtisect $i(1) $i(3) || echo bad >/tmp/fmt echo done with $i(3) } } @@ -162,11 +167,11 @@ for(i in $ventiindex) echo isect $i for(a in $ventiarena) - echo arenas $i + echo arenas $a } | venti/conf -w $v echo Initializing index... - venti/fmtindex -c $v + venti/fmtindex $v echo Done with Venti! } --- /sys/lib/dist/pc/inst/halt Sun Mar 27 12:40:13 2005 +++ /sys/lib/dist/pc/inst/halt Sun Mar 27 12:40:09 2005 @@ -1,15 +1,6 @@ #!/bin/rc echo -n 'Halting file systems...' -for (i in /srv/kfs*) { - if(! ~ $i /srv/kfs*cmd) { - n=`{echo $i | sed 's!/srv/kfs\.(.*)!\1!'} - if(~ $n /srv/kfs) - disk/kfscmd halt - if not - disk/kfscmd -n$n halt - } -} if(ps | grep -s ' venti$') venti/sync -h tcp!127.0.0.1!17034 if(ps | grep -s ' fossil$'){ --- /sys/lib/dist/pc/inst/isventi Sun Mar 27 12:41:02 2005 +++ /sys/lib/dist/pc/inst/isventi Sun Mar 27 12:40:59 2005 @@ -1,12 +1,12 @@ #!/bin/rc if(! ~ $#* 1){ - echo 'usage: isfossil /dev/sdC0/part' >[1=2] + echo 'usage: isventi /dev/sdC0/part' >[1=2] exit usage } arg=$1 -if(! cmp -s <{dd -quiet 1 -if $arg -bs 1024 -iseek 127 | +if(! cmp -s <{dd -quiet 1 -if $arg -bs 1024 -iseek 248 | dd -quiet 1 -bs 13 -count 1} <{echo 'venti config'}) exit noconfig exit 0 --- /sys/lib/dist/pc/inst/isventiarenas Sun Mar 27 12:41:56 2005 +++ /sys/lib/dist/pc/inst/isventiarenas Sun Mar 27 12:41:53 2005 @@ -6,7 +6,7 @@ } arg=$1 -if(! cmp -s <{dd -quiet 1 -if $arg -bs 1024 -iseek 128 | +if(! cmp -s <{dd -quiet 1 -if $arg -bs 1024 -iseek 256 | dd -quiet 1 -bs 4 -count 1 | xd -b | sed 1q} <{echo '0000000 a9 e4 a5 e7'}) exit notarenas exit 0 --- /sys/lib/dist/pc/inst/isventiisect Sun Mar 27 12:42:54 2005 +++ /sys/lib/dist/pc/inst/isventiisect Sun Mar 27 12:42:50 2005 @@ -6,7 +6,7 @@ } arg=$1 -if(! cmp -s <{dd -quiet 1 -if $arg -bs 1024 -iseek 128 | +if(! cmp -s <{dd -quiet 1 -if $arg -bs 1024 -iseek 256 | dd -quiet 1 -bs 4 -count 1 | xd -b | sed 1q} <{echo '0000000 d1 5c 5e c7'}) exit notisect exit 0 --- /sys/lib/dist/pc/inst/main Sun Mar 27 12:43:55 2005 +++ /sys/lib/dist/pc/inst/main Sun Mar 27 12:43:51 2005 @@ -12,6 +12,7 @@ # must be topologically sorted (by prereq) tasks=(\ + configfs\ partdisk prepdisk\ fmtventi\ fmtfossil\ --- /sys/lib/dist/pc/inst/mountdist Sun Mar 27 12:45:00 2005 +++ /sys/lib/dist/pc/inst/mountdist Sun Mar 27 12:44:56 2005 @@ -36,11 +36,11 @@ fn trycdimagebz2 { if(test -f $1){ - echo -n 'bunzip2 < '^$1^' >/n/kfs/dist/plan9.iso' - bunzip2 < $1 >/n/kfs/dist/_plan9.iso && - mv /n/kfs/dist/_plan9.iso /n/kfs/dist/plan9.iso + echo -n 'bunzip2 < '^$1^' >/n/fossil/dist/plan9.iso' + bunzip2 < $1 >/n/fossil/dist/_plan9.iso && + mv /n/fossil/dist/_plan9.iso /n/fossil/dist/plan9.iso echo - trycdimage /n/kfs/dist/plan9.iso + trycdimage /n/fossil/dist/plan9.iso mountdist=notdone export mountdist exit notdone @@ -73,10 +73,9 @@ } case go - kfs=() - ext2=() fat=() x9660=() + fossil=() echo Please wait... Scanning storage devices... @@ -86,14 +85,12 @@ n=`{echo $i | sed 's;/;_;g'} if(! test -f /tmp/localpart.$n) dd -if $i -bs 2048 -count 32 -of /tmp/localpart.$n >[2]/dev/null - if(iskfs /tmp/localpart.$n) - kfs=($kfs $i) if(isfat /tmp/localpart.$n) fat=($fat $i) - # if(isext2 /tmp/localpart.$n) - # ext2=($ext2 $i) if(is9660 /tmp/localpart.$n) x9660=($x9660 $i) + if(isfossil /tmp/localpart.$n) + fossil=($fossil $i) echo } echo @@ -102,41 +99,39 @@ echo for(i in $parts){ switch($i){ - case $kfs - echo ' '^$i^' (plan9 kfs)' - # case $ext2 - # echo ' '^$i^' (linux ext2)' case $fat echo ' '^$i^' (microsoft fat)' case $x9660 echo ' '^$i^' (iso9660 cdrom)' + case $fossil + echo ' '^$i^' (plan9 fossil)' } } echo mountstatus=x while(! ~ $mountstatus ''){ - prompt -w '' 'Distribution disk' $kfs $fat $x9660 #$ext2 + prompt -w '' 'Distribution disk' $fat $x9660 $fossil disk=$rd srvmedia=() mountmedia=() switch($disk){ case $fs - mountmedia=(bind /n/kfs /n/distmedia) - case $kfs - kname=`{kfsname $disk} - srvmedia=(disk/kfs -f $disk -n $kname) - mountmedia=(mount /srv/kfs.$kname /n/distmedia) - # case $ext2 - # srvmedia=(ext2srv -r) - # mountmedia=(mount /srv/ext2 /n/distmedia $disk) + mountmedia=(bind /n/fossil /n/distmedia) case $fat srvmedia=(dossrv) mountmedia=(mount /srv/dos /n/distmedia $disk) case $x9660 srvmedia=(9660srv) mountmedia=(mount /srv/9660 /n/distmedia $disk) + case $fossil + echo 'srv fossil' > /tmp/fossi.conf + echo 'fsys main config '^$disk >> /tmp/fossil.conf + echo 'fsys main open -AWP' >> /tmp/fossil.conf + echo 'fsys main' >> /tmp/fossil.conf + srvmedia=(fossil/fossil -c '. /tmp/fossil.conf') + mountmedia=(mount /srv/fossil /n/distmedia) case * echo Unknown disk type '(cannot happen)' exit oops @@ -194,7 +189,7 @@ export mountdist exit notdone } - if(! havedist /n/distmedia/$distmediadir && ! havedist /n/kfs/dist){ + if(! havedist /n/distmedia/$distmediadir && ! havedist /n/fossil/dist){ mountdist=notdone export mountdist exit notdone @@ -211,10 +206,10 @@ } trycdimage /n/distmedia/$distmediadir/plan9.iso - trycdimage /n/kfs/dist/plan9.iso + trycdimage /n/fossil/dist/plan9.iso trycdimagebz2 /n/distmedia/$distmediadir/plan9.iso.bz2 - trycdimagebz2 /n/kfs/dist/plan9.iso.bz2 + trycdimagebz2 /n/fossil/dist/plan9.iso.bz2 mountdist=notdone export mountdist --- /sys/lib/dist/pc/inst/mountfossil Sun Mar 27 12:46:09 2005 +++ /sys/lib/dist/pc/inst/mountfossil Sun Mar 27 12:46:05 2005 @@ -28,20 +28,11 @@ export mountfs exit } - if(~ $fstype fossil+venti && ! ps | grep -s ' venti$'){ - if(! logprog venti/venti -a tcp!127.1!17034 -c $venti >>[2]/srv/log){ - echo 'venti: '^$status - mountfs=ready - export mountfs - exit oops - } - if(ps |grep -s ' fossil$'){ - # reconnect to venti - echo fsys main venti 127.0.0.1 >>/srv/fscons - } - } if(! ps | grep -s ' fossil$'){ - {echo 'srv -p fscons'; echo 'srv -AP fossil'; fossil/conf $fossil | sed 's/^fsys main open .*/& -AWP/'}>/env/fossilconf + echo 'srv -p fscons' > /env/fossilconf + echo 'srv -AP fossil' >> /env/fossilconf + fossil/conf $fossil | sed 's/^fsys main open .*/& -AWP/' | + sed 's/^fsys main snaptime .*//' >> /env/fossilconf if(! logprog fossil/fossil -c .' /env/fossilconf'>>[2]/srv/log){ echo 'fossil: '^$status mountfs=ready @@ -92,8 +83,6 @@ echo fsys main create /active/dist/replica/client/plan9.log sys sys a664 >>/srv/fscons } if(test -d /n/fossil/dist/replica/client && test -f /n/fossil/adm/users){ - # the rest of the install assumes /n/kfs - bind -c /n/fossil /n/kfs mountfs=done export mountfs exit @@ -108,7 +97,7 @@ echo echo 'Please choose one to use as the Venti server.' echo - files=(`{ls /dev/sd*/v.arenas* /dev/fs/v.arenas* >[2]/dev/null}) + files=(`{ls /dev/sd*/arenas* /dev/fs/arenas* >[2]/dev/null}) ls -l $files echo if(~ $#venti 1 && ~ $venti $files) --- /sys/lib/dist/pc/inst/mountfs Sun Mar 27 12:47:21 2005 +++ /sys/lib/dist/pc/inst/mountfs Sun Mar 27 12:47:17 2005 @@ -1,7 +1,7 @@ #!/bin/rc # desc: choose and mount file system partition -# prereq: +# prereq: configfs switch($fstype){ case fossil fossil+venti --- /sys/lib/dist/pc/inst/replcfg Sun Mar 27 12:48:36 2005 +++ /sys/lib/dist/pc/inst/replcfg Sun Mar 27 12:48:33 2005 @@ -8,8 +8,8 @@ fn serverupdate { status='' } fn clientmount { status='' } -c=/n/kfs/dist/replica -clientroot=/n/kfs +c=/n/fossil/dist/replica +clientroot=/n/fossil clientproto=$c/plan9.proto clientdb=$c/client/plan9.db clientexclude=(dist/replica/client) --- /sys/lib/dist/pc/plan9.ini Sun Mar 27 12:49:55 2005 +++ /sys/lib/dist/pc/plan9.ini Sun Mar 27 12:49:52 2005 @@ -1,10 +1,14 @@ -THIS IS A 512 byte BLANK PLAN9.INI - - - - - - - - - +*nomp=1 +distname=plan9 +nobootprompt=local!/boot/bzroot + +#console=0 +#*nousbprobe=1 +#*noetherprobe=1 +#debug=yes + +monitor=ask +vgasize=ask +mouseport=ask +bootfile=fd0!dos!9pcflop.gz +installurl=http://www.tip9ug.jp/mirror --- /sys/lib/dist/pc/proto Sun Mar 27 12:51:18 2005 +++ /sys/lib/dist/pc/proto Sun Mar 27 12:51:14 2005 @@ -46,11 +46,11 @@ compactdb 555 sys sys /sys/lib/dist/pc/sub/compactdb pull 555 sys sys venti d555 sys sys -#VENTI venti 555 sys sys -#VENTI conf 555 sys sys -#VENTI fmtarenas 555 sys sys -#VENTI fmtindex 555 sys sys -#VENTI fmtisect 555 sys sys +# venti 555 sys sys + conf 555 sys sys + fmtarenas 555 sys sys + fmtindex 555 sys sys + fmtisect 555 sys sys 9660srv 555 sys sys # acme could go # acme 555 sys sys @@ -73,7 +73,8 @@ ed 555 sys sys # if cpu goes, exportfs could go # exportfs 555 sys sys - ext2srv 555 sys sys +# ext2srv 555 sys sys + fcp 555 sys sys grep 555 sys sys hget 555 sys sys hoc 555 sys sys