bcachefs-tools/initramfs/hook
Steinar H. Gunderson e9fec00f86 Make initramfs hook install mount.bcachefs
Now that the bcachefs tool unconditionally includes the mount parts
(or more correctly, you cannot build it at all if you don't have Rust),
we can call copy_exec on mount.bcachefs, to get the symlink installed.
In particular, this helps with mounting UUID mounts as /.

See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060411
for the remaining parts needed in initramfs-tools itself.
2024-02-04 14:44:54 +01:00

29 lines
563 B
Bash
Executable File

#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
manual_add_modules 'bcachefs'
# chacha20 and poly1305 are used for encrypted bcachefs filesystems.
add_loaded_modules 'chacha20[-_]*'
add_loaded_modules 'poly1305[-_]*'
# Add the bcachefs utility to the initramfs
# Note: make install replaces this with the install path, so it must be last
#copy_exec /usr/local/sbin/bcachefs /sbin/bcachefs
#copy_exec /usr/local/sbin/mount.bcachefs /sbin/mount.bcachefs