boot(8): use first detected filesystem as bootargs default
This commit is contained in:
parent
0aa4074bc1
commit
e8635a732a
2 changed files with 7 additions and 9 deletions
6
sys/lib/dist/pc/plan9.ini.cd
vendored
6
sys/lib/dist/pc/plan9.ini.cd
vendored
|
@ -1,13 +1,7 @@
|
|||
# config for initial cd booting
|
||||
# very cautious settings to get started.
|
||||
# will defeat booting from usb devices.
|
||||
*nodumpstack=1
|
||||
partition=new
|
||||
mouseport=ask
|
||||
monitor=ask
|
||||
vgasize=ask
|
||||
cdboot=yes
|
||||
# console=0
|
||||
# baud=9600
|
||||
bootargs=local!#S/sdD0/data
|
||||
bootfile=/386/9pcf
|
||||
|
|
|
@ -6,9 +6,13 @@ fn showlocaldevs{
|
|||
if(test -r $c){
|
||||
d=`{echo $c | sed 's,/ctl,,g'}
|
||||
echo $d':' `{sed 's/inquiry[ ]+//g; q' $c}
|
||||
for(i in `{ls -p $d | grep -v -e 'ctl|raw'})
|
||||
echo $d'/'$i `{fstype $d'/'$i}
|
||||
echo
|
||||
for(i in `{ls -p $d | grep -v -e 'ctl|raw'}){
|
||||
p=$d/$i
|
||||
t=`{fstype $p}
|
||||
if(~ $#bootargs 0 && ! ~ $t '')
|
||||
bootargs=local!$p
|
||||
echo $p $t
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue