If you are running just EndeavourOS (or other Arch-based Distro) on your computer, or even dual-booting with Windows, and you then choose to install an additional Distro that is not Arch-based, then this article is for you.
If you are dual-booting or multi-booting even one more Linux that is not Arch-based, chances are you are going to come across a Kernel Panic.
It will occur following updates and upgrades executed on the non-Arch distro, which are sufficient to cause that distro to assume the spot of Primary Partition, that is, top of your Grub Menu.
This article applies to Grub only, although I would be interested to hear from rEFInd users and users of other bootloaders.
The packages updated and upgraded which will generate this change in order include but are not limited to some combination of the following:
Your kernel
Grub, grub-efi, grub-pc, grub-signed and so on
Shim, shim-signed
Some major firmware updates
Other (youâll find them, or they'll find you!)
Youâll reboot your computer, the other distro will now be in top spot and work fine, and then you key down to choose EndeavourOS and
Kernel Panic
The Kernel Panic will dump you to a black and white (tty-style) screen with output looking similar to the following
Kernel Panic â not syncing : VFS: unable to mount root fs on unknown-block(0,0)
This will be followed by a CPU reference, hardware name, a call trace, a Kernel Offset, and end with
â[ end Kernel Panic â not syncing : VFS: unable to mount root fs on unknown-block(0,0) ]â
You cannot exit or get a response other than to power down and start again, and this time not choose EndeavourOS
It has been said that the only way to prevent this circumstance is to be sure the EndeavourOS (or other Arch, Arch-based) Grub is in control.
That is not so.
It is simply a matter of generating a file called
custom.cfg
and storing it in your (/boot/grub) folder (could be (/boot/grub2) in some distro families) and an entry or entries for that will appear at the end of your Grub Menu once you reboot. No need to update Grub. Just do it.
I will now show you how to do this.
I will take the shortest way to summarising it, because I know there are users out there in need of this, and then I will fill out more detail for those generally and genuinely interested. So it may be a Thread in instalments.
PREPARATION
If you are a user of Timeshift, BackInTime, Snapper or similar system restore tool, first take a snapshot/image of whatever working OS you have operating and safeguard that.
Get the UUID of the root partition of your Endeavour or other Arch-based distro and have it handy, you will need to enter it. This can be obtained by a number of methods, including, but not limited to the following-
In Gparted, right click the root partition, click info
In Terminal use blkid | grep -i (label of distro if labelled)
Check for it in /etc/fstab
Other means
Decide what text editor, whether CLI or GUI, you want to use to make a small text file, and be aware that the resulting file will need to be placed in (/boot/grub), or specifically, in the folder where your grub.cfg file is stored.
This will require root privileges, for example sudo, or assuming root.to the non-Endeavour, non-Arch-based distro (for example boot into Linux Mint) that is in the primary partition (top) spot on your Grub Menu.
Boot to the non-Endeavour, non-Arch-based distro (for example boot into Linux Mint) that is in the primary partition (top) spot on your Grub Menu.
STEPS
A typical EXT4 UUID will be in the format of 32 digits and alphabetical characters, structured like this (8 then 4 then 4 then 4 then 12, separated by dashes)
7b52a802-aa6d-4aa2-aab5-5dffbe6833c6
For this exercise I will use
nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn
and you substitute the value by copying/pasting the result you got from Prep Step 2. 1.-4. above.
Either use touch to create the file custom.cfg and then your favourite text editor, or I just use nano as follows
sudo nano custom.cfg
and enter this text, where the string of nâs is the UUID for your Endeavour or other Arch-based distroâs root partition
menuentry âEndeavourOS - configfileâ {
insmod part_gpt
part part_msdos
insmod ext2
search --no-floppy --fs-uuid --set=root nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn
configfile /boot/grub/grub.cfg
}
The part in quotes in the first line is a choice for you, you could call it
âMy beloved EndeavourOSâ if you wished.
Other than that, make sure the syntax matches exactly, including those two curly brackets.
-
Save and exit, or exit and save, the file, with it in (/boot/grub) or wherever your grub.cfg file is.
-
Reboot (no need to update grub)
If you have followed the above correctly, when you see your Grub Menu it will have an additional entry at the end saying what was in that first line. That is your new entry point to EndeavourOS or your chosen Arch-based distro.
There will still be the other entry for EndeavourOS in the ordered Grub Menu list, but if you choose that you will still encounter the Kernel Panic, so practise picking the end one.
I will have more to follow this, but this will get you going for now, and eliminate that Kernel Panic.
In upcoming Posts I will detail how this method compares with others, and why this occurs with Arch-based distros and not others.
Enjoy your Linux.
Wizard