You are not logged in.

#1 2024-11-17 13:12:58

SimonJ
Member
From: Spain
Registered: 2021-05-11
Posts: 322
Website

[SOLVED] Error failed to mount on real root

I am intermittently getting this error on boot

ERROR: Failed to mount '/dev/mapper/volumegroup-root' on real root
You are now being dropped into an emergency shell,
sh: can't access tty; job control turned off
[rootfs ~]#

If I simply reboot it does not repeat the error and boots as normal. Many times it does boot as normal and uses the USB drive to unlock the volumegroup.
/etc/mkinitcpio.conf

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES=(ext4 nvidia exfat)

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   This will create a systemd based initramfs which loads an encrypted root filesystem.
#    HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS=(base udev autodetect microcode modconf block plymouth encrypt lvm2 filesystems keyboard keymap fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
# Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"

/etc/default/grub

# GRUB boot loader configuration

GRUB_DEFAULT=0
#GRUB_DEFAULT="Advanced options for Arch Linux>Arch Linux, with Linux linux"
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR="Arch"
#GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 cryptdevice=/dev/nvme0n1p3:volumegroup:allow-discards cryptkey=/dev/disk/by-uuid/d110f65d-7c79-40dc-9610-3f22c3b5e214:ext4:/.nomedia quiet atkbd.reset i8042.nomux i8042.reset rd.udev.log-priority=3 sysrq_always_enabled=1"
#GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 cryptdevice=/dev/nvme0n1p3:volumegroup:allow-discards cryptkey=/dev/disk/by-uuid/333a96b6-01:exfat:/.nomedia quiet atkbd.reset i8042.nomux i8042.reset rd.udev.log-priority=3 sysrq_always_enabled=1 nvme_core.default_ps_max_latency_us=0 pcie_aspm=off splash"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 cryptdevice=/dev/nvme0n1p3:volumegroup:allow-discards cryptkey=LABEL=USBKEY:exfat:/.nomedia quiet atkbd.reset i8042.nomux i8042.reset rd.udev.log-priority=3 sysrq_always_enabled=1 nvme_core.default_ps_max_latency_us=0 pcie_aspm=off splash"

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=hidden

# 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 `vbeinfo'
GRUB_GFXMODE=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="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# 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=y

# 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

Kernel: 6.11.8-zen1-2-zen x86_64
fully updated system.

I have recently installed Windows 11 on another drive and confirm there is no fastboot enabled.

I have reformatted the USB drive to be sure there is nothing wrong there but the error does not seem to appear when I remove it and just type in the password, I am not sure if it is related.
blkid

/dev/nvme0n1p3: UUID="312a0656-6643-4f1b-b4f1-0436a16a3c26" TYPE="crypto_LUKS" PARTUUID="abc256fa-f685-a749-a18c-f7873c910aac"
/dev/nvme0n1p1: UUID="F8AD-C04D" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="dfa7d0be-5a69-e44b-9dc6-3bc728770d46"
/dev/nvme0n1p2: UUID="ab057069-a947-4e47-81b0-3d6134eeedfc" BLOCK_SIZE="1024" TYPE="ext4" PARTUUID="48b63923-7304-9948-b412-8d30f8049659"
/dev/nvme1n1p4: BLOCK_SIZE="512" UUID="BAD4BC47D4BC0821" TYPE="ntfs" PARTUUID="420251b6-3585-4a61-9e10-642663a08a28"
/dev/nvme1n1p3: BLOCK_SIZE="512" UUID="D6D2A5A5D2A589F7" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="586f691b-f7aa-4664-90e4-87cad44c32b9"
/dev/nvme1n1p1: UUID="20A4-9692" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="f3097eec-f0c7-49b6-8f7f-0aeec2cbfc32"
/dev/mapper/volumegroup-root: UUID="c6804a74-1ba3-4a0f-8865-1db2ad9885ab" BLOCK_SIZE="4096" TYPE="ext4"
/dev/mapper/volumegroup-home: UUID="2feaa196-e015-43fe-be3a-58a42ca95eb1" BLOCK_SIZE="4096" TYPE="ext4"
/dev/mapper/volumegroup: UUID="D0Ui9B-KrYp-Ltyb-Q3yc-n3qz-21NI-pvJuGd" TYPE="LVM2_member"
/dev/nvme1n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="06f29ffe-287d-4014-932d-58c55d6328e1"

efibootmgr

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0004,2001,2002,2003
Boot0000* ARCH	HD(1,GPT,dfa7d0be-5a69-e44b-9dc6-3bc728770d46,0x800,0xfa000)/\EFI\ARCH\grubx64.efi
Boot0004* Windows Boot Manager	HD(1,GPT,f3097eec-f0c7-49b6-8f7f-0aeec2cbfc32,0x800,0x32000)/\EFI\Microsoft\Boot\bootmgfw.efi57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000031000100000010000000040000007fff0400
Boot2001* EFI USB Device	RC
Boot2002* EFI DVD/CDROM	RC
Boot2003* EFI Network	RC

Please let me know if there is anything else I can provide to help track this down.
Thank you.

Last edited by SimonJ (2024-11-17 15:13:44)


Rlu: 222126

Offline

#2 2024-11-17 14:39:11

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,744

Re: [SOLVED] Error failed to mount on real root

Many times it does boot as normal and uses the USB drive to unlock the volumegroup.

Try to add "rootwait" or "root_delay=5" to the kernel parameters.

rootdelay=     [KNL] Delay (in seconds) to pause before attempting to
                        mount the root filesystem

        rootwait       [KNL] Wait (indefinitely) for root device to show up.
                        Useful for devices that are detected asynchronously
                        (e.g. USB and MMC devices).

        rootwait=      [KNL] Maximum time (in seconds) to wait for root device
                        to show up before attempting to mount the root
                        filesystem.

Offline

#3 2024-11-17 15:14:10

SimonJ
Member
From: Spain
Registered: 2021-05-11
Posts: 322
Website

Re: [SOLVED] Error failed to mount on real root

Thank you, rootwait seems to have resolved this, 4 reboots and a cold boot all without issue.


Rlu: 222126

Offline

Board footer

Powered by FluxBB