|
@@ -4,11 +4,19 @@ rfork e
|
|
|
if (! test -e /dev/sdctl)
|
|
|
bind -a '#S' /dev
|
|
|
|
|
|
-# set up any /dev/sd partitions
|
|
|
+# set up any /dev/sd partitions.
|
|
|
+# note that really big disks (e.g., aoe devices) may have no mbr
|
|
|
+# partition table because the mbr partition table can't cope with large
|
|
|
+# block numbers, so we may have to examine the data file with prep if
|
|
|
+# there's no plan9 file.
|
|
|
for(disk in /dev/sd[0-9A-Zabd-z]*) {
|
|
|
if(test -f $disk/data && test -f $disk/ctl)
|
|
|
disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null
|
|
|
- for(part in $disk/plan9*)
|
|
|
+ if(test -f $disk/plan9)
|
|
|
+ parts=($disk/plan9*)
|
|
|
+ if not
|
|
|
+ parts=($disk/data)
|
|
|
+ for(part in $parts)
|
|
|
if(test -f $part)
|
|
|
disk/prep -p $part >$disk/ctl >[2]/dev/null
|
|
|
}
|