diff mbox series

Revert "wic/plugins/images/direct: Allow changes in fstab on rootfs"

Message ID 20220927165627.3350359-1-ross.burton@arm.com
State Accepted, archived
Commit 4a7b3ef0a69b7e08030519b712a6fe4dd199c571
Headers show
Series Revert "wic/plugins/images/direct: Allow changes in fstab on rootfs" | expand

Commit Message

Ross Burton Sept. 27, 2022, 4:56 p.m. UTC
Commit 20d43a2 allows changes in fstab for the / mount. However, if the
fstab contains / already then this results in two entries for / in the
fstab, which is confusing and results in systemd producing errors on
boot:

  systemd-fstab-generator[11101]: Failed to create unit file
  /run/systemd/generator/-.mount, as it already exists. Duplicate entry
  in /etc/fstab?

Wic should be extended to support merging mount points in fstab, but as
we're about to release revert the patch that introduced this change as
it hasn't been in a release yet, and the issue which prompted the patch
in the first place can be revisited post-release.

[ YOCTO #14865 ]

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 scripts/lib/wic/plugins/imager/direct.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index c44159b2357..da483daed5f 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -117,7 +117,7 @@  class DirectPlugin(ImagerPlugin):
         updated = False
         for part in self.parts:
             if not part.realnum or not part.mountpoint \
-               or not part.mountpoint.startswith('/'):
+               or part.mountpoint == "/" or not part.mountpoint.startswith('/'):
                 continue
 
             if part.use_uuid: