summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-06-16 07:56:25 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-23 11:38:15 +0100
commit9be59c02901a6c9ecaaa293aea2e938edf9b122c (patch)
tree9452ae06a44b03ad199466a19b13b645e09c78fb
parentf2fe5735a2d2c5a5cbadd3486aa24a4931655526 (diff)
downloadopenembedded-core-9be59c02901a6c9ecaaa293aea2e938edf9b122c.tar.gz
openembedded-core-9be59c02901a6c9ecaaa293aea2e938edf9b122c.tar.bz2
openembedded-core-9be59c02901a6c9ecaaa293aea2e938edf9b122c.zip
init-install: Properly delete partition table
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@linux.intel.com>
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh2
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 74372b0c96..14939acd69 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 0593b3c716..7fccddea03 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