Skip to content
Snippets Groups Projects
Commit 4b3656a9 authored by Diego Rondini's avatar Diego Rondini Committed by Richard Purdie
Browse files

initramfs-framework: support PARTLABEL option

Since commit (kernel >= 4.20):
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f027c34d844013d9d6c902af8fa01a82d6e5073d


specifying rootfs by PARTLABEL is supported. This commit adds support to
specify root by GPT partition label.

(From OE-Core rev: e714b8982c2decbc24598af46f44c3a94834591f)

Signed-off-by: default avatarDiego Rondini <diego.rondini@kynetics.com>
Signed-off-by: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
parent fc94afe1
Branches
Tags
No related merge requests found
......@@ -31,6 +31,11 @@ rootfs_run() {
bootparam_root="/dev/disk/by-partuuid/$root_uuid"
fi
if [ "`echo ${bootparam_root} | cut -c1-10`" = "PARTLABEL=" ]; then
root_uuid=`echo $bootparam_root | cut -c11-`
bootparam_root="/dev/disk/by-partlabel/$root_uuid"
fi
if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" ]; then
root_label=`echo $bootparam_root | cut -c7-`
bootparam_root="/dev/disk/by-label/$root_label"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment