Skip to contentSkip to conversation

wic: support rootdev identified by partition label

PATCH New Adriaan Schmidt 1 participant 1 message Nov 23, 2021

lore
Share & tools
lore
#0 lore raw

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.

---
 scripts/lib/wic/plugins/imager/direct.py | 2 ++
 1 file changed, 2 insertions(+)
scripts/lib/wic/plugins/imager/direct.py +2 -0
index c7bc2469ab..35fff7c102 100644
@@ -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