Using the sd-btrfs-overlayfs hook
Background, I have 2 LUKS encrypted NVMe drives that make up my BTRFS filesystem, so I have to use the systemd
and sd-encrypt
hooks to decrypt these during boot, else I would use udev
and btrfs-overlayfs
. I am using using a UKI and Secure Boot.
I added sd-btrsfs-overlay
to my HOOKS=()
in /etc/mkinitcpio.conf
HOOKS=(systemd autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt filesystems sd-btrfs-overlayfs)
Then I run sudo limine-update
, and notice that there is a warning about potentially missing /usr/bin/env
. I rebooted and tried booting into a snapshot,
I got some error output during boot regarding the:
Starting Setup OverlayFS on Root Filesystem
So I checked the systemd status
:
Sep 29 17:53:20 archlinux systemd[1]: Starting Setup OverlayFS on Root Filesystem...
Sep 29 17:53:20 archlinux (fs-setup)[468]: overlayfs-setup.service: Failed to execute /usr/lib/limine/overlayfs-setup: No such file or directory
Sep 29 17:53:20 archlinux (fs-setup)[468]: overlayfs-setup.service: Failed at step EXEC spawning /usr/lib/limine/overlayfs-setup: No such file or directory
Sep 29 17:53:20 archlinux systemd[1]: overlayfs-setup.service: Main process exited, code=exited, status=203/EXEC
Sep 29 17:53:20 archlinux systemd[1]: overlayfs-setup.service: Failed with result 'exit-code'.
Sep 29 17:53:20 archlinux systemd[1]: Failed to start Setup OverlayFS on Root Filesystem.
So I thought this might be due to the missing /usr/bin/env
binary, added this to the list of BINARIES=()
in /etc/mkinitpcio.conf
, and rebooted again.
This time it complained about no mktemp
command, so I repeated and added /usr/bin/mktemp
to BINARIES=()
, and rebooted again. It then complained about missing mkdir
and rmdir
, so I added these binaries to the list as well.
This seemed to work however I know get an error about:
Sep 29 18:34:21 thinkpad systemd[1]: systemd-remount-fs.service: Failed with result 'exit-code'.
Sep 29 18:34:21 thinkpad systemd[1]: systemd-remount-fs.service: Main process exited, code=exited, status=1/FAILURE
Sep 29 18:34:21 thinkpad systemd-remount-fs[671]: /usr/bin/mount for / exited with exit status 32.
Sep 29 18:34:21 thinkpad systemd-remount-fs[673]: dmesg(1) may have more information after failed mount system call.
Sep 29 18:34:21 thinkpad systemd-remount-fs[673]: mount: /: fsconfig() failed: overlay: No changes allowed in reconfigure.
Sep 29 18:34:20 thinkpad systemd-remount-fs[545]: dmesg(1) may have more information after failed mount system call.
Sep 29 18:34:20 thinkpad systemd-remount-fs[545]: mount: /: fsconfig() failed: overlay: No changes allowed in reconfigure.
Sep 29 18:34:20 thinkpad systemd-remount-fs[536]: /usr/bin/mount for / exited with exit status 32.
Sep 29 18:34:20 thinkpad systemd[1]: systemd-remount-fs.service: Failed with result 'exit-code'.
Sep 29 18:34:20 thinkpad systemd[1]: systemd-remount-fs.service: Main process exited, code=exited, status=1/FAILURE
This only fails when booting into a snapshot.
I could be completely misunderstanding things, and not have setup things correctly, or maybe documentation is slightly lacking when using the systemd
hook?