Re: [meta-rockchip][PATCH] use uuid instead of hard-coding root device

Markus Volk

Am 23.09.21 um 22:55 schrieb Trevor Woerner:
We can add the --use-uuid line to the /boot entry if you really think it
should be mounted on boot, but we shouldn't use it on the others and cause wic
to generate a bad fstab. There are examples of other boards that don't mount
/boot by default (raspi for sure, and I think bbb too).
Could the solution be as simple as this?

From b8ba56d84fbac53901e5b7ca122498320e51fbf4 Mon Sep 17 00:00:00 2001
From: MarkusVolk <f_l_k@...>
Date: Sat, 25 Sep 2021 09:21:15 +0200
Subject: [PATCH] improve filter for fstab update

Signed-off-by: MarkusVolk <f_l_k@...>
 scripts/lib/wic/plugins/imager/ | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/plugins/imager/ b/scripts/lib/wic/plugins/imager/
index 9d10ec01d0..15fa47356f 100644
--- a/scripts/lib/wic/plugins/imager/
+++ b/scripts/lib/wic/plugins/imager/
@@ -117,7 +117,7 @@ class DirectPlugin(ImagerPlugin):
         updated = False
         for part in
             if not part.realnum or not part.mountpoint \
-               or part.mountpoint == "/":
+               or part.mountpoint == "/" or not part.mountpoint.startswith('/'):
             if part.use_uuid:

With this patch wic only adds the /boot mountpoint. The invalid entries get filtered out.
We would then only need to set --use-uuid for /boot to avoid the system from crashing if
'no-fstab-update' isn't expicitly given as an argument

Join to automatically receive all group messages.