Created
October 30, 2018 15:11
-
-
Save adde88/d18d8b9f95cc40d4d12653d5d6d00eb4 to your computer and use it in GitHub Desktop.
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 | |
# Private script i use while booting a Live distribution of Linux (Kali) | |
# to fix my grub. Windows seems to be removing it every now and then. | |
# Which is annoying as hell... | |
# Feel free to customize it to your own needs if nessecary. | |
# At least the correct root partition and EFI partition needs to be edited. | |
# Zylla - <[email protected]> | |
# | |
sudo mount /dev/sda6 /mnt | |
sudo mount /dev/sda2 /mnt/boot/efi | |
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B /mnt$i; done | |
sudo chroot /mnt | |
grub-install /dev/sda | |
update-grub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment