I have a laptop running Linux Mint and decided to give Ubuntu 17.10 a try. I wanted to go absolutely safe, so removed my HDD (actually an SSD, but shouldn't matter) and replaced it with a spare one (an older one that I was not using any more). I installed Ubuntu 17.10 on the spare drive and it works fine, but I would like to migrate to it later, since it's a longer process.

So for the time being I would like to go back to my old Linux Mint, which should be easy, since the original disk is intact. However, after swapping back the disks, I was utterly surprised to find that it does not boot up. The BIOS gives me a boot device selector menu, which contains four entries:

  • [the model number of my drive]
  • Debian
  • Ubuntu
  • Linux Mint

None of which work (no error message, just returning to the same list). Booting up the live CD image from a USB disk I could confirm that my original disk works correctly. I can't fathom how installing Ubuntu could have made my original system unbootable when my system disk was physically removed from the laptop during the install process. I haven't modified any BIOS settings either.

My only guess is that it has to do with EFI/UEFI, which I have always considered black magic and don't really understand. I believe the OS names in the BIOS boot device selector come from UEFI and the fact that it lists Ubuntu suggests that installing Ubuntu may have had some effect on some BIOS state...?

Can someone explain this mystery to me and how I can fix it? Thanks!

  • in your EFI firmware settings, check the boot settings. If it has an OS boot option select Linux Mint instead of ubuntu
    – ravery
    Oct 20 '17 at 6:52
  • When you remove the Mint disk during the installation, Ubuntu cannot see Mint, and there will be no entry for it in the grub menu. But you can fix that afterwards. Boot into Ubuntu (with the Mint disk connected) and run the command sudo update-grub. Now, when you reboot, there should be a menuentry for Mint (in the grub menu).
    – sudodus
    Oct 20 '17 at 8:26
  • Thanks for the hints, I figured it out in the meantime. It was crazier than I imagined, I posted my findings as an answer.
    – Zoltan
    Oct 20 '17 at 8:28

After a lot of investigation, finally I figured it out. This article describes that UEFI uses NVRAM to store some state, as I suspected. I also found that I can use the efibootmgr command to interact with this state.

Using the command efibootmgr -v I could see that the entry named ubuntu points to the Ubuntu 17.10 EFI disk and the one named linuxmint points to a non-existent disk. From this article I learned that "Linux Mint uses an EFI boot directory named ubuntu, which obviously conflicts with what Ubuntu itself uses". So the entry named linuxmint was a red herring, both Ubuntu and Linux Mint use the entry named ubuntu, and since this list is stored in the computer itself, Ubuntu overwrote the entry for Linux Mint, even though the Linux Mint boot drive was removed during install.

The solution was to add a new entry to the list using efibootmgr that references the correct EFI partitions.

This behaviour of UEFI is insane. An HDD should be able to fully encapsulate a bootable OS. This is no longer the case with UEFI, you also have to have do some tweaking in the UEFI NVRAM of the computer. You can no longer swap boot disks freely between computers.

  • I agree that UEFI makes things difficult for people who want to do things beyond using Windows and only Windows.
    – sudodus
    Oct 20 '17 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.