mklive: load dm-raid on boot if exists as a module

fixes: #239
This commit is contained in:
classabbyamp 2024-12-21 11:59:23 -05:00
parent 6a56ad61bb
commit 76018f0a95
No known key found for this signature in database
GPG Key ID: 6BE0755918A4C7F5
1 changed files with 12 additions and 2 deletions

View File

@ -122,6 +122,17 @@ install_prereqs() {
[ $? -ne 0 ] && die "Failed to install required software, exiting..."
}
post_install_packages() {
# Cleanup and remove useless stuff.
rm -rf "$ROOTFS"/var/cache/* "$ROOTFS"/run/* "$ROOTFS"/var/run/*
# boot failure if disks have raid logical volumes and this isn't loaded
for f in "$ROOTFS/usr/lib/modules/$KERNELVERSION/kernel/drivers/md/dm-raid.ko".*; do
echo "dm-raid" > "$ROOTFS"/etc/modules-load.d/dm-raid.conf
break
done
}
install_packages() {
XBPS_ARCH=$BASE_ARCH "${XBPS_INSTALL_CMD}" -r "$ROOTFS" \
${XBPS_REPOSITORY} -c "$XBPS_CACHEDIR" -yn $PACKAGE_LIST $INITRAMFS_PKGS
@ -147,8 +158,7 @@ install_packages() {
fi
chroot "$ROOTFS" env -i xbps-reconfigure -a
# Cleanup and remove useless stuff.
rm -rf "$ROOTFS"/var/cache/* "$ROOTFS"/run/* "$ROOTFS"/var/run/*
post_install_packages
}
ignore_packages() {