ERROR: failed to unmount .../void-mklive/mklive-build.fZXVp/image/rootfs/sys/
Hi all,
I'm new to void, and hoping to get an install working on my Intel Lunar Lake laptop. To that end, I need a newer kernel than 6.12 which does not seem to boot on this hardware. In my attempt to generate a live ISO with a newer kernel I am trying:
sudo ./mkiso.sh -a x86_64 -r https://repo-default.voidlinux.org/current -r https://repo-default.voidlinux.org/current/nonfree -b kde -- -p "linux6.15 linux-firmware linux-firmware-intel intel-ucode" -C "live.autologin"
This runs through all but the final steps where it errors:
[8/12] Generating isolinux support for PC-BIOS systems...
[9/12] Generating GRUB support for EFI systems...
umount: /home/roman/Projects/void-mklive/mklive-build.fZXVp/grub-efi.LfCEi: not mounted.
[10/12] Cleaning up rootfs...
[11/12] Generating squashfs image (xz) from rootfs...
umount: /home/roman/Projects/void-mklive/mklive-build.fZXVp/image/rootfs/sys/fs/cgroup: target is busy.
ERROR: failed to unmount /home/roman/Projects/void-mklive/mklive-build.fZXVp/image/rootfs/sys/
umount: /home/roman/Projects/void-mklive/mklive-build.fZXVp/image/rootfs/sys/fs/cgroup: target is busy.
ERROR: failed to unmount /home/roman/Projects/void-mklive/mklive-build.fZXVp/image/rootfs/sys/
The host system is a bedrock install with arch and void strata (perhaps this is the issue, but I am in a bit of a chicken and egg situation here).
Please let me know if there's some way to workaround this, or if there's any other info I can provide.
One possibly stupid question - have you tried an LTS kernel instead (present on the live ISOs)? I know 6.12 was busy adding new support for Lunar Lake, maybe an older kernel is more stable?
It is possible your system being systemd has a weird interaction with our expectations, perhaps a different sharing scheme on the mounts for example would have a different effect. So I'd hope to find a solution involving just the ISOs that are published.
I don't see an option to boot the LTS kernel from the live iso (maybe I'm misunderstanding your suggestion). I only see 6.12.11 which never makes it to tty.
Edit: I managed to get an ISO with 6.12.36 but that also never made it to tty. It does boot with graphics disabled but I'm worried I won't be able to get to a working boot after install unless I can upgrade the kernel through chroot somehow before first boot
There is also hrmpf which is built on mklive and definitely has the LTS kernels available
I had same issue. Modified mklive.sh to add lazy unmount as a fallback:
umount_pseudofs() {
for f in sys dev proc; do
if [ -d "$ROOTFS/$f" ]; then
if ! umount -R -f "$ROOTFS/$f"; then
info_msg "Regular unmount failed for $ROOTFS/$f, trying lazy unmount..."
umount -l "$ROOTFS/$f" || {
info_msg "ERROR: failed to unmount $ROOTFS/$f/"
return 1
}
fi
fi
done
}
Not sure if this is good practice but I have an ISO with 6.15.9 now.
I'm also experiencing this issue, and FWIW it doesn't seem to have anything to do with building with a newer kernel.
I'm on an up-to-date Void installation with kernel 6.17.8_1, and running sudo ./mklive.sh -a x86_64 -r https://repo-default.voidlinux.org/current produces a similar error:
dracut[I]: *** Creating initramfs image file '/boot/initrd' done ***
[7/11] Generating isolinux support for PC-BIOS systems...
[8/11] Generating GRUB support for EFI systems...
[9/11] Cleaning up rootfs...
[10/11] Generating squashfs image (xz) from rootfs...
umount: /home/ivan/Work/void-mklive/mklive-build.ub3ha/image/rootfs/dev/shm: target is busy.
ERROR: failed to unmount /home/ivan/Work/void-mklive/mklive-build.ub3ha/image/rootfs/dev/
umount: /home/ivan/Work/void-mklive/mklive-build.ub3ha/image/rootfs/sys: not mounted
ERROR: failed to unmount /home/ivan/Work/void-mklive/mklive-build.ub3ha/image/rootfs/sys/
This is on current master of this repo (906652a).
In my case it attempts to unmount /dev/shm, while /sys appears to be unmounted.
The workaround by @nerdyslacker does allow the script to continue and the ISO is created, but it also unmounts my actual /dev/shm, which causes other problems on my system.
Can someone look into this issue, please? 🙏
UPDATE: OK, here's what worked for me:
mount_pseudofs() {
for f in sys dev proc; do
mkdir -p "$ROOTFS"/$f
mount --rbind /$f "$ROOTFS"/$f
mount --make-rslave "$ROOTFS"/$f
done
}
umount_pseudofs() {
for f in sys dev proc; do
if [ -d "$ROOTFS/$f" ] && ! umount -R -l "$ROOTFS/$f"; then
info_msg "ERROR: failed to unmount $ROOTFS/$f/"
return 1
fi
done
}
The second mount --make-rslave command was crucial to make the umount not propagate to the real mountpoints.
And doing a lazy unmount as @nerdyslacker suggested is the way to go, but I found that simply changing umount -f to umount -l did the trick.
Hope this helps someone else. It would be great if this could be reviewed and fixed properly on master.