Ubuntu – No Boot Device Found

The Pain

This shouldn’t be this hard. 😀 The opening lines of another persons blog who experienced the exact same pains I experienced today, the difference?!

I learnt the actual root cause (which I will be sharing with you all) and I learnt something. Which is always nice, and probably be remembered… cause the more painful… the more memorable. So lets get started!

The Story

I have recently setup a camera recording server at my work using Shinobi (another blog is in bound, just you wait!) S omy goal was to give it dedicated hardware over it being a VM to reduce the CPU impact on other servers and services.

Grab Ubuntu live 18.04.2 LTS server edition. How you decide to boot this image is on you, Create a USB image with etcher or rufus, go nuts, burn an actual DVD sure why not, use an amazing device called the IODD (seriously get one… it’ll save you hours of burning/imaging time, and discs).

Boot, run through the installer, and….

No Boot device found…

Uhhhhhh what? OK…. I’m sure I picked the right drive, and there’s only one drive installed in the laptop… and it’s the only one in the boot options… and the only one that was available in the installer… what gives?

BIOS or UEFI

The first logical area to guess was what the BIOS/UEFI was setup to do for it’s boot options. As the source blog mentions the HP BIOS is not all that great or intuitive so it was casuing me some grief. However, at first I just wanted Ubuntu to boot. I don’t care how!

BIOS (Legacy)

So I set the HP boot option to Legacy (No UEFI features what so ever, boot you bugger!)

Booted GParted Live x86, fried all partitions leaving a clean allocated disc.

Booted Ubuntu-Live-Server-18.04.2, install….

No Boot Device… WTF!!!

OK, I have legacy, it creates a 1MB bootloader partition, but it won’t boot…

I spent a while talking to people on #Ubuntu on Freenode IRC but wasn’t getting much further in a solution although many great people there were trying everything they could think of to help. However, as usual I just kept narrowing my google searches…

After multiple dead ends, I found this one, and it was exactly the next thing I was going to try anyway as I saw the option on Ubuntus website..

The Alternate Installer

So I downloaded the alternate installer which turns out also to be an offline installer and doesn’t require an internet connection either to install. To my amazement just like the source link. The alternate installer worked and the bootloader seems to have created the required GRUB somewhere on the main partition instead of a separate 1MB bootloader partition? (from my memory of the wizard, I’ll have to double check as I no longer using this build).

Nice! But then how do i get UEFI to work… there must be something I’m missing here…

EFI

So going back to the source Blog at the top that stated this shouldn’t be this hard, and he’s right by the way. The only reason this is hard, is for one reason… My own stupid ignorance. So let’s learn something.

Unfortunately he isn’t exactly sure what the issue is or what the solution is, cause really even after clearing my drive I was still getting No Boot Device even on brand new clean drives, so believe it or not, that is not 100% the problem, although I do agree when jumping between UEFI and BIOS OS’s installations on the same disc, or using any disc… clean it! (Either Diskpart CLEAN, or dd some zeros). Seriously it’s not about the parittions in this case, although having none is nice when going new. It’s about clearing the MBR.

With a new or uninitialized disc there won’t be a MBR or GPT and it will be usually created by the installers using (I’m assuming parted (for linux) and diskpart (for windows)). Now normally I would notice a difference in the bootloader right away in most distros when I would switch between UEFI and BIOS (Legacy mode), however in this case I noticed the same boot all the time. Until I set the settings to factory defaults, then it showed a different boot type (like it was finally booting the UEFI boot image that it was suppose to the whole time).

So what actually changed?!?!?!

To CSM or not to CSM

I had to double check what this exactly was, once this reminder was brought to me it’s like the light bulb went off. I checked the boot options, and was now using UEFI without CSM (native). While the setting I was usually switching between was UEFI with CSM, so it was booting the legacy Ubuntu installer, but creating a UEFI bootloader partition. You’d figured cause it’s still a UEFI boot partition and the BIOS boot settings where UEFI w/ CSM that it boot UEFI still without issue, but that was not the case. Once it was set to UEFI w/o CSM it sort of booted….

System BootOrder not found

UEFI you sure can be a PITA you know that! alright so I manged to get this message in the really fast boot loop it got stuck in after I finally got Ubuntu installed via UEFI.

However, it turned out if I smashed F9 to change boot order, I could see ubuntu actually listed in the boot menu, and no matter how I edited the UEFI boot order in the BIOS itself it wouldn’t boot automatically. If I selected it from the menu directly it booted… but not on it’s own. What gives now?

Secure Boot Keys

In this case Secure boot was still enabled, and it had been set with a set list.

I basically Disabled secure boot, cleared the secure boot keys and rebooted.

I’ll double check if I had re-enabled it (I should). however this was enough to get Ubuntu to boot without intervention.

Summary

I like learning, and it took me only a couple hours vs days unlike the source blog I shared. but still….. PAINFUL

  1. Check your BIOS settings (ensure UEFI no CSM)
  2. Your Drive is CLEAN! (No old Windows MBR or partitions)
  3. Disable Secure boot, and wipe old keys, then re-enable.

Leave a Reply

Your email address will not be published.