How to reinstall Grub bootloader using a live usb Kali Linux UEFI
Found this old pretty bad video on my Google Drive i had recorded and dont ask why i miss write normal chars like / or – etc its couse its english keyboard when booted from usb and damn its f**ked. Also no need to mount efivars if you’re not using UEFI BIOS. Also noticed i wrote sudo in root terminal which was probably the couse i couldn’t install grub-update but had it from earlier when updating grub boot config file.
Commands:
fdisk -l #list partions
sudo mount /dev/sda2 /mnt #in my case /dev/sda2 use your filesystem
sudo mount /dev/sda2 /mnt/boot #if you have a separate /boot partition
sudo mount /dev/sda2 /mnt/boot/efi #if you have a separate /boot/efi partition
sudo mount /dev/sdXV /mnt/home #if you have a separate /home partition
sudo mount –bind /dev /mnt/dev
sudo mount –bind /proc /mnt/proc
sudo mount –bind /sys /mnt/sys
sudo mount –bind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars #if you have UEFI and get efi variable errors
sudo chroot /mnt
grub-install /dev/sda2 or grub-install –target=x86_64-efi –efi-directory=/boot/efi –bootloader-id=GR #depending if using BIOS or UEFI first should work for both otherwise use 2nd
update-grub
exit
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt
reboot
[ad_2]
source