Emergency mode doesn't respond

Hi,

I’m stuck on emergency mode and I don’t know what to do. The main issue is that it asks for root password (or control-D to continue) but no matter what I do it just won’t respond. No password incorrect or anything, I’m just stuck at the prompt as if the keyboard doesn’t even work. Yet I can use the keyboard on grub.

The problem seems to be related to mounted files. I have several hard drives on my computer and I remember having set up on some file so they auto mount during boot, and while I haven’t touched that config in well over a year, things were working fine until it suddenly stopped booting last week. No idea what happened.

I’d look into the mounting, but I just can’t get past that emergency mode prompt. I can’t run any commands or do anything at all, really.

Any idea what I could try? Maybe some way to run commands pre emergency mode, maybe from grub or something?

whats the exact message? did you tried with different kernels from the grub menu, if you have them installed?

I did try different ones from the grub menu, yes. Not all of them, but several, including first and last.

As for the messages, saving potential speeling mistakes as I’m retyping by hand:

[FAILED] failed to start Load AppArmor profiles
[FAILED] failed to start Load Kernel Modules
[FAILED] failed to mount Mount unit for core, revision 13250.
[FAILED] failed to mount Mount unit for git-cola, revision 136.
[FAILED] failed to mount /home/pina/windows.
[DEPEND] Dependency failed for Local File Systems.
You are in emergency mode. After logging in, type “journalclt -xb” to view system logs, “systemctl reboot” to reboot, “systemctl default” or “exit” to boot into default mode.
Give root password for maintenance
(or press Control-D to continue):

And then a prompt I cant do anything with.

so boot into manjaro live usb and chroot:
sudo manjaro-chroot -a
then we will continue

Ok, I got the USB and got it running. Result is

[manjaro@manjaro ~]$ sudo manjaro-chroot -a
grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.
==> Mounting (ManjaroLinux) [/dev/sdb1]
→ mount: [/mnt]
→ mount: [/mnt/home/pina/windows]
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)
Could not mount read-write, trying read-only
[manjaro /]#

so you now chrooted now run this:
sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu

Please do as suggested :point_up:

After the downloads, I got this. Does not look great

( 1/418) upgrading alsa-card-profiles [####################################################################] 100%
( 2/418) upgrading iana-etc [####################################################################] 100%
warning: /etc/locale.conf saved as /etc/locale.conf.pacsave
( 3/418) upgrading filesystem [####################################################################] 100%
error: extract: not overwriting dir with file /lib
error: problem occurred while upgrading filesystem
Note: locale.conf is not longer tracked by
package management. Restoring /etc/locale.conf …
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.

Afterwards, when I tried rebooting manjaro, I now get:

error: file ‘/boot/vmlinu-5.10-x86_64’ not found.
error: you need to load the kernel first.
Press any key to continue…

At least the keyboard does work there.

Yeah, noticed that, although I thought that was Windows not closing after being told to close. IIRC, that’s what it keeps doing every time and wasn’t expecting to be directly related.

That said, when I execute it now (after brahma’s command), it no longer gives that message. I now get

[manjaro@manjaro ~]$ sudo manjaro-chroot -a
grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1. Check your device.map.
==> Mounting (ManjaroLinux) [/dev/sdb1]
→ mount: [/mnt]
→ mount: [/mnt/home/pina/windows]
[manjaro /]#

so now from chroot post output from:
mhwd-kernel -li

I probably should have stayed put, but I was searching for solution for the new error message and got me here, based on which I executed “pacman-mirrors -f 5 && pacman -Syyu” followed by update-grub. Now trying to launch manjaro gives me a black screen with nothing shown and windows is no longer showing as an option in Grub. So yay.

Anyway, as for your the command. Output is

[manjaro /]# mhwd-kernel -li
Currently running: 5.15.48-1-MANJARO (linux515)
The following kernels are installed in your system:

  • linux510
  • linux54
  • linux59

so first uninstall the 59 kernel:
mhwd-kernel -r linux59
reinstall the 5.10 kernel:
pacman -S linux510
then run these:
update-grub
mkinitcpio -P
exit
systemctl reboot
and see if it worked

I am assuming this will be a problem, copying it here before I reboot. The other commands seem to have worked.


[manjaro /]# mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'default'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64.img
==> ERROR: '/lib/modules/5.10.124-1-MANJARO' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux510.preset: 'fallback'
  -> -k /boot/vmlinuz-5.10-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.10-x86_64-fallback.img -S autodetect
==> ERROR: '/lib/modules/5.10.124-1-MANJARO' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux54.preset: 'default'
  -> -k /boot/vmlinuz-5.4-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.4-x86_64.img
==> ERROR: '/lib/modules/5.4.200-1-MANJARO' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux54.preset: 'fallback'
  -> -k /boot/vmlinuz-5.4-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.4-x86_64-fallback.img -S autodetect
==> ERROR: '/lib/modules/5.4.200-1-MANJARO' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux57.preset: 'default'
  -> -k /boot/vmlinuz-5.7-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.7-x86_64.img
==> ERROR: '/lib/modules/5.7.19-2-MANJARO' is not a valid kernel module directory
==> Building image from preset: /etc/mkinitcpio.d/linux57.preset: 'fallback'
  -> -k /boot/vmlinuz-5.7-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.7-x86_64-fallback.img -S autodetect
==> ERROR: '/lib/modules/5.7.19-2-MANJARO' is not a valid kernel module directory

Upon reboot, when I choose to boot manjaro, I just get an empty black screen without any messages at all. I’m letting it run to see if it just needs a while to get things in order internally

does the command finished succesfully?

The uninstall and the kernel reinstall seemed to work, at least. mkinitcpio -P gave a lot of errors, as pasted above. And after reboot the screen is still black, so something did go wrong.

so again chroot, reinstalling your video drivers may help…
post output from:
mhwd -l && mhwd -li
ls /etc/mkinitcpio.d/*.preset
sudo ls /boot/initramfs-*
sudo ls /boot/vmlinuz-*
sudo ls /usr/lib/modules/*

Here you go


[manjaro@manjaro ~]$ sudo manjaro-chroot -a
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
==> Mounting (ManjaroLinux) [/dev/sdb1]
 --> mount: [/mnt]
 --> mount: [/mnt/home/pina/windows]
[manjaro /]# mhwd -l && mhwd -li
> 0000:01:00.0 (0300:10de:1c02) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
          video-nvidia            2021.12.18               false            PCI
    video-nvidia-470xx            2021.12.18               false            PCI
    video-nvidia-390xx            2021.12.18               false            PCI
           video-linux            2018.05.04                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
           video-linux            2018.05.04                true            PCI
          video-nvidia            2021.12.18               false            PCI


Warning: No installed USB configs!
[manjaro /]# ls /etc/mkinitcpio.d/*.preset
/etc/mkinitcpio.d/linux510.preset  /etc/mkinitcpio.d/linux54.preset  /etc/mkinitcpio.d/linux57.preset
[manjaro /]# sudo ls /boot/initramfs-*
/boot/initramfs-5.7-x86_64-fallback.img  /boot/initramfs-5.7-x86_64.img
[manjaro /]# sudo ls /boot/vmlinuz-*
/boot/vmlinuz-5.10-x86_64  /boot/vmlinuz-5.4-x86_64  /boot/vmlinuz-5.7-x86_64
[manjaro /]# sudo ls /usr/lib/modules/*
/usr/lib/modules/5.10.124-1-MANJARO:
extramodules  kernelbase     modules.alias.bin	modules.builtin.alias.bin  modules.builtin.modinfo  modules.dep.bin  modules.order    modules.symbols	   pkgbase
kernel	      modules.alias  modules.builtin	modules.builtin.bin	   modules.dep		    modules.devname  modules.softdep  modules.symbols.bin  vmlinuz

/usr/lib/modules/5.4.200-1-MANJARO:
extramodules  kernelbase     modules.alias.bin	modules.builtin.alias.bin  modules.builtin.modinfo  modules.dep.bin  modules.order    modules.symbols	   pkgbase
kernel	      modules.alias  modules.builtin	modules.builtin.bin	   modules.dep		    modules.devname  modules.softdep  modules.symbols.bin  vmlinuz

/usr/lib/modules/extramodules-5.10-MANJARO:
nvidia-drm.ko.xz  nvidia-modeset.ko.xz	nvidia-peermem.ko.xz  nvidia-uvm.ko.xz	nvidia.ko.xz  version

/usr/lib/modules/extramodules-5.4-MANJARO:
nvidia-drm.ko.xz  nvidia-modeset.ko.xz	nvidia-peermem.ko.xz  nvidia-uvm.ko.xz	nvidia.ko.xz  version
[manjaro /]#

edit your post by clicking this icon in editor: </> and put the output from those commands there

Got that. Done.

so remove the 5.7 remnants:
rm /boot/vmlinuz-5.7-x86_64
rm /boot/initramfs-5.7-x86_64-fallback.img
rm /etc/mkinitcpio.d/linux57.preset
rm /boot/initramfs-5.7-x86_64.img
uninstall the 5.4:
mhwd-kernel -r linux54

and do you have dual graphics? post output from:
inxi -xG