sd=sdXX dev=/dev/$sd disk=plan9-usb.img #disk=/dev/sdU0.0/data size=131072 iso=/usr/bootes/cd/plan9.iso data=$dev/data plan9=$dev/plan9 9fat=$dev/9fat fossil=$dev/fossil { echo [menu] echo menuitem'='cpu, Plan 9 CPU Kernel echo menuitem'='terminal, Plan 9 Terminal Kernel echo menuitem'='manual, Manual echo menudefault'='terminal, 10 echo echo [cpu] echo bootfile'='sdB0!9fat!9pccpuf echo echo [terminal] echo bootfile'='sdB0!9fat!9pcf echo echo [manual] echo echo [common] echo nobootprompt'='local!$dev/fossil echo echo readparts'=' echo nvram'='/dev/sdXX/nvram echo *nodumpstack'='1 echo *noe820print'='1 echo echo mouseport'='ask echo monitor'='ask echo vgasize'='ask echo user'='glenda # echo console'='0 b115200 } > /tmp/plan9.ini cp /386/9loadusb /tmp/9load dd -if /dev/zero -of $disk -bs 8192 -count $size chmod +t $disk disk/partfs $disk disk/mbr -m /386/mbr $data disk/fdisk -baw $data disk/prep -bw -a^(9fat nvram fscfg fossil) $plan9 disk/format -b /386/pbslba -d -r 2 $9fat /tmp/9load /386/9pcf /386/9pccpuf /tmp/plan9.ini fossil/flfmt -y $fossil { echo fsys main config echo fsys main open -Va -c 32768 echo srv fossil echo srv -APW fossil.open echo srv -Ap fscons.open echo fsys main # echo listen tcp!*!564 } | fossil/conf -w $fossil fossil/fossil -m 20 -f $fossil -c 'srv -p fscons' rm -f /srv/9660 9660srv -f $iso mount /srv/9660 /n/dist mount -c /srv/fossil.open /n/newfs echo fsys main create /active/adm adm sys d775 >>/srv/fscons echo fsys main create /active/adm/users adm sys 664 >>/srv/fscons echo uname upas :upas >>/srv/fscons echo users -w >>/srv/fscons for(i in dist dist/replica dist/replica/client) echo fsys main create /active/$i sys sys d775 >>/srv/fscons echo fsys main create /active/dist/replica/client/plan9.db sys sys 664 >>/srv/fscons echo fsys main create /active/dist/replica/client/plan9.log sys sys a664 >>/srv/fscons replica/pull -v /sys/lib/dist/pc/inst/replcfg unmount /n/newfs echo fsys all sync >>/srv/fscons echo fsys all halt >>/srv/fscons kill fossil | rc pump <$disk >/dev/sdU0.0/data # mount only sd=sdXX dev=/dev/$sd disk=/dev/sdU0.0/data disk/partfs $disk diskparts data=$dev/data plan9=$dev/plan9 9fat=$dev/9fat fossil=$dev/fossil