summaryrefslogtreecommitdiff
path: root/rc/bin/inst/partdisk
diff options
context:
space:
mode:
Diffstat (limited to 'rc/bin/inst/partdisk')
-rwxr-xr-xrc/bin/inst/partdisk22
1 files changed, 12 insertions, 10 deletions
diff --git a/rc/bin/inst/partdisk b/rc/bin/inst/partdisk
index cea2136d8..bbe33fbbf 100755
--- a/rc/bin/inst/partdisk
+++ b/rc/bin/inst/partdisk
@@ -32,24 +32,26 @@ case go
prompt $default 'Disk to partition' $disks
disk=$rd
- if(! ./hasmbr /dev/$disk/data) {
+ diskedit=disk/fdisk
+ if(disk/edisk -p /dev/$disk/data >/dev/null >[2=1])
+ diskedit=disk/edisk
+
+ if(~ $diskedit disk/fdisk && ! ./hasmbr /dev/$disk/data) {
echo 'The disk you selected HAS NO master boot record on its first sector.'
echo '(Perhaps it is a completely blank disk.)'
- echo 'You need a master boot record to use the disk.'
- echo 'Should we install a default master boot record?'
+ echo 'Shall we create a blank EFI partition table (GPT)'
+ echo 'or install traditional DOS partition table (MBR)?'
echo
- prompt 'Install mbr' y n
+ prompt 'Install mbr or gpt' mbr gpt
switch($rd) {
- case y
+ case mbr
disk/mbr -m /386/mbr /dev/$disk/data
- pickdisk=done
+ case gpt
+ disk/edisk -bw /dev/$disk/data
+ diskedit=disk/edisk
}
}
- diskedit=disk/fdisk
- if(disk/edisk -p /dev/$disk/data >/dev/null >[2=1])
- diskedit=disk/edisk
-
echo
echo 'This is '$diskedit'; use it to create a Plan 9 partition.'
echo 'If there is enough room, a Plan 9 partition will be'