You are not logged in.
Pages: 1
I'm using lvm on luks. Basically I followed this guide when I installed Arch: http://blog.philippbeck.net/linux/archl … s-grub2-69
So this morning I did sudo pacman -Syyu and now I have this error.
I did boot into a live usb and tried this:
pacman -Syyu
pacman -S udev
pacman -S mkinitcpio
mkinitcpio -p linux
exit
rebootThere was no error but it didn't change anything.
I also tried to change hooks order of lvm2 and encrypt in /etc/default/grub because I've read it might be that. Also changed the cmdline in mkinitpcio.conf from
GRUB_CMDLINE_LINUX=”cryptdevice=/dev/sda2:main” to
GRUB_CMDLINE_LINUX=”cryptdevice=/dev/sda2:main root=/dev/mapper/main-root” Changed the hook order of block after I saw this SO answer
http://unix.stackexchange.com/questions … using-grub
I checked my fstab and the result of ls -l /dev/disk/by-uuid and it seem right. / is pointing to the root partition.
mkinitpcio.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=""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, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-87a43650-24e4-4a3c-9b4c-15360e25272b' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 75a1e9c0-4e4c-44fb-a04c-f4db0f1b6bd3
else
search --no-floppy --fs-uuid --set=root 75a1e9c0-4e4c-44fb-a04c-f4db0f1b6bd3
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=/dev/mapper/main-root rw cryptdevice=/dev/sda2:main 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-87a43650-24e4-4a3c-9b4c-15360e25272b' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 75a1e9c0-4e4c-44fb-a04c-f4db0f1b6bd3
else
search --no-floppy --fs-uuid --set=root 75a1e9c0-4e4c-44fb-a04c-f4db0f1b6bd3
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=/dev/mapper/main-root rw cryptdevice=/dev/sda2:main 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 ###
### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###/etc/default/grub:
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:main"
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# 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_SUBMENU=y
# 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"
#GRUB_SAVEDEFAULT="true"lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ext4 75a1e9c0-4e4c-44fb-a04c-f4db0f1b6bd3 /mnt/boot
├─sda2 crypto_LUKS 9aebde30-7629-41d9-bba5-e7437770e91e
│ └─lvm LVM2_member 9Dy3Z0-CmQx-Gzr8-jXew-Wtyf-4dpO-OAY6fK
│ ├─main-root ext4 87a43650-24e4-4a3c-9b4c-15360e25272b /mnt
│ ├─main-swap swap c04925d6-7910-4e42-8b25-c59a57013899
│ └─main-home ext4 eb5a403c-dd42-42ba-9296-1a6f96db3b60
└─sda3
sdb iso9660 ARCH_201508 2015-08-01-07-07-00-00
├─sdb1 iso9660 ARCH_201508 2015-08-01-07-07-00-00 /run/archiso/bootmnt
└─sdb2 vfat ARCHISO_EFI FC80-9700
sdc
├─sdc1 ntfs disk1 7BE208D87A3A43E6
└─sdc2 ntfs 552B45237F2B9C1C /root/usb
sr0
loop0 squashfs /run/archiso/sfs/airootfs
loop1 ext4 32e498eb-15be-44a3-a659-e1c0f8b48f2b
└─arch_airootfs ext4 32e498eb-15be-44a3-a659-e1c0f8b48f2b /
loop2 ext4 32e498eb-15be-44a3-a659-e1c0f8b48f2b
└─arch_airootfs ext4 32e498eb-15be-44a3-a659-e1c0f8b48f2b /The error:
ERROR: device 'UUID=87a43650-24e4-4a3c-9b4c-15360e25272b' not found. Skipping fsck.
ERROR: Unable to find root device '87a43650-24e4-4a3c-9b4c-15360e25272b'.
You are being dropped to a recovery shell
Type 'exit' to try and continue booting
sh: can't access tty; job control turned off
[rootfs /]# _Any idea about this? Feels like I'm getting out of things to try. This seem like a safe update, I got like 5 packets and it was just firefox and other stuff
But it still doesn't work. Not that before this happened I just had this line:
cryptdevice=/dev/sda2:mainand it used to work. I also have another computer with the exact same setting and it's working... I mean I installed both machine few month ago following this guide. So the other machine didn't get the latest update. This is a list of the packet I got today:
Packages (12) firefox-39.0.3-1 fribidi-0.19.7-1 imagemagick-6.9.1.10-1 iso-codes-3.60-1 lib32-libpng-1.6.18-1 libgusb-0.2.6-1
libpng-1.6.18-1 mongodb-3.0.5-1 npm-2.13.4-1 python-setuptools-1:18.1-2 python2-setuptools-1:18.1-2 scrapy-1.0.2-1I'm not 100% sure the update caused the issue and I'm not going to try to update the other machine since the first one doesn't boot
Last edited by MisterChoc (2015-08-09 18:49:53)
Offline
This is why you should use UUIDs or labels: https://wiki.archlinux.org/index.php/Pe … ice_naming
Also, you seem to have a preference for documentation other than the wiki: that is never going to end well.
Not a Pacman issue, moving to NC...
Offline
I did try using the cryptdevice=UUID=... in grub.cfg but it's always the same thing. I suppose grub doesn't mount my partitions properly. Since I see a difference between good/wrong passphrases. If I use UUID grub will tell me he can't find uuid device (which is /root) and if I use label then it'll say "cannot find /dev/mapper/main-root".
But it used to work... So I don't think it should be something related to my grub.cfg... And as I said I did install 2 systems the day I setup this install. One is still fine but didn't get the latest update. And all configuration files are the same.
Offline
pacman -S udevwill install systemd instead (as it should, udev is a part of systemd now), however, it does imply that whichever guide you used is outdated, and that you should use Arch Wiki instead.
Last edited by Xabre (2015-08-09 17:40:15)
Offline
For someone to help you, you should post exact output for the machine ("lsblk -f is something similar to this" does not help much - it is obviously from your other machine; device and VG are different). Best you mount the root cryptdevice and its /boot again from the iso and pipe the output somewhere, eg.
lsblk -f > /mnt/boot/disklayout
blkid >> disklayoutedit out any parts in "disklayout" you don't want to share and do something like
curl -F 'sprunge=@-' http://sprunge.us </boot/diskwhich gives you an url to share here with the exact output.
Offline
pacman -S udevwill install systemd instead (as it should, udev is a part of systemd now), however, it does imply that whichever guide you used is outdated, and that you should use Arch Wiki instead.
This was from a post on a similar problem on the forum.
I know the guide is outdated. It has comment about it. And I also used the wiki, I did everything from https://wiki.archlinux.org/index.php/Dm … VM_on_LUKS , this won't solve my problem.
lsblk -f > /mnt/boot/disklayout blkid >> disklayoutedit out any parts in "disklayout" you don't want to share and do something like
curl -F 'sprunge=@-' http://sprunge.us </boot/diskwhich gives you an url to share here with the exact output.
Thanks for the little trick. Didn't know how to get output since I don't have access to an external drive or usb stick atm. Will be back with my outputs
edit: I edited my first post with my outputs, tell me if you need anything else
Last edited by MisterChoc (2015-08-09 18:13:44)
Offline
Ok, if you get dropped to recovery like that, you can open the cryptdevice ("cryptsetup open /dev/sda2 bootnow"), let it scan the lvm again ("vgscan" + "vgchange -ay"), "exit" recovery and it should boot.
The UUID for the cryptdevice is the luks-UUID (UUID of the /dev/sda2 partition). Both of the following should get it booting
cryptdevice=/dev/sda2:bootnowand
cryptdevice=UUID=9aebde30-7629-41d9-bba5-e7437770e91eCan you confirm both versions?
Offline
I can't seem to be able to do that because /dev/sda2 is already in use and I can't umount it. So I booted into live again and tried
cryptdevice=UUID=9aebde30-7629-41d9-bba5-e7437770e91ewich gave me errors at boot because the device mapper name
And this
cryptdevice=UUID=9aebde30-7629-41d9-bba5-e7437770e91e:maingives me the same error as before
After that I always
grub-mkconfig -o /boot/grub/grub.cfgvgscan
vgscan found volume group "main" using metadata type lvm2vgchange
3 logical volumes in volume group mainalso when I try to exit the recovery shell it says "mount: you must specify the filesystem"
Last edited by MisterChoc (2015-08-09 22:04:10)
Offline
Hm, don't know about the recovery shell response at the moment. (any case best use the fallback initramfs which you have). And for the other, yes, I forgot the dmname. I used dmname "bootnow" to ensure there is no gobble-up with the vgname "main":
cryptdevice=UUID=9aebde30-7629-41d9-bba5-e7437770e91e:bootnowor
cryptdevice=/dev/sda2:bootnowOffline
That didn't work either. I ended up reinstalling everything : (. With the same setup everything is fine.
Offline
Hi,
From the Archwiki Lvm: https://wiki.archlinux.org/index.php/LV … x_defaults
did you set in
/etc/lvm/lvm.confto
use_lvmetad=1then run
mkinitcpio -p linuxand mkconfig grub again.
In your mkinitcpio.conf add
MODULES=dm_modAfter I enabled
systemctl enable lvm2-lvmetad.serviceOffline
Pages: 1