I accidentally removed the BIOS boot option for Linux, but fortunately, I found this very detailed guide on how to restore the GRUB bootloader for Linux.
I believe this will work in most cases, even after installing the Windows bootloader, which usually overwrites Linux boot settings.
Below are some notes after I did this (more details in the link above):
Create an Ubuntu boot disk. The download (6G) is usually fast, but the slow part is writing to the boot USB (which took 20 minutes for me). See how to create a Rufus boot disk (on Windows) here.
Find the Linux partition:
sudo fdisk -l
sudo blkid
Check for EFI boot:
sudo fdisk -l
(look for a partition with the type 'EFI System').Mount your partition:
sudo mount /dev/sdXY /mnt
This is needed tochroot
into your Linux mount later.Bind mount necessary directories:
for i in /sys /proc /run /dev; do sudo mount --rbind "$i" "/mnt$i"; done
If you have EFI boot:
sudo mount /dev/sdXY /mnt/boot/efi
Chroot:
sudo chroot /mnt
Update GRUB:
update-grub
After this step, you may restart if it's fixed. Otherwise, continue to step 9.Reinstall GRUB if not fixed:
grub-install /dev/sda
(to detect and add Windows to the GRUB menu).
update-grubCheck if the EFI UUID is correct, and update it if needed:
blkid | grep -i efi
grep -i efi /etc/fstabFinish:
exit
sudo reboot
There are many steps, but the detailed instructions make them easy to follow. It's easy to Google any terms you don't understand, so don't worry.
I hope this helps fix your Linux system!
Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.