aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpartition.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/partition.sh b/partition.sh
index 5e836bb..f13c295 100755
--- a/partition.sh
+++ b/partition.sh
@@ -19,9 +19,13 @@ fripost_wipe $device
/sbin/parted -s $device mklabel gpt
log "Created disklabel GPT for device $device"
-# Create a UEFI partition if needed
-[ -d /proc/efi -o -d /sys/firmware/efi ] && \
- part_uefi=$( fripost_mkpart $device uefi 256M +boot )
+# Create a EFI partition if needed; otherwise, create a partition needed
+# to put GRUB on GPT disklabels.
+if [ -d /proc/efi -o -d /sys/firmware/efi ]; then
+ part_efi=$( fripost_mkpart $device efi 256M +boot )
+else
+ fripost_mkpart $device bios_grub 8M +bios_grub
+fi
# Create boot and system partitions
part_boot=$( fripost_mkpart $device boot 64M )
@@ -71,3 +75,5 @@ fripost_fstab /dev/$vg/root / ext4 noatime,errors=remount-ro
fripost_fstab /dev/$vg/swap none swap sw
fripost_fstab /dev/$vg/home /home ext4 noatime
fripost_mount_partitions
+
+# TODO: EFI: format, add in fstab, how to populate?