diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/contrib/mkefidisk.sh | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh index 6ff12af523..acadd49774 100755 --- a/scripts/contrib/mkefidisk.sh +++ b/scripts/contrib/mkefidisk.sh | |||
| @@ -156,20 +156,18 @@ echo "*****************" | |||
| 156 | echo "Deleting partition table on $DEVICE ..." | 156 | echo "Deleting partition table on $DEVICE ..." |
| 157 | dd if=/dev/zero of=$DEVICE bs=512 count=2 | 157 | dd if=/dev/zero of=$DEVICE bs=512 count=2 |
| 158 | 158 | ||
| 159 | echo "Creating new partition table (GPT) on $DEVICE ..." | 159 | # Use MSDOS by default as GPT cannot be reliably distributed in disk image form |
| 160 | parted $DEVICE mklabel gpt | 160 | # as it requires the backup table to be on the last block of the device, which |
| 161 | # of course varies from device to device. | ||
| 162 | echo "Creating new partition table (MSDOS) on $DEVICE ..." | ||
| 163 | parted $DEVICE mklabel msdos | ||
| 161 | 164 | ||
| 162 | echo "Creating boot partition on $BOOTFS" | 165 | echo "Creating boot partition on $BOOTFS" |
| 163 | parted $DEVICE mkpart primary 0% $BOOT_SIZE | 166 | parted $DEVICE mkpart primary 0% $BOOT_SIZE |
| 164 | 167 | ||
| 165 | # GPT doesn't have a real boot flag, parted will change the GUID to EFI System | ||
| 166 | # Partition, which is what we want | ||
| 167 | echo "Enabling boot flag on $BOOTFS" | 168 | echo "Enabling boot flag on $BOOTFS" |
| 168 | parted $DEVICE set 1 boot on | 169 | parted $DEVICE set 1 boot on |
| 169 | 170 | ||
| 170 | echo "Labeling $BOOTFS as EFI System Partition" | ||
| 171 | parted $DEVICE name 1 "EFI System Partition" | ||
| 172 | |||
| 173 | echo "Creating ROOTFS partition on $ROOTFS" | 171 | echo "Creating ROOTFS partition on $ROOTFS" |
| 174 | parted $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END | 172 | parted $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END |
| 175 | 173 | ||
| @@ -184,10 +182,10 @@ parted $DEVICE print | |||
| 184 | # | 182 | # |
| 185 | echo "" | 183 | echo "" |
| 186 | echo "Formatting $BOOTFS as vfat..." | 184 | echo "Formatting $BOOTFS as vfat..." |
| 187 | mkfs.vfat $BOOTFS | 185 | mkfs.vfat $BOOTFS -n "efi" |
| 188 | 186 | ||
| 189 | echo "Formatting $ROOTFS as ext3..." | 187 | echo "Formatting $ROOTFS as ext3..." |
| 190 | mkfs.ext3 $ROOTFS | 188 | mkfs.ext3 $ROOTFS -L "root" |
| 191 | 189 | ||
| 192 | echo "Formatting swap partition...($SWAP)" | 190 | echo "Formatting swap partition...($SWAP)" |
| 193 | mkswap $SWAP | 191 | mkswap $SWAP |
