Open jdharms opened 2 years ago
Also noticed same issue with dracut 053 using livenet, however starting
systemctl start sysroot.mount
mounts /sysroot
@jdharms If you do not actually need systemd in your initramfs, you can disable it and just specify the dracut modules you actually need, e.g.
dracutmodules+="dmsquash-live"
There is a PR up for review for a test case that uses this technique and it is passing (against latest upstream) - https://github.com/dracutdevs/dracut/pull/1813/files#diff-6aa993c0ff374636137737561ae60ed7e576e1891e210e322680f9662ebdef13R110
Also seems like its related to systemd version. Like a issue #1822. I found old version of live image with dracut 053 and systemd 249 and it works with same setup, however systemd 250+ stopped working
@jdharms Please adjust dmsquash-live-root.sh
lines 9-13 to
if getargbool 0 rd.live.debug -n -y rdlivedebug; then
[ -z "$DRACUT_SYSTEMD" ] && exec > /run/initramfs/liveroot.$$.out 2>&1
set -x
export RD_DEBUG=yes
[ "$BASH" ] && export \
PS4='+ (${BASH_SOURCE}@${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
fi
and then report the relevant journal section or /run/initramfs/liveroot.$$.out
.
(Notice that if your flat rootfs does not contain the empty directory /proc
, the test at line 304
elif [ -d /run/initramfs/squashfs/proc ]; then
will fail.)
I think this (or similar) issue can be reproduced by running test-16 with the following change in the source tree
--- a/test/TEST-16-DMSQUASH/test.sh
+++ b/test/TEST-16-DMSQUASH/test.sh
@@ -136,8 +136,8 @@ SUBSYSTEM=="block", ENV{ID_FS_TYPE}=="ntfs", ENV{ID_FS_TYPE}="ntfs3"
EOF
"$basedir"/dracut.sh -l -i "$TESTDIR"/overlay / \
- --modules "test dash dmsquash-live qemu" \
+ --modules "test dash dmsquash-live qemu dracut-systemd" \
Describe the bug I'm attempting to boot into a squashfs image with an overlayfs overlay. The switch root fails, here are some relevant lines from my rdsosreport.txt:
If I remove or alter the line here: https://github.com/dracutdevs/dracut/blob/master/modules.d/90dmsquash-live/dmsquash-live-root.sh#L394 to add the overlayfs even with DRACUT_SYSTEMD is not zero then my system boots exactly how I would expect it to.
Is this conditional necessary? Is systemd not doing something that dracut assumes it should do?
Distribution used Ubuntu 22.04
Dracut version
dracut --version
reports onlydracut
.apt info dracut
reports version 051-1. Was installed via apt.Init system systemd
To Reproduce My dracut.conf:
/LiveOS/squashfs.img is a squashfs image containing a flat ubuntu root fs.
Expected behavior Should set up an overlayfs fs over the squashfs image