Installed Manjaro or other Arch alongside other Distro, then Kernel Panic later

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,204
Reaction score
6,112
Credits
24,183
If you are running just Manjaro (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 Manjaro 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 Manjaro.

It has been said that the only way to prevent this circumstance is to be sure the Manjaro (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

  1. 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.
  2. 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-
    1. In Gparted, right click the root partition, click info
    2. In Terminal use blkid | grep -i (label of distro if labelled)
    3. Check for it in /etc/fstab
    4. Other means
  3. 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.
  4. 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.
  1. Either use touch to create the file custom.cfg and then your favourite text editor, or I just use nano as follows
  2. 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 "Manjaro - 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 Manjaro” if you wished.

Other than that, make sure the syntax matches exactly, including those two curly brackets.

3. Save and exit, or exit and save, the file, with it in (/boot/grub) or wherever your grub.cfg file is.

4. 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 Manjaro or your chosen Arch-based distro.

There will still be the other entry for Manjaro 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
 


smerral

New Member
Joined
Apr 23, 2022
Messages
2
Reaction score
0
Credits
19
Hi,
I was trying to dual boot Manaro with Linux Mint 20.3 and got the kernel panic. I'd almost given up when I found your instructions above. I followed them and it worked great for Manjaro KDE, so much appreciated. However, I really prefer the XFCE desktop, so I deleted KDE and installed XFCE, changing the UUID accordingly. Now my problem is this: When I hit the new custom entry in grub it takes me to the Manjaro boot menu. And if I try to boot from there it doesn't work. I don't even get the kernel panic, it just freezes and won't boot. So my question is, what's happening here and is there a way around it?
Cheers,
Brian
 

smerral

New Member
Joined
Apr 23, 2022
Messages
2
Reaction score
0
Credits
19
Update. OK, I appear to have solved this. Apparently I needed to change the boot device from ATA to AHCI. I can boot into both Linux Mint and Manjaro now, but my Windows 7 still requires ATA, so it means entering BIOS and changing the option whenever I need Windows. I'm not sure if there is a workaround, but as I don't use Windows often I can live with it. Thanks again, Wizard, for your solution to the original problem. :)
 
OP
wizardfromoz

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,204
Reaction score
6,112
Credits
24,183
Brian, my (not always) humble apologies, I had not noted your posts until now, maybe a glitch with notification.

And my lord, we are almost twins, I am September 27 1957 :)

I have a few things on my plate at the moment, but I would like to take a look further into this, if I can help.

Perhaps you can post a couple of screenshots/phone pix up here of what is happening, and if I am not back in a couple of weeks, put in

"Wizard .... whassa??"

Cheers

Chris
 
Joined
Jun 18, 2022
Messages
44
Reaction score
36
Credits
307
Dear wizardfromoz, THANK YOU!

OK, here's my setup. I have Manjaro Xfce installed, then installed Xubuntu 20.04 behind it. So, now you know what brought me to this thread.

Your solution worked like a charm! (Pun intended)
 
OP
wizardfromoz

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,204
Reaction score
6,112
Credits
24,183
That's great news @Worralorrasurfa and welcome to linux.org :)

Sounds like an Aussie name.

Feel free to swing by Member Introductions and meet a few more of The Gang.

Wiz
 
Joined
Jun 18, 2022
Messages
44
Reaction score
36
Credits
307
Sounds like an Aussie name.
You're close. It's the name of a town in Terry Pratchett's Discworld novel titled "The Last Continent".

In the beginning of the book it says:

"This is not a book about Australia. No, it's about somewhere entirely different
which just happens to be, here and there, a bit ... Australian."

I chose that as a user name because I think it would be highly unlikely that someone else would have it already.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Top