4 # note that really big disks (e.g., aoe devices) may have no mbr
5 # partition table because the mbr partition table can't cope with large
6 # block numbers, so we may have to examine the data file with prep if
7 # there's no plan9 file. beware that `disk/prep -p data' on a disk with
8 # no plan 9 partition table will delete all extant partitions.
10 if(test -f $1/data && test -f $1/ctl)
11 {@{disk/edisk -p $1/data
12 || disk/fdisk -p $1/data} |
13 grep -v '^delpart ' >$1/ctl } >[2]/dev/null
20 { disk/prep -p $part |
21 grep -v '^delpart ' >$1/ctl } >[2]/dev/null
25 # set up any disk partitions
26 if (! test -e /dev/sdctl)
28 for(disk in /dev/sd*) {
31 sysname=`{cat /dev/sysname}
32 # set up any fs(3) partitions
33 if (! test -e /dev/fs/ctl && test -e '#k/fs')
35 if (~ $#sysname 1 && ! ~ $sysname '' &&
36 test -r /cfg/$sysname/fsconfig && test -w /dev/fs/ctl)
37 awk '{print $0; fflush}' /cfg/$sysname/fsconfig >/dev/fs/ctl