Booting linux with nvme drives in UEFI mode

⇠ Back to Blog:Tech

The paradigm for booting systems changed in 2005 or so. The venerable BIOS increasingly gets replaced by UEFI (Unified Extensible Firmware Interface) that provides more support to basic functionalities (including advanced graphical/mouse support), which, however, comes at the price of increased complexity for linux systems. We are now back in the era where the boot loading sequence is one of the serious challenges of setting up a linux system (LILO had greatly simplified it and by the time of Grub, it was fairly automatic already).

My Dell XPS computer comes with nvme hard drive, which are a headache for old-style (so-called legacy) booting.

I installed kubuntu by booting from USB in UEFI mode. You achieve this by pressing F2 when the DELL logo shows up and in Boot Option, select UEFI. Secure mode will surely have to be disabled. The default installer fails. My solution is to run boot-repair after the installer crashes (you need internet connection)

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update 
sudo apt-get Media:Example.ogginstall -y boot-repair && boot-repair

Boot-repair comes with problems of its own, along the lines of

Please enable a repository containing the [...] packages in the software sources of ... Then try again.

Generating the report (pasted in in my case) and looking at the error, it shows where the software is looking for sources.list. It is then just a matter of locating it (locate) and symlink, then run again. In my case, that required:

sudo ln -s /etc/apt/sources.list /target/etc/apt

Following the steps boot-repairs advises you to take successfully installs the boot-loader.