2 # set up any disk partitions
4 if (! test -e /dev/sdctl)
7 # set up any /dev/sd partitions.
8 # note that really big disks (e.g., aoe devices) may have no mbr
9 # partition table because the mbr partition table can't cope with large
10 # block numbers, so we may have to examine the data file with prep if
11 # there's no plan9 file. beware that `disk/prep -p data' on a disk with
12 # no plan 9 partition table will delete all extant partitions.
13 for(disk in /dev/sd*) {
14 if(test -f $disk/data && test -f $disk/ctl)
15 { disk/fdisk -p $disk/data |
16 grep -v '^delpart ' >$disk/ctl } >[2]/dev/null
17 if(test -f $disk/plan9)
23 { disk/prep -p $part |
24 grep -v '^delpart ' >$disk/ctl } >[2]/dev/null
27 sysname=`{cat /dev/sysname}
29 # set up any fs(3) partitions
30 if (! test -e /dev/fs/ctl && test -e '#k/fs')
32 if (~ $#sysname 1 && ! ~ $sysname '' &&
33 test -r /cfg/$sysname/fsconfig && test -w /dev/fs/ctl)
34 read -m /cfg/$sysname/fsconfig >/dev/fs/ctl