]> code.ossystems Code Review - openembedded-core.git/commitdiff
init-install: Properly delete partition table
authorEd Bartosh <ed.bartosh@linux.intel.com>
Tue, 16 Jun 2015 04:56:25 +0000 (07:56 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 23 Jun 2015 10:38:15 +0000 (11:38 +0100)
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>
meta/recipes-core/initrdscripts/files/init-install-efi.sh
meta/recipes-core/initrdscripts/files/init-install.sh

index 74372b0c96a994a6d8c02451b9100be1173fd6ae..14939acd696a86ac8dce6e311a1f2f1a8a0efe69 100644 (file)
@@ -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
index 0593b3c716e3d6cc90c117089eb918a0a0a7c6ed..7fccddea039f7610be118822d037d482b7945d30 100644 (file)
@@ -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