0

I am getting the following GRUB (2.06) error when trying to boot:

"Error: File "/vmlinuz" not found, Error: You need to load the kernel first"

error message written from memory so it might not be exact, but this is basically what it says.

For reference on my situation, I've followed this guide on how to make a custom grub screen:

Maintenance Free Custom Grub Screen

I've had this working fine in the past, but recently I attempted to restore from backup (successfully) the system which my grub install was loaded onto, after the backup my custom grub screen was lost. Tried to recreate it but get the above error when trying to boot into my custom entries. Interestingly enough the OSprober entries work just fine. I have 3 operating systems and all my partitions are labelled and I've verified the correct UUID's are written into the file in /etc/grub.d (06_custom)....

But my experience with GRUB is pretty limited so wondering where to start with troubleshooting from here? If it's not the wrong UUID what could it be?

  • You mention three OSes are involved; but give no details as to what OSes are involved. With a multi-boot environment you'll also have three Grubs installed (one for each OS unless another bootloader is used such as a windows install) so ensure you're dealing with the correct grub; as only one will be active and used in a normal boot (your machine firmware can control/influence this). You're without any actual specifics as to what system you're using (there are differences for example between OSes even when grub is same version!) – guiverc Mar 30 '24 at 23:10
  • They are all Ubuntu 22.04 at the moment, but I will probably end up updating at least one to Fedora. I do also have 3 separate partitions for grubs to be installed, and to my knowledge each OS does have it's own grub. I get a bit confused myself about which one is in control at any given moment though, as I have tried to do the "Custom grub screen" guide on all 3 operating systems, but it only actually worked when done on 1 of them, which is the one that was recently restored from backup. This lead me to believe that one of the three was functional and others idle on startup. – larakikato Mar 30 '24 at 23:13
  • Your machine firmware will dictate which is active if you have multiple drives (or in most cases where using uEFI to boot), but it's usually the last installed or last that ran grub-install (as long as it was installed to the drive that matches your firmware setting!). You can easily change which is in control though do note many GNU/Linux systems do not by default search for other systems (grub 2.06 & later); Ubuntu carries patches to continue what was earlier behavior (thus does scan other disks/partitions) so behavior varies slightly (2.06 & later) between OSes. – guiverc Mar 31 '24 at 00:30
  • I have used the custom entries in 40_custom or 06_ for years. But first started by copying os-prober's entries into 40_custom. More examples: https://ubuntuforums.org/showthread.php?t=2392441&p=13816046#post13816046 I now like to use labels & configfile type entries. Use labels and configfile to boot another install in 40_custom https://askubuntu.com/questions/344125/how-to-add-a-grub2-menu-entry-for-booting-installed-ubuntu-on-a-usb-drive/344359#344359 But last install or major grub update will make that install first in boot order. I keep main working LTS install as default. – oldfred Mar 31 '24 at 02:35

0 Answers0