Last active
May 2, 2022 06:47
-
-
Save a2nt/a4878e5fa85859f80b0cd1dfb561cc75 to your computer and use it in GitHub Desktop.
EASY Debian Linux UEFI setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
############## EASY Debian Linux UEFI setup ############## | |
# | |
# Moves latest kernel dracut EFI to Linux.efi | |
# To ease BIOS setup | |
# | |
# NOTE: By default EFI partition is mounted at /boot/efi | |
# | |
### INSTALL | |
# 1) Place GIST at /etc/kernel/postinst.d/zz-update-efi | |
# 2) chmod +x /etc/kernel/postinst.d/zz-update-efi | |
# 3) apt install dracut | |
# 4) Create /etc/dracut.conf.d/10-debian.conf | |
# | |
# hostonly=yes | |
# | |
# uefi=yes | |
# uefi_stub=/usr/lib/systemd/boot/efi/linuxx64.efi.stub | |
# | |
# 5) Setup your BIOS to boot /EFI/Linux/Linux.efi | |
########################################################### | |
LAST_KERNEL=$(ls /boot/efi/EFI/Linux | sort -V | tail -n 1) | |
if [ "$LAST_KERNEL" != "Linux.efi" ]; then | |
echo "Found last kernel EFI ... "$LAST_KERNEL | |
echo "mv "$LAST_KERNEL" to Linux.efi" | |
mv /boot/efi/EFI/Linux/$LAST_KERNEL /boot/efi/EFI/Linux/Linux.efi | |
else | |
echo "Current kernel is linked already" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment