Last active
December 28, 2021 11:51
-
-
Save suuhm/122ae31cd72b7b8f94ab36a4a47000cd to your computer and use it in GitHub Desktop.
Kali / Ubuntu / Debian Linux update efi grub/ grub2 bootloader and set correct bios systime
This file contains hidden or 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/bash | |
# | |
# Kali / Ubuntu / Debian Linux update efi bootloader and set correct bios systime | |
# (C) 2021 suuhm | |
# | |
apt clean; apt update && apt install os-prober ntpdate | |
echo "Set up correct time:" | |
ntpdate pool.ntp.org && hwclock --systohc | |
sleep 2 | |
echo "check" | |
efibootmgr -v | |
sleep 2 | |
blkid ; echo | |
echo -n "Input BLKUUID: (y/n): " ; read -r BKL_UUID | |
echo "Set up GRUB now:" | |
sleep 2 | |
cat << EOF >> /etc/grub.d/40_custom | |
menuentry "Windows 10 EFI-LOADER" { | |
search --no-floppy --set=root --fs-uuid $BKL_UUID | |
chainloader /Windows/Boot/EFI/bootmgfw.efi | |
} | |
EOF | |
update-grub; update-grub2 | |
echo "Done, pls reboot now" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment