Files
grub-btrfs/initramfs/ubuntu/hooks/grub-btrfs-overlay
Luis Marsano d5541253d3 specialize overlay script & refactor
kernel parameters normally identify root filesystem as readonly before boot process remounts them writable, so the readonly parameter does not identify readonly filesystems
the script reduces scope to btrfs for simplicity
as a standard linux util, findmnt is copied & used
arrange commands so executables are checked before file system queries and short-circuit evaluation skips unavailable commands
for robustness, trap on error & exit events
replace panic with failure logging, since panic doesn't appear to break to shell
2022-12-20 20:23:38 -05:00

16 lines
211 B
Bash
Executable File

#!/bin/sh -e
PREREQ=
prereqs() {
echo "$PREREQ"
}
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
manual_add_modules overlay
copy_exec /usr/bin/findmnt /usr/bin