0

I've dual booted my laptop to run both Windows & KDE Plasma. I had to install Ubuntu on an external SSD. After doing so I can't boot into my linux anymore. It instead boots into the grub terminal. When I connect the external hard drive then the bootloader opens correctly and I can boot into my linux. If I unplug the external SSD then my linux still works fine. But when I reboot (with the ssd unplugged) then it boots into Grub terminal again...

I've tried fixing it with Boot Repair which gives me an error. The log of my boot repair can be found here:

http://paste.ubuntu.com/p/yjxGVBbPXd/

Does anyone know what I can do to fix my bootloader?

2 Answers2

0

Grub has the requirement that every drive connected to the machine when it was run has to be present when you boot it again, even if it has nothing to do with the system you are to load getting loaded. Here is your problem from the the report.

 => No boot loader is installed in the MBR of /dev/nvme0n1.
 => No boot loader is installed in the MBR of /dev/sda.

Use the command below then as root or with sudo in front of the command. It appears you have secure boot enabled as this is the command the boot-repair uses but fails with because the external was not found but is still in the device map, I added the recheck option to make it scan again with the command used by the program. You do these commands while booted into your install containing the Linux while you have disconnected the external drive. This will re-install it to the drive and allow you to boot it on its own.

grub-install --recheck --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot /dev/sda
update-grub

Hopefully it works on the next reboot for the system. These commands are used in the Terminal. Now I have read it again it says the secure boot is disabled which confuses me a bit as to why the command included it in the first place you may want to remove it for the first try, if it fails then put it back in the command for a second attempt.

0

I've managed to solve the problem! I made a small 8gb partition on my own ssd on which I installed Ubuntu. After doing so the bootloader is back, and I can select all my previous installed operating systems.

Thanks for thinking along!