diff options
| author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-06-16 07:56:25 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-23 11:47:29 +0100 |
| commit | 2173a0ec28929e3a62df62195b8c83fb61811713 (patch) | |
| tree | e906f4e6b047e274c25549ea88e69c3fbb261f23 | |
| parent | 68d8f6d2e4a8d3d15ddc5b5404c5f75b7bd1950c (diff) | |
| download | poky-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>
| -rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install-efi.sh | 2 | ||||
| -rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install.sh | 2 |
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)" | |||
| 127 | echo "Swap partition size: $swap_size MB ($swap)" | 127 | echo "Swap partition size: $swap_size MB ($swap)" |
| 128 | echo "*****************" | 128 | echo "*****************" |
| 129 | echo "Deleting partition table on ${device} ..." | 129 | echo "Deleting partition table on ${device} ..." |
| 130 | dd if=/dev/zero of=${device} bs=512 count=2 | 130 | dd if=/dev/zero of=${device} bs=512 count=35 |
| 131 | 131 | ||
| 132 | echo "Creating new partition table on ${device} ..." | 132 | echo "Creating new partition table on ${device} ..." |
| 133 | parted ${device} mklabel gpt | 133 | 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)" | |||
| 153 | echo "Swap partition size: $swap_size MB ($swap)" | 153 | echo "Swap partition size: $swap_size MB ($swap)" |
| 154 | echo "*****************" | 154 | echo "*****************" |
| 155 | echo "Deleting partition table on ${device} ..." | 155 | echo "Deleting partition table on ${device} ..." |
| 156 | dd if=/dev/zero of=${device} bs=512 count=2 | 156 | dd if=/dev/zero of=${device} bs=512 count=35 |
| 157 | 157 | ||
| 158 | echo "Creating new partition table on ${device} ..." | 158 | echo "Creating new partition table on ${device} ..." |
| 159 | if [ $grub_version -eq 0 ] ; then | 159 | if [ $grub_version -eq 0 ] ; then |
