You are not logged in.

#1 2019-05-29 14:05:11

t0ken_arch
Member
Registered: 2019-05-29
Posts: 2

Erratic boot errors with LVM and two SSDs

Hi everyone,

I installed Arch on my Thinkpad X1 Extreme on a second internal SSD. On the first one is another Linux and Windows installation. When I boot from the second drive via grub, it takes two or three tries after decrypting the hard drive to complete booting. In the other cases, I get dropped into an emergency shell. I have spent countless hours so far in order to fix it.

When I remove the quite flag in the GRUB_CMDLINE_LINUX_DEFAULT, it shows me the following error after entering my decryption passphrase:

A password is required to access the vg0 volume:
Enter passphrase for /dev/nvme1n1p3:

Waiting 10 seconds for device /dev/mapper/vg0/lv_root
ERROR: device '/dev/mapper/vg0-lv_root' not found. Skipping fsck.
:: mounting '/dev/mapper/vg0-lv_root' on real root
mount: /new_root: no filesystem type specified.
You are now being dropped into an emergency shell.
sh: can't access tty: job control turned off
[rootfs #]
lsblk
NAME              MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
nvme1n1           259:0    0 931.5G  0 disk  
├─nvme1n1p1       259:1    0   500M  0 part  
├─nvme1n1p2       259:2    0   500M  0 part  /boot
└─nvme1n1p3       259:3    0 930.5G  0 part  
  └─vg0           254:0    0 930.5G  0 crypt 
    ├─vg0-lv_root 254:1    0    40G  0 lvm   /
    └─vg0-lv_home 254:2    0 890.5G  0 lvm   /home
nvme0n1           259:4    0 931.5G  0 disk  
├─nvme0n1p1       259:5    0   200M  0 part  
├─nvme0n1p2       259:6    0     1G  0 part  
├─nvme0n1p3       259:7    0   640G  0 part  
├─nvme0n1p4       259:8    0    16M  0 part  
└─nvme0n1p5       259:9    0 290.3G  0 part
cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/mapper/vg0-lv_root
UUID=8ea9ae8f-fb4b-4721-819c-a45e2b54b608	/         	ext4      	rw,relatime	0 1

# /dev/nvme1n1p2
UUID=d9fab78e-3fce-4743-a055-be43e3f5cfcb	/boot     	ext2      	rw,relatime,block_validity,barrier,user_xattr,acl	0 2

# /dev/mapper/vg0-lv_home
UUID=34a3e2fe-dd68-4b52-b4f5-44345951eb5f	/home     	ext4      	rw,relatime	0 2
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 [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   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}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    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
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
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-8ea9ae8f-fb4b-4721-819c-a45e2b54b608' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  d9fab78e-3fce-4743-a055-be43e3f5cfcb
	else
	  search --no-floppy --fs-uuid --set=root d9fab78e-3fce-4743-a055-be43e3f5cfcb
	fi
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=/dev/mapper/vg0-lv_root rw  cryptdevice=/dev/nvme1n1p3:vg0 fan_control=1
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-8ea9ae8f-fb4b-4721-819c-a45e2b54b608' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-8ea9ae8f-fb4b-4721-819c-a45e2b54b608' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  d9fab78e-3fce-4743-a055-be43e3f5cfcb
		else
		  search --no-floppy --fs-uuid --set=root d9fab78e-3fce-4743-a055-be43e3f5cfcb
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=/dev/mapper/vg0-lv_root rw  cryptdevice=/dev/nvme1n1p3:vg0 fan_control=1
		echo	'Loading initial ramdisk ...'
		initrd	/initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-8ea9ae8f-fb4b-4721-819c-a45e2b54b608' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  d9fab78e-3fce-4743-a055-be43e3f5cfcb
		else
		  search --no-floppy --fs-uuid --set=root d9fab78e-3fce-4743-a055-be43e3f5cfcb
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=/dev/mapper/vg0-lv_root rw  cryptdevice=/dev/nvme1n1p3:vg0 fan_control=1
		echo	'Loading initial ramdisk ...'
		initrd	/initramfs-linux-fallback.img
	}
}

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

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

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-8358-B36F' {
	insmod part_gpt
	insmod fat
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  8358-B36F
	else
	  search --no-floppy --fs-uuid --set=root 8358-B36F
	fi
	chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###

### 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 ###
cat /etc/mkinitcpio.conf          
MODULES=(i915)

# BINARIES
BINARIES=()

# FILES
FILES=()

# HOOKS
HOOKS=(base udev autodetect keyboard keymap modconf block encrypt lvm2 filesystems fsck)
cat /etc/default/grub 
# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=/dev/nvme1n1p3:vg0 fan_control=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

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# 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

I really appreciate any help. I already tried switching the hooks from udev to systemd, but this didn't work.

Thanks in advance,
t0ken

Last edited by t0ken_arch (2019-05-29 14:07:32)

Offline

#2 2019-05-29 14:23:47

frostschutz
Member
Registered: 2013-11-15
Posts: 1,409

Re: Erratic boot errors with LVM and two SSDs

cat /proc/partitions and ls -l /dev/mapper in the initrd shell might be interesting

also cat /proc/cmdline just to verify that kernel parameters are what you expected

also dmesg in case of errors

Last edited by frostschutz (2019-05-29 14:24:57)

Offline

#3 2019-05-29 14:37:34

t0ken_arch
Member
Registered: 2019-05-29
Posts: 2

Re: Erratic boot errors with LVM and two SSDs

Hi frostschutz,

thanks for your response. This is the output of the commands while it was possible to boot. I will try to get further dmesg output from a failed attempt.

cat /proc/partitions 
major minor  #blocks  name

 259        0  976762584 nvme1n1
 259        1     512000 nvme1n1p1
 259        2     512000 nvme1n1p2
 259        3  975737543 nvme1n1p3
 259        4  976762584 nvme0n1
 259        5     204800 nvme0n1p1
 259        6    1048576 nvme0n1p2
 259        7  671098880 nvme0n1p3
 259        8      16384 nvme0n1p4
 259        9  304392192 nvme0n1p5
 254        0  975735495 dm-0
 254        1   41943040 dm-1
 254        2  933789696 dm-2
ls -l /dev/mapper 
total 0
crw------- 1 root root 10, 236 May 29 15:07 control
lrwxrwxrwx 1 root root       7 May 29 15:07 vg0 -> ../dm-0
lrwxrwxrwx 1 root root       7 May 29 15:07 vg0-lv_home -> ../dm-2
lrwxrwxrwx 1 root root       7 May 29 15:07 vg0-lv_root -> ../dm-1
cat /proc/cmdline 
BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/vg0-lv_root rw cryptdevice=/dev/nvme1n1p3:vg0 fan_control=1

Offline

Board footer

Powered by FluxBB