Error when the system starts (mkinitcpio)

Hello,

I just made a configuration change on the nvidia.conf (under /etc/modprobe.d/) to enable the NVreg_EnableGpuFirmware option. However, after I just executed sudo mkinitcpio -P and when it started the system, just I received the following message (with a root emergency shell):

I tried several things, I’m just in a live usb and I can mount my luks partitions, I’ve tried to modify also the hooks adding the encrypt but nothing works. Always the same error. I don’t know really how to solve.

/etc/fstab

[root@EndeavourOS /]# cat /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=F170-FBA5                            /boot/efi      vfat    fmask=0137,dmask=0027 0 2
#UUID=207B-82A8                                    /boot/efi      vfat    fmask=0137,dmask=0027 0 2
/dev/mapper/luks-0919c9ed-3f14-4164-8b1c-df24740e2e7b /              ext4    noatime    0 1
/dev/mapper/luks-95205ac6-c664-4e10-baa3-906c72409d9e swap           swap    defaults   0 0

/etc/mkinitcpio.conf

#    usr and fsck hooks.
#HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont encrypt block filesystems fsck)
HOOKS=(base udev autodetect modconf block encrypt filesystems keyboard keymap consolefont fsck)

sudo bklid (ignore the EOS_202311, it’s the live usb)

/dev/mapper/sda3_crypt: LABEL="swap" UUID="9ef33a03-82f8-40b3-8a90-572ab635b616" TYPE="swap"
/dev/nvme0n1p3: BLOCK_SIZE="512" UUID="92527CFD527CE77F" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="fb9a8853-e187-4528-857a-f99467bcb9db"
/dev/nvme0n1p1: UUID="207B-82A8" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="d4868385-bd3a-434d-ac1a-1a12b216949f"
/dev/nvme0n1p4: BLOCK_SIZE="512" UUID="C098CE1998CE0DBA" TYPE="ntfs" PARTUUID="b1f549b9-47f8-4c13-ba3f-0729f6f2d654"
/dev/sdb1: LABEL="EOS_202311" UUID="CAB7-2B54" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="001b8c10-01"
/dev/loop0: BLOCK_SIZE="1048576" TYPE="squashfs"
/dev/mapper/sda2_crypt: LABEL="endeavouros" UUID="2103fb9e-c4f9-4341-a1ec-c064cdb7fd2c" BLOCK_SIZE="4096" TYPE="ext4"
/dev/nvme1n1p2: LABEL="Nuevo vol" BLOCK_SIZE="512" UUID="4CD08DF9D08DEA12" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="495bf850-8bb0-48eb-a00c-0ba7446231fc"
/dev/sda2: UUID="0919c9ed-3f14-4164-8b1c-df24740e2e7b" TYPE="crypto_LUKS" PARTLABEL="endeavouros" PARTUUID="603253bc-17eb-4c58-95de-5c3720ad9df9"
/dev/sda3: UUID="95205ac6-c664-4e10-baa3-906c72409d9e" TYPE="crypto_LUKS" PARTUUID="0ae14d05-6157-42f5-91c8-86ba02eda4c3"
/dev/sda1: UUID="F170-FBA5" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="257dccb6-5901-4c7c-b561-6c014b66efd9"
/dev/nvme0n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="ec4423e1-3118-4212-b7fa-2174e9ade475"
/dev/nvme1n1p1: PARTLABEL="Microsoft reserved partition" PARTUUID="2cb7be41-e680-4599-a216-4de1d6bf4332"

/boot/grub/grub.cfg

linux   /boot/vmlinuz-linux root=UUID=2103fb9e-c4f9-4341-a1ec-c064cdb7fd2c rw  GRUB_CMDLINE_LINUX_DEFAULT='nowatchdog nvme_load=YES rd.luks.uuid=0919c9ed-3f14-4164-8b1c-df24740e2e7b rd.luks.uuid=95205ac6-c664-4e10-baa3-906c72409d9e resume=/dev/mapper/luks-95205ac6-c664-4e10-baa3-906c72409d9e nvidia-drm.modeset=1 loglevel=3' nvidia_drm.modeset=1

uname -ar

Linux EndeavourOS 6.6.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 08 Nov 2023 16:05:38 +0000 x86_64 GNU/Linux

Commands what I’ve tried (and others but these is how I’m just trying to fix according what I saw in the forum):

sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount /dev/sda1 /mnt/boot/efi
sudo arch-chroot /mnt mkinitcpio -P

Note: I just also played with the vmware-host-modules and compiled it, it was another fork, but I don’t think it affects (https://github.com/mkubecek/vmware-host-modules). Not sure tho.

Could you help me, please? Thank you in advance

There are a lot of issues here.

First, EOS uses dracut, not mkinitcpio. Did you do all the steps required to convert your system to mkinitcpio?

Second, can you share you entire /etc/default/grub

Lastly, don’t use bind mounts with arch-chroot

Hello,

/etc/default/grub

# GRUB boot loader configuration

GRUB_DEFAULT=saved
GRUB_TIMEOUT='5'
GRUB_DISTRIBUTOR='EndeavourOS'
GRUB_CMDLINE_LINUX_DEFAULT="GRUB_CMDLINE_LINUX_DEFAULT='nowatchdog nvme_load=YES rd.luks.uuid=0919c9ed-3f14-4164-8b1c-df24740e2e7b rd.luks.uuid=95205ac6-c664-4e10-baa3-906c72409d9e resume=/dev/mapper/luks-95205ac6-c664-4e10-baa3-906c72409d9e nvidia-drm.modeset=1 loglevel=3' nvidia_drm.modeset=1"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `videoinfo'
GRUB_GFXMODE=1280x1024x32,auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY='true'

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
GRUB_BACKGROUND='/usr/share/endeavouros/splash.png'
GRUB_THEME="/usr/share/grub/themes/pochita/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
GRUB_DISABLE_SUBMENU='false'

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
#GRUB_DISABLE_OS_PROBER=false

Regarding the mkinitcpio, I didn’t know about it. I didn’t convert my system to mkinitcpio, just I ran that command and probably that was the mistake :frowning:

This line should be fixed.

It should be:

GRUB_CMDLINE_LINUX_DEFAULT='nowatchdog nvme_load=YES rd.luks.uuid=0919c9ed-3f14-4164-8b1c-df24740e2e7b rd.luks.uuid=95205ac6-c664-4e10-baa3-906c72409d9e resume=/dev/mapper/luks-95205ac6-c664-4e10-baa3-906c72409d9e nvidia-drm.modeset=1 loglevel=3 nvidia_drm.modeset=1'

That is a problem.

Can you share the output of pacman -Q | grep -E "dracut|grub|mkinitcpio"

pacman -Q | grep -E “dracut|grub|mkinitcpio”

dracut 105-1
eos-dracut 1.4-1
grub 2:2.12-3
mkinitcpio 39.2-2
mkinitcpio-busybox 1.36.1-1

OK, make the change I described above to /etc/default/grub

Then create an arch-chroot and enter the chroot. There are instructions on how to do that in the EndeavourOS Wiki:

https://discovery.endeavouros.com/system-rescue/arch-chroot/2022/12/

From within the chroot, do this:

pacman -R mkinitcpio-busybox mkinitcpio
dracut-rebuild
grub-mkconfig -o /boot/grub/grub.cfg
1 Like

Thank you so much! That solved the problem! Can I know why it happened? I don’t want to happen the same issue in the near future :laughing:

1 Like

There are two reasons:

  • You made the change to /etc/default/grub wrong. You had GRUB_CMDLINE_LINUX_DEFAULT= in multiple places and the quote wrapping was incorrect.
  • You installed mkinitcpio. This created a situation where multiple things were creating your initrams.

All you had to do was run sudo dracut-rebuild after making the changes under /etc/modprobe.d/.

1 Like

Thank you for the explanation, understood. Have an amazing week!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.