Created
October 3, 2021 07:31
-
-
Save ShailMurtaza/3c8a5a3f98ddeb6ffedc21cde5c77780 to your computer and use it in GitHub Desktop.
How to reinstall GRUB bootloader
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
Those that have Legacy instead of EFI can go to step 4) | |
For EFI there is one extra step: Mount your EFI partition | |
mount /dev/sda1 /mnt/boot/efi | |
Sometimes errors like this can result: mount: /mnt/boot/efi: mount point does not exist. | |
To solve it create the efi directory in /mnt/boot/ using this command: | |
mkdir /mnt/boot/efi | |
then try to mount the efi partition again. | |
Now we have to chroot in the system (i let you google what chroot means :wink:) | |
chroot /mnt | |
Now that you are in you can just install the grub by typing this command: (grub-install ask for disk, not a partition so dont put any number like this: sda instead of sda1 | |
grub-install /dev/sda | |
then if no errors are chown you can just exit by typing: | |
exit | |
and reboot the system. Once the system is rebooted, run update-grub to be sure that any other OS is detected by the grub. | |
sudo update-grub | |
If you have any issue you can always ask here. | |
https://community.parrotsec.org/t/tutorial-installing-grub-using-live-usb/5672 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment