2023-08-31 12:00:20 +02:00
|
|
|
#!/bin/bash
|
2023-08-30 20:48:55 +02:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2023-08-30 22:44:09 +02:00
|
|
|
touch /etc/vconsole.conf
|
|
|
|
|
2023-10-19 17:46:52 +02:00
|
|
|
if cat /etc/vconsole.conf | grep -i 'KEYMAP='
|
|
|
|
then
|
|
|
|
true
|
|
|
|
else
|
|
|
|
echo "KEYMAP="us"" >> /etc/vconsole.conf
|
|
|
|
fi
|
|
|
|
|
2023-09-04 17:56:33 +02:00
|
|
|
# Add nvidia support if an nvidia card is detected
|
|
|
|
if lspci -k | grep -iEA3 '^[[:alnum:]]{2}:[[:alnum:]]{2}.*VGA|3D|DISPLAY' | grep -i nvidia && lspci -k | grep -iEA3 '^[[:alnum:]]{2}:[[:alnum:]]{2}.*VGA|3D|DISPLAY' | grep -i -E 'kernel modules|kernel driver' | grep -i nvidia
|
|
|
|
then
|
|
|
|
if cat /boot/refind_linux.conf | grep -i 'rd.modules_force_load'
|
|
|
|
then
|
|
|
|
true
|
|
|
|
else
|
|
|
|
sed -i "s#root=#rd.modules_force_load=nvidia,usbhid root=#" /boot/refind_linux.conf
|
|
|
|
fi
|
|
|
|
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
|