Changed the UEFI motherboard on a dell laptop, now it says no OS detected
My laptop was running the latest Ubuntu, because of a minor issue, the motherboard was replaced. The new motherboard has the same specifications as old. But after replacing, the OS is not detected.
- Is there some setting in BIOS which can fix the issue or should I really re-install Ubuntu?
- If I re-install Ubuntu, will I lose the data?
Help appreciated.
Solution 1:
The path to Ubuntu efi loader should be added to your motherboard UEFI.
Boot from Ubuntu LiveUSB and run in terminal:
sudo efibootmgr -c -l "\EFI\UBUNTU\SHIMX64.EFI" -L ubuntu
Then reboot normally. You will get a boot option "ubuntu".
If your EFI partition is not the default /dev/sda1, then the command will look this way:
sudo efibootmgr -c -l "\EFI\UBUNTU\SHIMX64.EFI" -L ubuntu -d /dev/sdX -p N
where /dev/sdX
is the disk and N
is the partition number. If your EFI partition is /dev/sdb2, then it will look as -d /dev/sdb -p 2
.