2023-08-31 12:00:20 +02:00
#!/bin/bash
2023-08-30 20:48:55 +02:00
set -e
2023-08-30 22:24:30 +02:00
ln -sf /usr/lib/x86_64-linux-gnu/libaio.so.1 /usr/lib/libaio.so.1
ln -sf /usr/lib/x86_64-linux-gnu/libblkid.so.1 /usr/lib/libblkid.so.1
ln -sf /usr/lib/x86_64-linux-gnu/liblz4.so.1 /usr/lib/liblz4.so.1
ln -sf /usr/lib/x86_64-linux-gnu/libzstd.so.1 /usr/lib/libzstd.so.1
ln -sf /usr/lib/x86_64-linux-gnu/libpthread.so.0 /usr/lib/libpthread.so.0
ln -sf /usr/lib/x86_64-linux-gnu/libgpg-error.so.0 /usr/lib/libgpg-error.so.0
ln -sf /usr/lib/x86_64-linux-gnu/libgcrypt.so.20 /usr/lib/libgcrypt.so.20
ln -sf /usr/lib/x86_64-linux-gnu/libcap.so.2 /usr/lib/libcap.so.2
ln -sf /usr/lib/x86_64-linux-gnu/libsystemd.so.0 /usr/lib/libsystemd.so.0
ln -sf /usr/lib/x86_64-linux-gnu/libmd.so.0 /usr/lib/libmd.so.0
ln -sf /usr/lib/x86_64-linux-gnu/libbsd.so.0 /usr/lib/libbsd.so.0
ln -sf /usr/lib/x86_64-linux-gnu/libtinfo.so.6 /usr/lib/libtinfo.so.6
ln -sf /usr/lib/x86_64-linux-gnu/libedit.so.2 /usr/lib/libedit.so.2
ln -sf /usr/lib/x86_64-linux-gnu/libm.so.6 /usr/lib/libm.so.6
ln -sf /usr/lib/x86_64-linux-gnu/libudev.so.1 /usr/lib/libudev.so.1
ln -sf /usr/lib/x86_64-linux-gnu/libc.so.6 /usr/lib/libc.so.6
ln -sf /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 /usr/lib/libpcre2-8.so.0
ln -sf /usr/lib/x86_64-linux-gnu/libselinux.so.1 /usr/lib/libselinux.so.1
ln -sf /usr/lib/x86_64-linux-gnu/libdevmapper.so.1.02.1 /usr/lib/libdevmapper.so.1.02.1
ln -sf /usr/lib/x86_64-linux-gnu/libdevmapper-event.so.1.02.1 /usr/lib/libdevmapper-event.so.1.02.1
2023-08-30 22:21:17 +02:00
2023-08-30 22:44:09 +02:00
touch /etc/vconsole.conf
2023-08-31 12:00:20 +02:00
# Use the first crypttab entry as luks for booster (valid for calamares and probably most installers)
if cat /etc/crypttab | grep -v '^#' | head -n1 | cut -f2 | grep -i "UUID="
then
sed -i "s#root=#rd.luks.name="$(cat /etc/crypttab | grep -v '^#' | cut -f2 | sed "s#UUID=##")"="$(cat /etc/crypttab | grep -v '^#' | cut -f1)" root=#" /boot/refind_linux.conf
else
echo -e "ERROR 1: /etc/crypttab is invalid!\nFirst crypttab entry (presumed to be root luks) is not defined via UUID\nPlease make sure to define luks for root as the first entry in /etc/crypttab via UUID (use blkid)"
exit 1
fi
2023-08-30 20:48:55 +02:00
cp -f /usr/lib/booster/update-initramfs /usr/sbin/update-initramfs
chmod +x /usr/sbin/update-initramfs
update-initramfs -c -k all
2023-08-30 20:54:14 +02:00
rm /boot/initrd.img* || true