You are not logged in.

#1 Yesterday 20:52:35

ralof
Member
Registered: 2022-09-03
Posts: 5

after loading initial ramdisk fails to show prompt for passphrase

I just installed (seemingly only mostly) a new archlinux, following the installation guide.
For the setup, I chose an ext4 formatted luks2 encrypted root filesystem.
Booting works and the GRUB bootlaoder shows up, but after selecting the boot entry, it hangs and fails to show the prompt to enter the passphrase.
After waiting a long  time a message shows where one line reads

 [DEPEND] Dependency failed for FileSystem Check on /dev/mapper/rootFS 

Otherwise decrypting by hand works just fine.

Below I included some outputs from commands that might  help you help me / point me in the right direction.

# cat /etc/fstab 
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/mapper/rootFS
UUID=8ba65e5a-2f18-4396-99dc-8807419ed7ac	/         	ext4      	rw,relatime,stripe=8	0 1

# /dev/nvme0n1p1
UUID=F459-D248      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

# /dev/mapper/rootFS
UUID=8ba65e5a-2f18-4396-99dc-8807419ed7ac	/         	ext4      	rw,relatime,stripe=8	0 1

# /dev/nvme0n1p1
UUID=F459-D248      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

the initramfs generates cleanly

# mkinitcpio -P
==> WARNING: Failed to enable color. Check your TERM environment variable
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img
==> WARNING: Failed to enable color. Check your TERM environment variable
==> Starting build: '7.2.14-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [systemd]
  -> Running build hook: [autodetect]
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [sd-vconsole]
  -> Running build hook: [block]
  -> Running build hook: [sd-encrypt]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful

and generating  the grub config file also produces no error

# grub-mkconfig -o /boot/grub/grub.cfg 
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
Warning: os-prober is not installed; EFI BootNext entries will not be filtered against detected OSes, so non-OS entries (e.g. firmware updaters) may appear in the menu.
Adding boot menu entry for EFI BootNext: EFI USB Device (TOSHIBA) (Boot0000)
Adding boot menu entry for EFI BootNext: GRUB (Boot0001)
Adding boot menu entry for EFI BootNext: EFI USB Device (Boot2001)
Adding boot menu entry for EFI BootNext: EFI DVD/CDROM (Boot2002)
Adding boot menu entry for EFI BootNext: EFI Network (Boot2003)
done

oh, and here the mkinitramfs config:

# cat /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=(usbhid xhci_hcd)
MODULES=()

# 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 microcode modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev microcode 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 microcode modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev microcode modconf block lvm2 filesystems fsck)
#
##   This will create a systemd based initramfs which loads an encrypted root filesystem.
#    HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base systemd autodetect microcode modconf kms keyboard keymap sd-vconsole block sd-encrypt filesystems fsck)

# root=/dev/mapper/rootFS
# so apparently, because I am using grub, this can be omitted as grub autodetects the partition...

# 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"

Can you help me find out, what I am missing to (I think) tell the kernel to  show the prompt for the passphrase to me?

Offline

#2 Yesterday 21:00:40

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

Re: after loading initial ramdisk fails to show prompt for passphrase

https://wiki.archlinux.org/title/Dm-cry … -generator
What does your grub.cfg look like?

Offline

#3 Yesterday 21:17:58

ralof
Member
Registered: 2022-09-03
Posts: 5

Re: after loading initial ramdisk fails to show prompt for passphrase

seth wrote:

What does your grub.cfg look like?

my generated grub.cfg looks like this:

# cat /boot/grub/grub.cfg 
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi

if [ "${env_block}" ] ; then
  set env_block="(${root})${env_block}"
  export env_block
  load_env -f "${env_block}"
fi

if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   if [ "${env_block}" ] ; then
     save_env -f "${env_block}" next_entry
   else
     save_env next_entry
   fi
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    if [ "${env_block}" ] ; then
      save_env -f "${env_block}" saved_entry
    else
      save_env saved_entry
    fi

  fi
}

function load_video {
  if [ x$grub_platform = xefi ]; then
    insmod efi_gop
  elif [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if loadfont unicode ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-8ba65e5a-2f18-4396-99dc-8807419ed7ac' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root F459-D248
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=UUID=8ba65e5a-2f18-4396-99dc-8807419ed7ac rw  loglevel=3 quiet
	echo	'Loading initial ramdisk ...'
	initrd	/intel-ucode.img /initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-8ba65e5a-2f18-4396-99dc-8807419ed7ac' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-8ba65e5a-2f18-4396-99dc-8807419ed7ac' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod fat
		search --no-floppy --fs-uuid --set=root F459-D248
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=8ba65e5a-2f18-4396-99dc-8807419ed7ac rw  loglevel=3 quiet
		echo	'Loading initial ramdisk ...'
		initrd	/intel-ucode.img /initramfs-linux.img
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/15_ostree ###
### END /etc/grub.d/15_ostree ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
  insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
	fwsetup --is-supported
	if [ "$?" = 0 ]; then
		menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
			fwsetup
		}
	fi
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/31_efi_bootnext ###
if [ "$grub_platform" = "efi" ]; then
  menuentry 'EFI USB Device (TOSHIBA) (EFI BootNext)' --class efi --class os $menuentry_id_option 'efi-bootnext-0000' {
    if bootnext 0000; then
      
      reboot
    fi
  }
fi
if [ "$grub_platform" = "efi" ]; then
  menuentry 'GRUB (EFI BootNext)' --class grub --class os $menuentry_id_option 'efi-bootnext-0001' {
    if bootnext 0001; then
      
      reboot
    fi
  }
fi
if [ "$grub_platform" = "efi" ]; then
  menuentry 'EFI USB Device (EFI BootNext)' --class efi --class os $menuentry_id_option 'efi-bootnext-2001' {
    if bootnext 2001; then
      
      reboot
    fi
  }
fi
if [ "$grub_platform" = "efi" ]; then
  menuentry 'EFI DVD/CDROM (EFI BootNext)' --class efi --class os $menuentry_id_option 'efi-bootnext-2002' {
    if bootnext 2002; then
      
      reboot
    fi
  }
fi
if [ "$grub_platform" = "efi" ]; then
  menuentry 'EFI Network (EFI BootNext)' --class efi --class os $menuentry_id_option 'efi-bootnext-2003' {
    if bootnext 2003; then
      
      reboot
    fi
  }
fi
### END /etc/grub.d/31_efi_bootnext ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

or did you mean a different file?

Offline

#4 Yesterday 21:37:49

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

Re: after loading initial ramdisk fails to show prompt for passphrase

etc/default/grub would have done as well

linux	/vmlinuz-linux root=UUID=8ba65e5a-2f18-4396-99dc-8807419ed7ac rw  loglevel=3 quiet

You're not setting https://wiki.archlinux.org/title/Dm-cry … .luks.uuid

Offline

#5 Yesterday 22:52:32

ralof
Member
Registered: 2022-09-03
Posts: 5

Re: after loading initial ramdisk fails to show prompt for passphrase

Thank you for looking at this, also, I think I mostly brushed over what was writen on the Dm-crypt page.
I added the following line to the /etc/crypttab (I think, that is where it belongs)

rd.luks.name=4ca72be8-8735-47a1-9d98-643c3693bf96=rootFS

since the prompt for  the passphrase still does not show up and I am starting  to grow some slightly frustrated at this (maybe bc its late!), I am considering to  re-do the whole setup, but  with / via the archinstall scrript

Offline

Board footer

Powered by FluxBB