[oe-commits] Ed Bartosh : init-install: Specify partition name in parted command line
git at git.openembedded.org
git at git.openembedded.org
Tue Jun 23 10:55:44 UTC 2015
Module: openembedded-core.git
Branch: master-next
Commit: ef2c6df7fcfd02ed45637f2e6b48f324d7a56b88
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=ef2c6df7fcfd02ed45637f2e6b48f324d7a56b88
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
Date: Sun Jun 14 23:05:28 2015 +0300
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.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
meta/recipes-core/initrdscripts/files/init-install-efi.sh | 6 +++---
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 7f3e889..a6a8679 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} ..."
parted /dev/${device} mklabel gpt
echo "Creating boot partition on $bootfs"
-parted /dev/${device} mkpart primary fat32 0% $boot_size
+parted /dev/${device} mkpart boot fat32 0% $boot_size
parted /dev/${device} set 1 boot on
echo "Creating rootfs partition on $rootfs"
-parted /dev/${device} mkpart primary ext3 $rootfs_start $rootfs_end
+parted /dev/${device} mkpart root ext3 $rootfs_start $rootfs_end
echo "Creating swap partition on $swap"
-parted /dev/${device} mkpart primary linux-swap $swap_start 100%
+parted /dev/${device} mkpart swap linux-swap $swap_start 100%
parted /dev/${device} print
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 10aed07..c57a0f3 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
else
parted /dev/${device} mktable gpt
echo "Creating BIOS boot partition on $bios_boot"
- parted /dev/${device} mkpart primary 0% $bios_boot_size
+ parted /dev/${device} mkpart bios_boot 0% $bios_boot_size
parted /dev/${device} set 1 bios_grub on
echo "Creating boot partition on $bootfs"
- parted /dev/${device} mkpart primary ext3 $boot_start $boot_size
+ parted /dev/${device} mkpart boot ext3 $boot_start $boot_size
fi
echo "Creating rootfs partition on $rootfs"
-parted /dev/${device} mkpart primary ext3 $rootfs_start $rootfs_end
+[ $grub_version -eq 0 ] && pname='primary' || pname='root'
+parted /dev/${device} mkpart $pname ext3 $rootfs_start $rootfs_end
echo "Creating swap partition on $swap"
-parted /dev/${device} mkpart primary linux-swap $swap_start 100%
+[ $grub_version -eq 0 ] && pname='primary' || pname='swap'
+parted /dev/${device} mkpart $pname linux-swap $swap_start 100%
parted /dev/${device} print
More information about the Openembedded-commits
mailing list