[OE-core] [PATCH v2 11/11] init-install: Properly delete partition table
Ed Bartosh
ed.bartosh at linux.intel.com
Tue Jun 16 06:13:54 UTC 2015
Fixed deletion of the partition table by increasing
amount of sectors from 2(correct for msdos PT) to 35 as
GPT size is 34 sectors + 1 sector for protective MBR.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 74372b0..14939ac 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -127,7 +127,7 @@ echo "Rootfs partition size: $rootfs_size MB ($rootfs)"
echo "Swap partition size: $swap_size MB ($swap)"
echo "*****************"
echo "Deleting partition table on ${device} ..."
-dd if=/dev/zero of=${device} bs=512 count=2
+dd if=/dev/zero of=${device} bs=512 count=35
echo "Creating new partition table on ${device} ..."
parted ${device} mklabel gpt
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 0593b3c..7fccdde 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -153,7 +153,7 @@ echo "Rootfs partition size: $rootfs_size MB ($rootfs)"
echo "Swap partition size: $swap_size MB ($swap)"
echo "*****************"
echo "Deleting partition table on ${device} ..."
-dd if=/dev/zero of=${device} bs=512 count=2
+dd if=/dev/zero of=${device} bs=512 count=35
echo "Creating new partition table on ${device} ..."
if [ $grub_version -eq 0 ] ; then
--
2.1.4
More information about the Openembedded-core
mailing list