[OE-core] [PATCH 2/2] image-vm: Change default ROOT_VM to use PARTUUID

Tom Rini trini at konsulko.com
Thu Jul 20 22:43:51 UTC 2017


From: Matt Porter <mporter at konsulko.com>

Support for finding the root partition via PARTUUID is a portable method to
determine the system root device as it does not depend on device ordering and
also abstracts the diference between IDE devices and SCSI/SATA/etc type
devices.

Signed-off-by: Matt Porter <mporter at konsulko.com>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
 meta/classes/image-vm.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass
index a888f0232caa..a7cabae590c0 100644
--- a/meta/classes/image-vm.bbclass
+++ b/meta/classes/image-vm.bbclass
@@ -42,7 +42,7 @@ ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${VM_ROOTFS_TYPE}"
 
 # Used by bootloader
 LABELS_VM ?= "boot"
-ROOT_VM ?= "root=/dev/sda2"
+ROOT_VM ?= "root=PARTUUID=${DISK_SIGNATURE}-02"
 # Using an initramfs is optional. Enable it by setting INITRD_IMAGE_VM.
 INITRD_IMAGE_VM ?= ""
 INITRD_VM ?= "${@'${IMGDEPLOYDIR}/${INITRD_IMAGE_VM}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE_VM}' else ''}"
-- 
1.9.1




More information about the Openembedded-core mailing list