diff options
author | Darren Hart <dvhart@linux.intel.com> | 2013-03-19 15:15:06 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-22 16:52:52 +0000 |
commit | 049ea1e0a6a1017a5020de38bd7ce93515bd62f4 (patch) | |
tree | eb984f46fd761bddff455ea9cd9626937cd31c53 /scripts | |
parent | d031cdbf40231b8c103d78c69252bf9d584d0605 (diff) | |
download | openembedded-core-049ea1e0a6a1017a5020de38bd7ce93515bd62f4.tar.gz openembedded-core-049ea1e0a6a1017a5020de38bd7ce93515bd62f4.tar.bz2 openembedded-core-049ea1e0a6a1017a5020de38bd7ce93515bd62f4.zip |
mkefidisk: Use msdos partition tables
While GPT works fine when writing to actual media, it cannot be reliably
used for distributing disk images as it requires the backup table to be
on the last block on the device, which of course varies from device to
device. Use MSDOS tables instead.
Use mkfs to label the filesystems as msdos tables do not support
partition labeling.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 "*****************" echo "Deleting partition table on $DEVICE ..." dd if=/dev/zero of=$DEVICE bs=512 count=2 -echo "Creating new partition table (GPT) on $DEVICE ..." -parted $DEVICE mklabel gpt +# Use MSDOS by default as GPT cannot be reliably distributed in disk image form +# as it requires the backup table to be on the last block of the device, which +# of course varies from device to device. +echo "Creating new partition table (MSDOS) on $DEVICE ..." +parted $DEVICE mklabel msdos 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 @@ -184,10 +182,10 @@ parted $DEVICE print # echo "" echo "Formatting $BOOTFS as vfat..." -mkfs.vfat $BOOTFS +mkfs.vfat $BOOTFS -n "efi" echo "Formatting $ROOTFS as ext3..." -mkfs.ext3 $ROOTFS +mkfs.ext3 $ROOTFS -L "root" echo "Formatting swap partition...($SWAP)" mkswap $SWAP |