integrate disk/edisk with diskparts, bootfs and installer (gpt support)
This commit is contained in:
parent
3e124e1f13
commit
82aa1d5c78
3 changed files with 13 additions and 5 deletions
|
@ -8,7 +8,8 @@ rfork e
|
||||||
# no plan 9 partition table will delete all extant partitions.
|
# no plan 9 partition table will delete all extant partitions.
|
||||||
fn setup {
|
fn setup {
|
||||||
if(test -f $1/data && test -f $1/ctl)
|
if(test -f $1/data && test -f $1/ctl)
|
||||||
{ disk/fdisk -p $1/data |
|
{@{disk/edisk -p $1/data
|
||||||
|
|| disk/fdisk -p $1/data} |
|
||||||
grep -v '^delpart ' >$1/ctl } >[2]/dev/null
|
grep -v '^delpart ' >$1/ctl } >[2]/dev/null
|
||||||
if(test -f $1/plan9)
|
if(test -f $1/plan9)
|
||||||
parts=($1/plan9*)
|
parts=($1/plan9*)
|
||||||
|
|
|
@ -17,7 +17,8 @@ case go
|
||||||
for(i in $disks) {
|
for(i in $disks) {
|
||||||
desc=`{cat /dev/$i/ctl | sed 1q | sed 's/inquiry //'}
|
desc=`{cat /dev/$i/ctl | sed 1q | sed 's/inquiry //'}
|
||||||
echo $i '-' $desc
|
echo $i '-' $desc
|
||||||
echo e | disk/fdisk -r /dev/$i/data >[2]/dev/null | grep -v '^ mbr'
|
@{disk/edisk -r /dev/$i/data
|
||||||
|
||disk/fdisk -r /dev/$i/data} </dev/null >[2]/dev/null | grep -v '^ mbr'
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,13 +45,18 @@ case go
|
||||||
pickdisk=done
|
pickdisk=done
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diskedit=disk/fdisk
|
||||||
|
if(disk/edisk -p /dev/$disk/data >/dev/null >[2=1])
|
||||||
|
diskedit=disk/edisk
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo 'This is disk/fdisk; use it to create a Plan 9 partition.'
|
echo 'This is '$diskedit'; use it to create a Plan 9 partition.'
|
||||||
echo 'If there is enough room, a Plan 9 partition will be'
|
echo 'If there is enough room, a Plan 9 partition will be'
|
||||||
echo 'suggested; you can probably just type ''w'' and then ''q''.'
|
echo 'suggested; you can probably just type ''w'' and then ''q''.'
|
||||||
echo
|
echo
|
||||||
disk/fdisk -a /dev/$disk/data
|
$diskedit -a /dev/$disk/data
|
||||||
disk/fdisk -p /dev/$disk/data >/dev/$disk/ctl >[2]/dev/null
|
$diskedit -p /dev/$disk/data >/dev/$disk/ctl >[2]/dev/null
|
||||||
for(i in /dev/sd*/plan9*){
|
for(i in /dev/sd*/plan9*){
|
||||||
if(test -f $i){
|
if(test -f $i){
|
||||||
d=`{basename -d $i}
|
d=`{basename -d $i}
|
||||||
|
|
|
@ -13,6 +13,7 @@ $objtype
|
||||||
cryptsetup
|
cryptsetup
|
||||||
dd
|
dd
|
||||||
disk
|
disk
|
||||||
|
edisk
|
||||||
fdisk
|
fdisk
|
||||||
prep
|
prep
|
||||||
dossrv
|
dossrv
|
||||||
|
|
Loading…
Reference in a new issue