summaryrefslogtreecommitdiffstats
path: root/meta
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:47:29 +0100
commit2173a0ec28929e3a62df62195b8c83fb61811713 (patch)
treee906f4e6b047e274c25549ea88e69c3fbb261f23 /meta
parent68d8f6d2e4a8d3d15ddc5b5404c5f75b7bd1950c (diff)
downloadpoky-2173a0ec28929e3a62df62195b8c83fb61811713.tar.gz
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. (From OE-Core rev: 9be59c02901a6c9ecaaa293aea2e938edf9b122c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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)"
127echo "Swap partition size: $swap_size MB ($swap)" 127echo "Swap partition size: $swap_size MB ($swap)"
128echo "*****************" 128echo "*****************"
129echo "Deleting partition table on ${device} ..." 129echo "Deleting partition table on ${device} ..."
130dd if=/dev/zero of=${device} bs=512 count=2 130dd if=/dev/zero of=${device} bs=512 count=35
131 131
132echo "Creating new partition table on ${device} ..." 132echo "Creating new partition table on ${device} ..."
133parted ${device} mklabel gpt 133parted ${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)"
153echo "Swap partition size: $swap_size MB ($swap)" 153echo "Swap partition size: $swap_size MB ($swap)"
154echo "*****************" 154echo "*****************"
155echo "Deleting partition table on ${device} ..." 155echo "Deleting partition table on ${device} ..."
156dd if=/dev/zero of=${device} bs=512 count=2 156dd if=/dev/zero of=${device} bs=512 count=35
157 157
158echo "Creating new partition table on ${device} ..." 158echo "Creating new partition table on ${device} ..."
159if [ $grub_version -eq 0 ] ; then 159if [ $grub_version -eq 0 ] ; then