Browse Source

initramfs-framework: Add support for PartUUIDs

The rootfs can be addressed also by referring to the PartUUID
value from the GPT.
This patch enables such type of reference.

(From OE-Core rev: 1ab2ca141d3defe4b80212e28ac7c3f2271e2515)

Signed-off-by: Igor Stoppa <igor.stoppa@intel.com>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Igor Stoppa 9 years ago
parent
commit
d6a43d222d
1 changed files with 5 additions and 0 deletions
  1. 5 0
      meta/recipes-core/initrdscripts/initramfs-framework/rootfs

+ 5 - 0
meta/recipes-core/initrdscripts/initramfs-framework/rootfs

@@ -26,6 +26,11 @@ rootfs_run() {
 				bootparam_root="/dev/disk/by-uuid/$root_uuid"
 			fi
 
+			if [ "`echo ${bootparam_root} | cut -c1-9`" = "PARTUUID=" ]; then
+				root_uuid=`echo $bootparam_root | cut -c10-`
+				bootparam_root="/dev/disk/by-partuuid/$root_uuid"
+			fi
+
 			if [ -e "$bootparam_root" ]; then
 				flags=""
 				if [ -n "$bootparam_ro" ] && ! echo "$bootparam_rootflags" | grep -w -q "ro"; then