wic: support rootdev identified by partition label
PATCH 1/1 wic: support rootdev identified by partition label
We already support specifying the rootfs by PARTUUID. This adds general support for letting the kernel find the rootfs by PARTLABEL.
Signed-off-by Adriaan Schmidt <[email protected]>
--- scripts/lib/wic/plugins/imager/direct.py | 2 ++ 1 file changed, 2 insertions(+)
scripts/lib/wic/plugins/imager/direct.py +2 -0
@@ -259,6 +259,8 @@ class DirectPlugin(ImagerPlugin): if part.mountpoint == "/": if part.uuid: return "PARTUUID=%s" % part.uuid + elif part.label: + return "PARTLABEL=%s" % part.label else: suffix = 'p' if part.disk.startswith('mmcblk') else '' return "/dev/%s%s%-d" % (part.disk, suffix, part.realnum)
Signature · 1 line
2.20.1