You are not logged in.
Pages: 1
Installed a LUKS encrypted system following the Arch Wiki (installed this method before and had good results). However, on reboot, after typing in the passphrase, I am given the following error and given a recovery shell:
ERROR: device '/dev/mapper/vg0-lv_root' not found. Skipping fsck.
My situation is very similar to the one in this thread, but after trying their solution, the problem persists. However, I am unsure to whether I correctly edited the UUID necessary, so I will post my files below.
Last edited by hexated (2019-11-06 07:20:27)
Offline
(edit: changed screenshot of blkid to text)
fstab:
# /dev/mapper/vg0-lv_root
UUID=e8b9f901-394a-4e77-92ae-b9225214abfe / ext4 rw,relatime 0 1
# /dev/nvme0n1p2
UUID=872b5839-0663-4ba0-a408-94ceece5f535 /boot ext4 rw,relatime 0 2
# /dev/mapper/vg0-lv_home
UUID=ebf0feaf-03e2-4ecf-b8f4-67928532a55c /home ext4 rw,relatime 0 2
#blkid output
/dev/nvme0n1p1: UUID="4E45-0139" TYPE="vfat" PARTUUID="27d4c4f1-f4e8-1f49-beca-04fb7b1763b3"
/dev/nvme0n1p2: UUID="872b5839-0663-4ba0-a408-94ceece5f535" TYPE="ext4" PARTUUID="04d0c099-e54a-754c-a158-6660a6e2a7c6"
/dev/nvme0n1p3: UUID="9814f284-a529-4e9d-b707-8a3c448d7aa3" TYPE="crypto_LUKS" PARTUUID="7dc20922-cc4a-9643-9a4c-f139d6603cad"
/dev/sda1: UUID="2019-11-01-16-33-14-00" LABEL="ARCH_201911" TYPE="iso9660" PTUUID="65cc13ea" PTTYPE="dos" PARTUUID="65cc13ea-01"
/dev/sda2: SEC_TYPE="msdos" LABEL_FATBOOT="ARCHISO_EFI" LABEL="ARCHISO_EFI" UUID="E058-601A" TYPE="vfat" PARTUUID="65cc13ea-02"
/dev/loop0: TYPE="squashfs"
/dev/mapper/lvm: UUID="uQzYx6-N6QF-xJRx-06Sk-9ZWl-eeaJ-6vPoen" TYPE="LVM2_member"
/dev/mapper/vg0-lv_root: UUID="e8b9f901-394a-4e77-92ae-b9225214abfe" TYPE="ext4"
/dev/mapper/vg0-lv_home: UUID="ebf0feaf-03e2-4ecf-b8f4-67928532a55c" TYPE="ext4"
grub.conf, kernel line:
linux \vmlimuz-linux-lts root=/dev/mapper/vg0-lv_root rw cryptdevice=/dev/nvme0n1p3:vg0 loglevel=3 quiet
On another note, I also checked to makesure my hooks were setup in mkinitcpio.conf, and I did add encrypt and lvm2.
Last edited by hexated (2019-11-06 06:32:37)
Offline
From the recovery shell, can you manually open the LVs with vgchange and unlock the cryptdevice?
Offline
I attempted to unlock the lv for vgchange but it returned:
[rootfs]# cryptsetup open /dev/nvme0n1p3 lvm
Enter passphrase ...
Cannot use device /dev/nvme0n1p3 which is already in use (already mapped or mounted).
Last edited by hexated (2019-11-06 05:36:06)
Offline
Is this LVM on LUKS? If the cryptdevice is unlocked you should be able to enable the logical volumes.
Offline
Yes, the LVM is on LUKS. My mistake, I had forgotten that I unlocked the LVM earlier in startup. Unfortunately, vg commands do not work in the recovery shell. I think the user in the thread I mentioned also had the same problem with vgchange.
Last edited by hexated (2019-11-06 05:47:29)
Offline
Unfortunately, vg commands do not work in the recovery shell.
That's not an error message. Please report the exact command you issued and the output.
Offline
[rootfs]# vgchange
sh: vgchange: not found
[rootfs]# vgscan
sh: vgscan: not found
Last edited by hexated (2019-11-06 05:52:12)
Offline
You are supposed to pass options to the command.
If it still fails, try prepending lvm to the command: lvm vgchange -a y $groupname
Offline
[rootfs]# vgchange -ay vg0
sh: vgchange: not found
[rootfs]# lvm vgchange -ay vg0
sh: lvm: not found
On a side note, thank you for being patient with me. I'm not very experienced with LUKS LVM setup and the fat portion of my knowledge is shallow stuff from just reading wikis.
Offline
Alright. You'll need to chroot in and paste details of your setup (as text, not screenshots). Please include your boot loader/manager, mkinitcpio.conf and a blkid as text.
Offline
I'll borrow my friend's laptop tomorrow to ssh into my arch machine so I can copy paste in the config files. Currently my setup is just my phone and laptop (the one in question).
Offline
You can use the live media, in the same way you installed Arch...
Offline
The live media includes a web browser? Sorry, I thought it was just the command line interface.
Offline
You don't need a browser: https://wiki.archlinux.org/index.php/Li … in_clients
Offline
Didn't know about the pastebin functionallity, cool.
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 [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod lvm
insmod ext2
set root='lvmid/j9xOWG-sINY-4NCb-1fyZ-VPIM-gDmN-XlLpQ0/566C3T-I54c-bbpF-Xv7H-qPym-lRsi-iUyxeZ'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='lvmid/j9xOWG-sINY-4NCb-1fyZ-VPIM-gDmN-XlLpQ0/566C3T-I54c-bbpF-Xv7H-qPym-lRsi-iUyxeZ' e8b9f901-394a-4e77-92ae-b9225214abfe
else
search --no-floppy --fs-uuid --set=root e8b9f901-394a-4e77-92ae-b9225214abfe
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; 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-e8b9f901-394a-4e77-92ae-b9225214abfe' {
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 872b5839-0663-4ba0-a408-94ceece5f535
else
search --no-floppy --fs-uuid --set=root 872b5839-0663-4ba0-a408-94ceece5f535
fi
echo 'Loading Linux linux-lts ...'
linux /vmlinuz-linux-lts root=/dev/mapper/vg0-lv_root rw cryptdevice=/dev/nvme0n1p3:vg0:allow-discards loglevel=3 quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux-lts.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-e8b9f901-394a-4e77-92ae-b9225214abfe' {
menuentry 'Arch Linux, with Linux linux-lts' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-advanced-e8b9f901-394a-4e77-92ae-b9225214abfe' {
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 872b5839-0663-4ba0-a408-94ceece5f535
else
search --no-floppy --fs-uuid --set=root 872b5839-0663-4ba0-a408-94ceece5f535
fi
echo 'Loading Linux linux-lts ...'
linux /vmlinuz-linux-lts root=/dev/mapper/vg0-lv_root rw cryptdevice=/dev/nvme0n1p3:vg0:allow-discards loglevel=3 quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux-lts.img
}
menuentry 'Arch Linux, with Linux linux-lts (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-fallback-e8b9f901-394a-4e77-92ae-b9225214abfe' {
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 872b5839-0663-4ba0-a408-94ceece5f535
else
search --no-floppy --fs-uuid --set=root 872b5839-0663-4ba0-a408-94ceece5f535
fi
echo 'Loading Linux linux-lts ...'
linux /vmlinuz-linux-lts root=/dev/mapper/vg0-lv_root rw cryptdevice=/dev/nvme0n1p3:vg0:allow-discards loglevel=3 quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux-lts-fallback.img
}
menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-e8b9f901-394a-4e77-92ae-b9225214abfe' {
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 872b5839-0663-4ba0-a408-94ceece5f535
else
search --no-floppy --fs-uuid --set=root 872b5839-0663-4ba0-a408-94ceece5f535
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=/dev/mapper/vg0-lv_root rw cryptdevice=/dev/nvme0n1p3:vg0:allow-discards loglevel=3 quiet
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-e8b9f901-394a-4e77-92ae-b9225214abfe' {
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 872b5839-0663-4ba0-a408-94ceece5f535
else
search --no-floppy --fs-uuid --set=root 872b5839-0663-4ba0-a408-94ceece5f535
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=/dev/mapper/vg0-lv_root rw cryptdevice=/dev/nvme0n1p3:vg0:allow-discards loglevel=3 quiet
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 ###
### 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 ###
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=()
# 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 block filesystems)
#
## This setup will generate a 'full' image which supports most systems.
## No autodetection is done.
# HOOKS=(base udev block filesystems)
#
## This setup assembles a pata mdadm array with an encrypted root FS.
## Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
# HOOKS=(base udev block mdadm encrypt filesystems)
#
## This setup loads an lvm2 volume group on a usb device.
# HOOKS=(base udev block lvm2 filesystems)
#
## NOTE: If you have /usr on a separate partition, you MUST include the
# usr, fsck and shutdown hooks.
HOOKS=(base udev autodetect modconf block encrypt lvm2 filesystems keyboard fsck)
# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"
# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()
blkid:
[root@archiso /]# blkid
/dev/nvme0n1p1: UUID="4E45-0139" TYPE="vfat" PARTUUID="27d4c4f1-f4e8-1f49-beca-04fb7b1763b3"
/dev/nvme0n1p2: UUID="872b5839-0663-4ba0-a408-94ceece5f535" TYPE="ext4" PARTUUID="04d0c099-e54a-754c-a158-6660a6e2a7c6"
/dev/nvme0n1p3: UUID="9814f284-a529-4e9d-b707-8a3c448d7aa3" TYPE="crypto_LUKS" PARTUUID="7dc20922-cc4a-9643-9a4c-f139d6603cad"
/dev/sda1: UUID="2019-11-01-16-33-14-00" LABEL="ARCH_201911" TYPE="iso9660" PTUUID="65cc13ea" PTTYPE="dos" PARTUUID="65cc13ea-01"
/dev/sda2: SEC_TYPE="msdos" LABEL_FATBOOT="ARCHISO_EFI" LABEL="ARCHISO_EFI" UUID="E058-601A" TYPE="vfat" PARTUUID="65cc13ea-02"
/dev/loop0: TYPE="squashfs"
/dev/mapper/lvm: UUID="uQzYx6-N6QF-xJRx-06Sk-9ZWl-eeaJ-6vPoen" TYPE="LVM2_member"
/dev/mapper/vg0-lv_root: UUID="e8b9f901-394a-4e77-92ae-b9225214abfe" TYPE="ext4"
/dev/mapper/vg0-lv_home: UUID="ebf0feaf-03e2-4ecf-b8f4-67928532a55c" TYPE="ext4"
Last edited by hexated (2019-11-06 06:24:51)
Offline
Did you install the lvm2 package after pacstrap? I think this is one of the packages removed from the 'base' package, so you need to install it explicitly before exiting arch-chroot.
Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.
Offline
Installing lvm2 separately fixed the problem with being unable to find the LUKS LVM thank you. However, I'm confused as the repo says that base still includes lvm2 here .
Offline
The new installation guide has "The base package does not include all tools from the live installation, so installing other packages may be necessary for a fully functional base system. In particular, consider installing: ... utilities for accessing RAID or LVM partitions", but the article for LVM doesn't have a section describing how to install LVM utilities because it used to be in base. I've been meaning to update the Wiki but I haven't had the time
Offline
My bad then, I should have checked the new installation guide for updates. Thank you for your help.
Offline
Pages: 1