From: Ian Kelling Date: Tue, 3 Sep 2024 06:03:54 +0000 (-0400) Subject: fix btrfs in initramfs X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=4f036ae1a0a4376282f281b9467470b775c6ac4e;p=automated-distro-installer fix btrfs in initramfs --- diff --git a/fai/config/package_config/STANDARD b/fai/config/package_config/STANDARD index 63b198f..afbefab 100644 --- a/fai/config/package_config/STANDARD +++ b/fai/config/package_config/STANDARD @@ -36,6 +36,7 @@ xz-utils lvm2 keyutils cryptsetup +btrfs-progs sudo bridge-utils netcat-openbsd diff --git a/fai/config/scripts/IANK/11-iank b/fai/config/scripts/IANK/11-iank index 40f024b..a10a5bb 100755 --- a/fai/config/scripts/IANK/11-iank +++ b/fai/config/scripts/IANK/11-iank @@ -386,6 +386,19 @@ esac #### begin btrfs-progs +# we want these files from the package: +# /usr/share/initramfs-tools/hooks/btrfs +# /usr/share/initramfs-tools/scripts/local-premount/btrfs +# everything else, seems better to take from upstream package. +for f in $(dpkg-query -L btrfs-progs | gr '/man/|^/s?bin/|^/usr/lib/udev') ; do + if [[ ! -f $f ]]; then + continue + fi + # use --no-rename so that I don't need to track whether this was the first + # btrfs-progs install. + $ROOTCMD dpkg-divert --no-rename --local --add $f +done + ## using dev version for bug fix temporarily. when done, set this to false, ## and we can stop copying it in fai-redep. static_ver=true @@ -427,15 +440,19 @@ if [[ $ver != "$cur_ver" ]]; then if [[ $FAI_ROOT == / ]]; then cd $bp_dir make install + mv /usr/bin/{fsck,mkfs}.btfs /usr/sbin/ else mkdir -p $target/tmp/bprogs mount -o bind $bp_dir $target/tmp/bprogs # pre-build. in t11: # ./autogen.sh && ./configure --disable-documentation --prefix=/usr && make - # in t12, we have the docs prerequisites, so enabled documentation + # in t12, we have the docs prerequisites, so enabled documentation. + # We won't have the latest docs in t11, i could install them from the t12 + # build dir, but meh. $ROOTCMD bash -xe <