You are not logged in.

#1 2016-09-20 20:20:22

oarmstrong
Member
From: London, UK
Registered: 2013-12-30
Posts: 5
Website

btrfs and dm-crypt: mount: mount(2) failed: /new_root: No such file...

I'm having issues with a new install in a VirtualBox VM.  It is using dm-crypt and a btrfs partition.

On boot, the following issue occurs.

:: running early hook [udev]
starting version 231
:: running hook [udev]
:: Triggering uevents...
:: running hook [encrypt]

A password is required to access the archroot volume:
Enter passphrase for /dev/sda2:
:: performing fsck on '/dev/mapper/archroot'
:: mounting '/dev/mapper/archroot' on real root
mount: mount(2) failed: /new_root: No such file or directory
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]# 

At this point I can run

mount /dev/mapper/archroot /new_root

and exiting then proceeds to boot correctly.

I've ensured my mkinitcpio.conf is correct and regenerated the initramfs, as well as playing with the cryptdevice and root kernel arguments.  This is my first btrfs installation so I wouldn't be surprised if I've done something incorrect in that regard.

mkinicpio.conf

[root@arch-vm ~]# 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="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="/usr/bin/btrfs"

# 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 encrypt autodetect modconf block 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=""

fdisk -l

[root@arch-vm ~]# fdisk -l
Disk /dev/sda: 30 GiB, 32211639808 bytes, 62913359 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 02FDA096-ADE0-4D08-8B3D-8786FA70C7E4

Device       Start      End  Sectors  Size Type
/dev/sda1     2048  1050623  1048576  512M EFI System
/dev/sda2  1050624 62913325 61862702 29.5G Linux filesystem


Disk /dev/mapper/archroot: 29.5 GiB, 31671606272 bytes, 61858606 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

systemd-boot configuration

[root@arch-vm ~]# cat /boot/loader/entries/arch.conf 
title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options cryptdevice=UUID=51a18c0e-9bc6-4f64-995e-09504e626cb3:archroot root=UUID=5705c3aa-32ba-4554-8787-51f7cd0d2e24 rw rootflags=subvol=ROOT

I really appreciate any help.  Thanks.

Offline

#2 2016-09-21 13:52:09

rdeckard
Wiki Maintainer
Registered: 2015-01-28
Posts: 137

Re: btrfs and dm-crypt: mount: mount(2) failed: /new_root: No such file...

What are the contents of

/etc/fstab

and what is the output of

btrfs subvolume list /

?

Offline

Board footer

Powered by FluxBB