Changing bootloader target on a Chrultrabook using RW_LEGACY firmware

564 words, 3 min read

TL;DR

If you’ve recently installed Linux on a Chromebook via the RW_LEGACY method and Coreboot throws you into a useless grub menu, you can always boot your selected Linux by using the “Boot from File” boot option, and to automatically boot into Linux via Coreboot, ensure that the grub bootloader provided by Linux is accessible at /boot/efi/EFI/BOOT/BOOTX64.efi (source).

The Outrageous Value of Chromebooks running Linux

I recently added a Dell Latitude 5430 Chromebook to my already-too-large laptop connection. Why? Not because I have any interest in using ChromeOS, but rather because, using MrChromebox’s coreboot firmware for chromebooks and the excellent Chrultrabook documetnation, you can install Linux on them!

In addition, they’re a screaming deal; I paid $160 on eBay for it, and got a Intel Core i7-1255u, 16GB of RAM, and a touchscreen. Better yet - it arrived in extremely good condition; I’m not convinced that anyone’s ever used it, and in ChromeOS the battery cycle count was zero.

I chose to use the RW_LEGACY method of installing alternative firmware because I didn’t feel like opening up the laptop to disconnect the power, so I was left with the developer mode bootscreen. Not the biggest deal, I rarely restart my laptops anyway (usually, I suspend). Pretty quickly, I was able to enable developer mode and flash the alternative firmware.

Then, I installed OpenSUSE Tumbleweed (fun fact, OpenSUSE was actually the first Linux distro that I ever installed, on my mom’s old hand-me-down work laptop), restarted, chose the alternative bootloader according to the instructions, and… was presented with an Grub menu of five different options, none of which worked?

So - what it turns out is happening is that ChromeOS itself ships with this vestigial grub config, and none of those options are really meant to do anything. What I’d like to do instead is for the default grub config to be the one that’s generated by OpenSUSE once you install it.

To whit - if you go into the coreboot firmware options by pressing ESC, choose boot options, and then boot from file, you can find the grub EFI executable for OpenSUSE and start a boot from that. Exploring through this menu really helped me to understand how EFI boot works. There’s also an option to add a new boot option, which I tried to point to the OpenSUSE grub, but when I restarted, it had reset itself?

As it turns out, the boot options are stored in NVRAM, and if you flash RW_LEGACY, that section of NVRAM is not write accessible. So that won’t work - what ultimately did work was a suggestion from the AskUbuntu StackExchange, which in turn cites a FAQ from the MrChromebook site. What’s happening here is that OpenSUSE installs the bootloader in a slightly different location than Coreboot is expecting. I simply backed up the existing vestigial grub bootloader and copied the one that OpenSUSE installed to the expected location - /boot/efi/EFI/BOOT/BOOTX64.efi.

Score another win for StackOverflow - this is the second time in a month that it’s been able to provide The Correct Answer for an arcane linux question that I had. Out of curiousity, I asked ChatGPT about this same issue and it wasn’t able to provide any useful answer; it suggested confirming that the grub config was correct, which of course doesn’t make sense since the problem is that Coreboot is invoking the wrong bootloader.


This work is licensed under CC BY-NC 4.0