]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sfdisk: add 'U' shortcut for ESP
authorKarel Zak <kzak@redhat.com>
Mon, 1 Feb 2016 13:08:04 +0000 (14:08 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 1 Feb 2016 13:08:04 +0000 (14:08 +0100)
 echo -e ',512M,U\n,,L' | sfdisk --label gpt /dev/foo

to make ESP system partition.

References: https://github.com/karelzak/util-linux/issues/267
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/sfdisk.8
libfdisk/src/script.c

index 77fb3f7521c1997ae1534a7ba73fa75e1dc3f727..4aa0b6208b4c32f0e4fc94def90402fe6f1f73d0 100644 (file)
@@ -301,6 +301,9 @@ home partition; means 933AC7E1-2EB4-4F13-B844-0E14E2AEF915 for GPT
 .TP
 .B X
 linux extended partition; means 85 for MBR.
+.TP
+.B U
+EFI System partition, means C12A7328-F81F-11D2-BA4B-00A0C93EC93B for GPT
 .RE
 .PP
 The default
index 1191da4747cda81889d74a0d395e70908bebdcfa..79e2add04e2682d1370587a0f39123ccace917bc 100644 (file)
@@ -972,6 +972,9 @@ static struct fdisk_parttype *translate_type_shortcuts(struct fdisk_script *dp,
                case 'H':       /* Home */
                        type = "933AC7E1-2EB4-4F13-B844-0E14E2AEF915";
                        break;
+               case 'U':       /* UEFI system */
+                       type = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B";
+                       break;
                }
        }