From d0cd7cd38711b5425777c3b1595dbf4288beaa23 Mon Sep 17 00:00:00 2001 From: Frederick Grose Date: Tue, 2 Aug 2022 18:07:50 -0400 Subject: [PATCH] fix(dmsquash-live-root): check kernel for built-in `overlay` drivers Do not assume that `overlay` is always a module. Check first for `overlay` in `/proc/filesystems`. This is needed in the --no-kernel use case to avoid the error: modprobe: FATAL: Module overlay not found in directory /lib/modules/ Signed-off-by: Federico Vaga --- modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh index abc68407f..cb3fe5d06 100755 --- a/modules.d/90dmsquash-live/dmsquash-live-root.sh +++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh @@ -177,7 +177,7 @@ do_live_overlay() { fi fi if [ -n "$overlayfs" ]; then - if ! modprobe overlay; then + if ! { strstr "$(< /proc/filesystems)" overlay || modprobe overlay; }; then if [ "$overlayfs" = required ]; then die "OverlayFS is required but not available." exit 1 -- 2.39.2