Patchwork create a proper ESP

mail settings
Submitter Koen Kooi
Date March 18, 2013, 3:23 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/46395/
State Accepted
Commit 203ca80ee27948e2c68aab8ea48e51ff1c1157d5
Headers show


Koen Kooi - March 18, 2013, 3:23 p.m.
The script was creating a FAT fs with EFI files in it, but wasn't setting the GPT GUID.

Using 'gummiboot install' natively failed because of the missing GPT GUID, so fix that. While we're there also set the name to "EFI System Partition".

Signed-off-by: Koen Kooi <>
Acked-by: Darren Hart <>
 scripts/contrib/ | 8 ++++++++
 1 file changed, 8 insertions(+)


diff --git a/scripts/contrib/ b/scripts/contrib/
index 44ac130..b7db0a9 100755
--- a/scripts/contrib/
+++ b/scripts/contrib/
@@ -166,6 +166,14 @@  parted $DEVICE mklabel gpt
 echo "Creating boot partition on $BOOTFS"
 parted $DEVICE mkpart primary 0% $BOOT_SIZE
+# GPT doesn't have a real boot flag, parted will change the GUID to EFI System Partition, 
+# which is what we want
+echo "Enabling boot flag on $BOOTFS"
+parted $DEVICE set 1 boot on
+echo "Labeling $BOOTFS as EFI System Partition"
+parted $DEVICE name 1 "EFI System Partition"
 echo "Creating ROOTFS partition on $ROOTFS"
 parted $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END