From: Ed Bartosh Date: Tue, 16 Jun 2015 04:56:25 +0000 (+0300) Subject: init-install: Properly delete partition table X-Git-Tag: 2015-10~1503 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=9be59c02901a6c9ecaaa293aea2e938edf9b122c;p=openembedded-core.git 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 --- 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