]> code.ossystems Code Review - openembedded-core.git/commitdiff
init-install: Specify partition name in parted command line
authorEd Bartosh <ed.bartosh@linux.intel.com>
Sun, 14 Jun 2015 20:05:28 +0000 (23:05 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 23 Jun 2015 10:38:15 +0000 (11:38 +0100)
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@linux.intel.com>
meta/recipes-core/initrdscripts/files/init-install-efi.sh
meta/recipes-core/initrdscripts/files/init-install.sh

index 7f3e889f32eb451fe4d6f4396ac4ddc3ae8d129b..a6a86790c8dde7952f78ef13b9470836875eb7b0 100644 (file)
@@ -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
 
index 10aed074aaf2cc51f7e894f9a1d887118eecb530..c57a0f3700aafb72d9b820400005fbfcdab8db0c 100644 (file)
@@ -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