Change Kernel from 4.19 to 5.4 leads to an emergency shell

I successfully installed Kernel linux54. After doing the following thing:

sudo rm /etc/mtab
sudo ln -s /proc/self/mounts /etc/mtab

Now I want to change it in grub to choose 5.4 over 4.19 (current). After selecting the new kernel in the advanced menu, I get redirected to an emergency shell where I don’t know what do do.

This is what is displayed (I need to type it by hand as I have only one machine available):

mount: /new_root: unknown filesystem type 'ext4'
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]# exit
Failed to mount the real root deice
Bailing out, you are on your own. Good luck.
sh: can't access tty; jobcontrol turned off
[rootfs ]#

Any help would be appreciated!

Welcome to the forum! :slight_smile:

In light of your problem, how did you install the kernel?

That shouldn’t have been needed, because in Manjaro, /etc/mtab already is a symlink to /proc/self/mounts. :arrow_down:

[nx-74205:/dev/pts/3][/home/aragorn]
[19:11:02][aragorn] > ls -l /etc/mtab 
lrwxrwxrwx 1 root root 19 Sep 26 14:06 /etc/mtab -> ../proc/self/mounts

You probably don’t have an initramfs for that kernel, which is why I was asking you higher up this reply how you installed it.

Boot up with the working 4.19 kernel and post the output of… :arrow_down:

ls -l /boot
1 Like

I am amazed by your post! Yesterday I felt so desperate and now I see the light of hope. Thank you so much already!

In light of your problem, how did you install the kernel?

I installed the Kernel by the console as it failed with the GUI. For this I followed this

https://wiki.manjaro.org/index.php/Manjaro_Kernels#Adding_New_Kernels

sudo mhwd-kernel -i linux54

That shouldn’t have been needed, because in Manjaro, /etc/mtab already is a symlink to /proc/self/mounts . :arrow_down:

Yesterday nothing seemed to work and I did this because I got the following the same error output as in this thread:

Boot up with the working 4.19 kernel and post the output of…

➜  ~ ls -l /boot
total 94364
drwxr-xr-x 3 root root     4096 Jan  1  1970 efi
drwxr-xr-x 5 root root     4096 Nov 11 17:12 grub
-rw-r--r-- 1 root root 30021916 Nov  6 17:43 initramfs-4.19-x86_64-fallback.img
-rw-r--r-- 1 root root 10071733 Nov  6 17:42 initramfs-4.19-x86_64.img
-rw-r--r-- 1 root root 31171951 Nov 11 17:12 initramfs-5.4-x86_64-fallback.img
-rw-r--r-- 1 root root  9668249 Nov 11 17:12 initramfs-5.4-x86_64.img
-rw-r--r-- 1 root root  3161088 Jun 16 19:50 intel-ucode.img
-rw-r--r-- 1 root root       23 Oct 30 11:24 linux419-x86_64.kver
-rw-r--r-- 1 root root       21 Nov  1 14:42 linux54-x86_64.kver
drwxr-xr-x 2 root root     4096 Jun  4 16:34 memtest86+
-rw-r--r-- 1 root root  6002496 Nov  6 17:42 vmlinuz-4.19-x86_64
-rw-r--r-- 1 root root  6498624 Nov 11 17:12 vmlinuz-5.4-x86_64

Well, everything that’s needed appears to be there. So then the only possible cause of the problem would be that you haven’t been keeping your system up-to-date, and that there may be a conflict now between the 5.4 kernel you installed and some of the outdated stuff that was used for installing the kernel, building the initramfs and setting up GRUB. :thinking:

Also, as far as I know, linux419 isn’t even on any of the recent installer .isos anymore, so that begs the following questions…:

  1. When did you install this system?
  2. What .iso did you use for doing so?
  3. When was the last time you updated the system?

I always had to refresh the mirrors manually to do updates with octopi or pacman so I always waited some time to do updates. I could not find a solution for that, tbh.

  1. When did you install this system?

I installed it in August 2019

  1. What .iso did you use for doing so?

I used the current .iso from August 2019 from back then. I cannot really tell which file it was as the USB stick from my room mate. He probably deleted the file.

  1. When was the last time you updated the system?

A few days ago. But I remember not being able to enter my system as the password would not get accepted. I therefore restarted the computer. I don’t know if the updated were done… You got a point there but I cannot prove if the updates were done or were still in process.

If there was a problem with updates, how can I resolve that?

This suggests that you hadn’t been keeping the system up-to-date, because there was an update quite a while ago that introduced login problems if one did not pay attention to the (announced) requirement for manual intervention.

The typical newbie mistake, if you don’t mind my saying so. Something takes too long during an update and they hit the reset button. And then they get breakage. :frowning:

Well, you can try this… :arrow_down:

sudo pacman-mirrors -f 5 && sudo pacman -Syyu

That will tell you whether the system was updated, because if it wasn’t, then it will commence (or resume) the update process.

However, if you did not regularly keep your system updated, then perhaps Manjaro would not be a good choice for you, and then you might be better off with a so-called fixed-point-release distribution. Manjaro is a rolling-release distribution, and the idea is that you keep up with the evolution of things.

Another but related aspect of not having kept your system up-to-date may be that things are now so broken that troubleshooting them becomes impossible, and that a reinstall (with a new .iso) would be warranted. :thinking:

1 Like

Well I wouldn’t mind updating if the download mirrors wouldn’t be such a problem with maintaining the mirrors every time I want to update. Or is this on purpose of manjaro? Mirrors seem to be up and online and yet my downloads would fail with a 404. This gets tedious with each update. In the beginning I would take my time updating but sometimes you’re short on time and need to finish a given task that you think “nah, I will update later” and then you forget. And then there were times where you had to do some extra effort other than updating the mirrors list that the updating itself got a problem.

The typical newbie mistake, if you don’t mind my saying so. Something takes too long during an update and they hit the reset button. And then they get breakage. :frowning:

I wouldn’t mind! I love manjaro and appreciate your help.

Well, you can try this…

sudo pacman-mirrors -f 5 && sudo pacman -Syyu
::INFO Downloading mirrors from repo.manjaro.org
::INFO Using default mirror file
::INFO Querying mirrors - This may take some time
  ..... Japan          : http://ftp.tsukuba.wide.ad.jp/Linux/manjaro/
  1.430 United_States  : http://distro.ibiblio.org/manjaro/
  0.508 Denmark        : https://mirrors.dotsrc.org/manjaro/
  0.315 United_Kingdom : http://manjaro.mirrors.uk2.net/
  0.330 Germany        : http://ftp.tu-chemnitz.de/pub/linux/manjaro/
  0.609 Germany        : ftp://ftp.tu-chemnitz.de/pub/linux/manjaro/
::INFO Writing mirror list
::United_Kingdom  : http://manjaro.mirrors.uk2.net/stable
::Denmark         : https://mirrors.dotsrc.org/manjaro/stable
::Germany         : http://ftp.tu-chemnitz.de/pub/linux/manjaro/stable
::United_States   : http://distro.ibiblio.org/manjaro/stable
::Japan           : http://ftp.tsukuba.wide.ad.jp/Linux/manjaro/stable
::INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist
:: Synchronizing package databases...
 core                                                                    169.3 KiB  1303 KiB/s 00:00 [###########################################################] 100%
 extra                                                                  2019.8 KiB  2.44 MiB/s 00:01 [###########################################################] 100%
 community                                                                 6.3 MiB  6.41 MiB/s 00:01 [###########################################################] 100%
 multilib                                                                191.3 KiB  9.34 MiB/s 00:00 [###########################################################] 100%
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (1) firefox-82.0.3-0.1

Total Download Size:    57.88 MiB
Total Installed Size:  207.82 MiB
Net Upgrade Size:       -0.08 MiB

:: Proceed with installation? [Y/n] Y
error: could not open file: /etc/mtab: No such file or directory
error: could not determine filesystem mount points
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.

:grimacing: :grimacing: :grimacing: :grimacing: :grimacing: :grimacing:

Another but related aspect of not having kept your system up-to-date may be that things are now so broken that troubleshooting them becomes impossible, and that a reinstall (with a new .iso ) would be warranted. :thinking:

I guess a new clean start will be best. I am unable to work on my machine currently. And I will keep your advice in the back of my head of being more patient and updating regularly. But how much patience is enough patience (a little philosophical here)?

1 Like

Hi, as you appear to be in UTC +1 timezone, why do you have US or Japan mirrors? Should be lot quicker to only get mirrors for your country I think.

I had the same problem with unknown filesystem type 'ext4' upon booting kernel 5.4. Same upgrade, from 4.19 to 5.4. I had regularly updated my system, at least every few weeks.

My solution:

  1. Boot back to 4.19.
  2. Run: sudo mkinitcpio -P && sudo update-grub.
  3. Boot to 5.4.

Then 5.4 booted up just fine.

I think the main problem with updating kernels in Manjaro is that even if you religiously pacman -Syu on a regular basis, that does nothing for your kernel.

Oh, and here’s the fix for could not open file: /etc/mtab: No such file or directory when running pacman:

ln -s /proc/self/mounts /etc/mtab

This should not be needed, because /etc/mtab should already be a symlink to /proc/self/mounts out-of-the-box in Manjaro (and Arch).