aboutsummaryrefslogtreecommitdiffstats
path: root/partition.sh
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2013-10-11 02:47:00 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 04:27:34 +0200
commita924e3cb3de3f5f90ca7744f96cd5660b3705c5f (patch)
treefc2b6b92edb9bd51f98ba9b453ee75648d06f563 /partition.sh
parent43d6e38bc73fe41577bcf780d9ce5ba1b58ecce5 (diff)
Bugfix: /media/cdrom is required in the fstab
Diffstat (limited to 'partition.sh')
-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?