diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-06-14 23:05:28 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-23 11:47:27 +0100 |
commit | a10c4481f164071c83a397d3e66c76537670da35 (patch) | |
tree | 2ce7e60dafef29a83ed7dcfcfae2c8341c326626 /meta | |
parent | 891cdacb62059c60106837905d3175918f7ab9e6 (diff) | |
download | poky-a10c4481f164071c83a397d3e66c76537670da35.tar.gz |
init-install: Specify partition name in parted command line
parted allows to use names for partitions if GPT partition table
is used on the device. msdos partitioning can have only partition
types: 'primary', 'logical' or 'extended'.
Used meaningful partition names in parted command line for GPT
partitioning.
(From OE-Core rev: ef2c6df7fcfd02ed45637f2e6b48f324d7a56b88)
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.sh | 6 | ||||
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install.sh | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh index 7f3e889f32..a6a86790c8 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh | |||
@@ -134,14 +134,14 @@ echo "Creating new partition table on /dev/${device} ..." | |||
134 | parted /dev/${device} mklabel gpt | 134 | parted /dev/${device} mklabel gpt |
135 | 135 | ||
136 | echo "Creating boot partition on $bootfs" | 136 | echo "Creating boot partition on $bootfs" |
137 | parted /dev/${device} mkpart primary fat32 0% $boot_size | 137 | parted /dev/${device} mkpart boot fat32 0% $boot_size |
138 | parted /dev/${device} set 1 boot on | 138 | parted /dev/${device} set 1 boot on |
139 | 139 | ||
140 | echo "Creating rootfs partition on $rootfs" | 140 | echo "Creating rootfs partition on $rootfs" |
141 | parted /dev/${device} mkpart primary ext3 $rootfs_start $rootfs_end | 141 | parted /dev/${device} mkpart root ext3 $rootfs_start $rootfs_end |
142 | 142 | ||
143 | echo "Creating swap partition on $swap" | 143 | echo "Creating swap partition on $swap" |
144 | parted /dev/${device} mkpart primary linux-swap $swap_start 100% | 144 | parted /dev/${device} mkpart swap linux-swap $swap_start 100% |
145 | 145 | ||
146 | parted /dev/${device} print | 146 | parted /dev/${device} print |
147 | 147 | ||
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh index 10aed074aa..c57a0f3700 100644 --- a/meta/recipes-core/initrdscripts/files/init-install.sh +++ b/meta/recipes-core/initrdscripts/files/init-install.sh | |||
@@ -163,17 +163,19 @@ if [ $grub_version -eq 0 ] ; then | |||
163 | else | 163 | else |
164 | parted /dev/${device} mktable gpt | 164 | parted /dev/${device} mktable gpt |
165 | echo "Creating BIOS boot partition on $bios_boot" | 165 | echo "Creating BIOS boot partition on $bios_boot" |
166 | parted /dev/${device} mkpart primary 0% $bios_boot_size | 166 | parted /dev/${device} mkpart bios_boot 0% $bios_boot_size |
167 | parted /dev/${device} set 1 bios_grub on | 167 | parted /dev/${device} set 1 bios_grub on |
168 | echo "Creating boot partition on $bootfs" | 168 | echo "Creating boot partition on $bootfs" |
169 | parted /dev/${device} mkpart primary ext3 $boot_start $boot_size | 169 | parted /dev/${device} mkpart boot ext3 $boot_start $boot_size |
170 | fi | 170 | fi |
171 | 171 | ||
172 | echo "Creating rootfs partition on $rootfs" | 172 | echo "Creating rootfs partition on $rootfs" |
173 | parted /dev/${device} mkpart primary ext3 $rootfs_start $rootfs_end | 173 | [ $grub_version -eq 0 ] && pname='primary' || pname='root' |
174 | parted /dev/${device} mkpart $pname ext3 $rootfs_start $rootfs_end | ||
174 | 175 | ||
175 | echo "Creating swap partition on $swap" | 176 | echo "Creating swap partition on $swap" |
176 | parted /dev/${device} mkpart primary linux-swap $swap_start 100% | 177 | [ $grub_version -eq 0 ] && pname='primary' || pname='swap' |
178 | parted /dev/${device} mkpart $pname linux-swap $swap_start 100% | ||
177 | 179 | ||
178 | parted /dev/${device} print | 180 | parted /dev/${device} print |
179 | 181 | ||