Manjaro - Kernel Panics and Other Tips for Arch-based Distros

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
9,975
Reaction score
8,874
Credits
45,255
WIZARD'S RECOMMENDED READING

https://www.linux.org/threads/question-about-partitioning-sdd-after-os-is-installed.19701/

BACKGROUND

At the above link, Member Jeffrey has a laptop with two drives in it - a 256 GB Micron SSD (Solid State Drive) and a 1 TB Seagate HDD.

He is dedicating it purely to Linux use, and started off installing Manjaro 17 GNOME on it, which worked, on the SSD (/dev/sdb) and then went to install Linux Mint 19 'Tara' Cinnamon on the HDD (/dev/sdba).

Jeffrey is keen to try multibooting, and I can certainly appreciate that, lol.

We knew in advance what would happen, and that is this,

Effectively, Manjaro is a brilliant Distro, but it does not like to share with other Linux. This has been the case for some years now. It took us some time, together, to get his LM Cinnamon set up on the HDD, and the outcome, as was to be expected, is that he gets a Grub Menu featuring the new, Linux Mint, on top, with Manjaro as a 2nd choice.

The Mint works fine, but if you try to boot the Manjaro, it falls over with a Kernel Panic.

This will likely look something like this

9TzdG79.jpg


SCREENSHOT 1 - MANJARO KERNEL PANIC

There is no way out of this screen other than to power down.

There is a short fix for this, and a longer-term fix and I am going to cover both here.

But (Wizard's But is always lurking, and sometimes juxtaposed with his head) - I want to get Jeffrey up and running with his 2nd distro asap, so we'll take the fast track, and then I will cover both options in more detail.

Short Fix next.

Wizard
 


SHORT FIX

The short-term fix is to get you into the Distro asap.

It may be that you have mission-critical software, a Project, on the Manjaro, that you cannot necessarily access nor print off (you may not have set up Printers yet) on your alternative Distro, so you need to get into Manjaro. Or the Boss will have your head on a plate?

With the short fix, you could actually perform it every time, but that would likely be tedious.

The short fix will only work for the Session that it gets you into, and you will revert back to the Kernel Panic scenario once your power down or reboot. You could leave the computer on 24 x 7, and enjoy your Manjaro, but then you would not get to play/work with your new Distro or Distros that you are populating your computer with.

With nearly every Linux Distro I use, where there is a Grub Menu, you can expect to find some options at the bottom of your screen - C for a command line, E for edit commands, and Esc to take you back to a previous level.

For this first exercise, we will be looking to E - edit, to get us into a session.

We need to be armed with a couple of items of information when we go troubleshooting, and in this case it is essential to have
  1. The version of your Linux Kernel
  2. ..., and later in this Thread, the UUID (Universally Unique IDentifier) for your Distro's / root partition, housing your operating system files and folders.
You can get these as follows, from the other Distro that still works, or you can use an install (Live) medium to harvest the information:

  • At Terminal
    Code:
    uname -r
    ... will give you your kernel name/number.
  • At Terminal
    Code:
    blkid
    
    #Ubuntu users use
    
    sudo blkid
    ... will give you the UUID for your Distro's system partition, copy the UUID, not the PARTUUID


So if Jeffrey arrows down to his Manjaro, and armed with that information, gathered from his Linux Mint, he can highlight the Manjaro entry and press E

This will show him a screen similar to this

DtlaqeH.jpg


SCREENSHOT 2 - COMMANDS OPTION FOR BOOTING MANJARO

Regrets for the lack of clarity on that one, must have twitched (too many years fighting Orcs and Goblins, arthritis kicks in, pressing the shutter button)

Down the bottom is where we are headed, with our arrow keys. Even non-Manjaro users may recognise intel-ucode.img as being a problem with other issues.

In this case, we can see that the Linux Kernel number is already available, and that is 4.9-x86_64 - but that 2nd-last line is not always there, so having the kernel number with you is good.

We replace the last part that says intel-ucode.img with initramfs-4.9-x86_64.img and we are good to go, so that will say

Code:
initrd /boot/initramfs-4.9-x86_64.img

We can then press Ctrl-x or F10, and Linux will take this command and reboot our computer into Manjaro, for a session.

If Jeffrey has the time, he could try this, and confirm or deny that it works.

I will move onto the longer-term fix.

Wizard
 
Ok, about to give this a shot! I'm assuming I need to change the UUID for the /boot partition?
 
LONG-TERM FIX

The longer, more permanent fix bears examining, a little, information on our bootup process.

Linux Distros of almost any description will call upon the following as part of "taking instructions/commands" to engineer booting us into a session of our Distro of choice -
  • a text file with no extension called /etc/default/grub
  • a file that we do not touch, for good reasons, called /boot/grub/grub.cfg and if there are any default or customised scripts to be run, they are gathered from
  • the contents of /etc/grub.d/
A file called /etc/fstab - also no extension, is a text file that comes into play as well, but that varies considerably from Distro to Distro in its content, and we can talk about that another time.

As you might expect, the area on our file system starting with /boot/ is a no-brainer for being important. Linux takes note of what is in there, to do its voodoo. We are going to don our kevlar body armour and put a file into /boot/

It is called custom.cfg.

This is where you will need that UUID for your / root partition I referred to earlier.

Wizard breaking off for a minute.
 
Nope, see above, and thanks for participating, Jeffrey :)
 
Ahhhhh, OK I read that incorrectly. *face palm* (perhaps it's because I am again on call and its almost 0200?) I want to try method 1 to make sure that I can do it but one more question. Does it matter that Manjaro is using a different kernel version that LM is using?
 
I love that *face palm*, can I use that?

Don't answer now and listen up, I'll be back in a few minutes

Wiz
 
Manjaro is using a different kernel version that LM is using?

valid question, but no, we can talk about that in a future Thread that you will start because I am to busy

b_Zo_Rud6_-_Imgur.gif


Wizard back soon
 
OK, so we are picking up from #4 above, where I finished

It is called custom.cfg.

This is where you will need that UUID for your / root partition I referred to earlier.

My custom.cfg looks like this

Code:
menuentry "Manjaro - configfile "  {
    insmod part_gpt
    part part_msdos
    insmod ext2
    search --no-floppy  --fs-uuid --set=root 02617d47-01c4-4363-9c34-09d552eac83e
    configfile /boot/grub/grub.cfg
}

... and before I forget, this custom file will actually be placed in /boot/grub/ ... right in the thick of things, so to speak.

For almost any part of our File System other than our /home folder or partition, ownership is to capital R Root, so we don't bugger up our System Files, other OSes adopt a similar approach.

So to create and place this file, we need executive/elevated privileges, we go to becoming Root/SuperUser/sudo/Admin.

We can do this through our, visual. GUI, or through the Command Line Interface (CLI) usually called Terminal.

I can deal with method as you ask or learn, but for now, I will take the GUI approach through Jeffrey's Cinnamon, so as not to keep him waiting longer than necessary. I will come back to the other options for you all.

In Cinnamon, by default, we have the File Manager known as Nemo.

Open Nemo, choose File System, double-click Boot, then double-click Grub. You will see Folders and a couple of Files.

Right-click and choose Open as Root, a separate window will open, perhaps slightly cascaded/overlapping. A red bar with Elevated Privileges might be in view.

Right-click Create New Document - Empty Document. Call it custom.cfg and Enter to create it.

Double-click that and it will open.

Paste in that code I described above, but where it says

set=root you will replace my UUID with your own.

Exit and save the document. You should now see custom.cfg alongside those Folders and couple of files.

You do not need to update Grub for this, we will talk about that elsewhere.

Reboot, and you will find your Grub Menu has changed a little, featuring the custom config file at the bottom.

Press Enter there and it will bring you into a new Menu, a secondary Menu (not the same as a sub Menu), featuring Manjaro at the top, and in Jeffrey's case, Linux Mint Cinnamon following.

Enter your Manjaro and play to your heart's content.

Wizard
 
This fix is more in depth (and one I will certainly undertake) however I am about to get a bit busy (the hospital never sleeps)! I am not able to embark on this one just yet. Will fixing this now ultimately affect my ability to partition the SSD with Manjaro installed?
 
This fix is more in depth (and one I will certainly undertake) however I am about to get a bit busy (the hospital never sleeps)! I am not able to embark on this one just yet. Will fixing this now ultimately affect my ability to partition the SSD with Manjaro installed?
Before I try this (later today or this evening when @wizardfromoz is hopefully available to bail me out) I want to be sure that I have the correct UUID.

Here is the blkid output
Code:
[jlap4@jlap4-vbp-gn ~]$ sudo blkid
[sudo] password for jlap4:
/dev/sda1: UUID="5173e20e-d1fb-4f8f-9272-c7bb4c44f12f" TYPE="ext4" PARTUUID="72fe3cdb-dc1e-4a16-ab8d-2d1579d8fbea"
/dev/sda2: UUID="cd0838e6-6bd1-4540-898f-d65e0ad02d20" TYPE="ext4" PARTUUID="c04c5a0d-b41f-4e9f-8d99-b94cf0179236"
/dev/sda3: UUID="ab841792-4d9d-4433-98ed-dd1ab4d24276" TYPE="ext4" PARTUUID="f2d94b32-fff0-478b-900e-4fa73ac5ebbe"
/dev/sda4: UUID="23ceb001-29a1-483f-b6f3-ab620da679bf" TYPE="swap" PARTUUID="b8c039dc-233d-4860-9abe-2c296d974ed5"
/dev/sda5: UUID="727afb94-5fa9-4884-a437-25df327a4bfd" TYPE="ext4" PARTLABEL="Timeshift" PARTUUID="5ecced2b-e0ee-4c9e-8b6f-3d65eb4df48c"
/dev/sda6: UUID="bc4f81f1-da97-4719-9905-aaf545c7d039" TYPE="ext4" PARTLABEL="Data Storage" PARTUUID="0dc32f1c-e117-4740-a872-2b650347f085"
/dev/sdb1: UUID="E5B0-D26E" TYPE="vfat" PARTUUID="f0aba8ff-acd1-4821-b4b7-52face2f2e29"
/dev/sdb2: UUID="0912aa12-13df-4188-bea6-f2dd9df01b78" TYPE="ext4" PARTUUID="7d9c3995-380a-4278-951a-3b2366798c4f"
/dev/sdb3: UUID="da3ccdaf-4c24-4cc4-9f02-05035f799e25" TYPE="swap" PARTUUID="31f2c668-b77c-452f-95f9-7aac4c42500c"
[jlap4@jlap4-vbp-gn ~]$

I think the correct UUID is "0912aa12-13df-4188-bea6-f2dd9df01b78"

Does this look correct?
 
(the hospital never sleeps)

I can understand that, I watch "Code Black" and "Grey's Anatomy" (with my wife) :D

The method described above, with the introduction into the picture, of a custom.cfg to cater to Manjaro's foibles, will allow you to run any number of Arch-based Distros side-by-side on the same system.

On my Toshiba Satellite laptop, headed for retirement some time next 12 months, on a 1 TB HDD I have 47 partitions, and have run 43 Linux at a time.

Of those, Arch-based are made up of the following:

I'll come back to this

Wiz
 
0912aa12-13df-4188-bea6-f2dd9df01b78

No, it's actually 0912aa12-13df-4188-bea6-f2dd9df01b78

I'm kidding :)

Yep

Regrets on delay, I am actually by coincidence updating a Manjaro on the old Toshiba Satellite, then have to cook the evening meal and sign off.

Full steam to go ahead, Jeffrey :D

Wizard
 
No, it's actually 0912aa12-13df-4188-bea6-f2dd9df01b78

I'm kidding :)

Yep

Regrets on delay, I am actually by coincidence updating a Manjaro on the old Toshiba Satellite, then have to cook the evening meal and sign off.

Full steam to go ahead, Jeffrey :D

Wizard
I can understand that, I watch "Code Black" and "Grey's Anatomy" (with my wife) :D

The method described above, with the introduction into the picture, of a custom.cfg to cater to Manjaro's foibles, will allow you to run any number of Arch-based Distros side-by-side on the same system.

On my Toshiba Satellite laptop, headed for retirement some time next 12 months, on a 1 TB HDD I have 47 partitions, and have run 43 Linux at a time.

Of those, Arch-based are made up of the following:

I'll come back to this

Wiz
Haven't heard of "code black" and my wife watches "Grey's Anatomy" and I cringe when I see it! So far removed from reality it isn't even funny! The spend more time on monkey business than any hospital I've worked in!

No worries on the delay and thank you for confirming (and for all of you tutelage)! Out of curiosity, how many distros do you anticipate I can run off of the 256 SSD?

Enjoy your evening and I look forward to continuing this project!
 
OK, so we are picking up from #4 above, where I finished



My custom.cfg looks like this

Code:
menuentry "Manjaro - configfile "  {
    insmod part_gpt
    part part_msdos
    insmod ext2
    search --no-floppy  --fs-uuid --set=root 02617d47-01c4-4363-9c34-09d552eac83e
    configfile /boot/grub/grub.cfg
}

... and before I forget, this custom file will actually be placed in /boot/grub/ ... right in the thick of things, so to speak.

For almost any part of our File System other than our /home folder or partition, ownership is to capital R Root, so we don't bugger up our System Files, other OSes adopt a similar approach.

So to create and place this file, we need executive/elevated privileges, we go to becoming Root/SuperUser/sudo/Admin.

We can do this through our, visual. GUI, or through the Command Line Interface (CLI) usually called Terminal.

I can deal with method as you ask or learn, but for now, I will take the GUI approach through Jeffrey's Cinnamon, so as not to keep him waiting longer than necessary. I will come back to the other options for you all.

In Cinnamon, by default, we have the File Manager known as Nemo.

Open Nemo, choose File System, double-click Boot, then double-click Grub. You will see Folders and a couple of Files.

Right-click and choose Open as Root, a separate window will open, perhaps slightly cascaded/overlapping. A red bar with Elevated Privileges might be in view.

Right-click Create New Document - Empty Document. Call it custom.cfg and Enter to create it.

Double-click that and it will open.

Paste in that code I described above, but where it says

set=root you will replace my UUID with your own.

Exit and save the document. You should now see custom.cfg alongside those Folders and couple of files.

You do not need to update Grub for this, we will talk about that elsewhere.

Reboot, and you will find your Grub Menu has changed a little, featuring the custom config file at the bottom.

Press Enter there and it will bring you into a new Menu, a secondary Menu (not the same as a sub Menu), featuring Manjaro at the top, and in Jeffrey's case, Linux Mint Cinnamon following.

Enter your Manjaro and play to your heart's content.

Wizard
I will be giving this a try tomorrow evening (it's 9/17 @ 2140 here). It's been a long weekend and I am attempting to turn in early tonight. I will create the text file and post it for you to review before going any further.
 
No worries :)

To fast-track you and given our timezones disparity, your custom.cfg should look like the following, given what you have established on the UUID on /dev/sdb2:

Code:
menuentry "Manjaro - configfile "  {
    insmod part_gpt
    part part_msdos
    insmod ext2
    search --no-floppy  --fs-uuid --set=root 0912aa12-13df-4188-bea6-f2dd9df01b78
    configfile /boot/grub/grub.cfg
}

If that matches yours, go for it.

A word to The Viewers here - if you are copying and pasting text to and from a word processor application to somewhere like this Forum, just proof-read your commands. Fonts in one can override the formatting in others. In the line above commencing "search", there are three (3) double-dashes, before no, before fs, and before set.

Continuing where I left off above at #16:

On my Toshiba Satellite laptop, headed for retirement some time next 12 months, on a 1 TB HDD I have 47 partitions, and have run 43 Linux at a time.

Of those, Arch-based are made up of the following:
  • /dev/sda18 Manjaro GNOME (17.1.12)
  • /dev/sda21 Bluestar Linux
  • /dev/sda25 SwagArch
  • /dev/sda30 Netrunner Rolling (2018.1)
  • /dev/sda35 Antergos
  • /dev/sda36 Anarchy
  • /dev/sda43 Chakra and
  • /dev/sda47 Manjaro Cinnamon (17.1.12)
So, you can see I have eight (8) Arch-based Distros living side-by-side in relative harmony with Debian-based Distros, RPM-based Distros, and a Gentoo-based one (Sabayon) as well.

All possible because of this custom.cfg configuration.

More next Post

Cheers for now

Wizard
 

Staff online

Members online


Top