You are not logged in.

#1 2019-03-30 09:50:04

archelvetic
Member
Registered: 2017-10-26
Posts: 45

systemd-cryptsetup[537]: Cannot use device which is in use

Upon submitting the passphrase after booting, I get the message
Failed to start Cryptography Setup for encryptedBOOT.

I clearly must have mixed up something, looking at this message line below:

Mar 30 10:00:26 x systemd-cryptsetup[541]: Cannot use device /dev/disk/by-uuid/16459d28-76a6-40c4-b96d-090cf2f411fc which is in use (already mapped or mounted).

What did I miss?

systemctl status systemd-cryptsetup@encryptedBOOT.service

● systemd-cryptsetup@encryptedBOOT.service - Cryptography Setup for encryptedBOOT
   Loaded: loaded (/etc/crypttab; generated)
   Active: failed (Result: exit-code) since Sat 2019-03-30 10:00:26 UTC; 1min 39s ago
     Docs: man:crypttab(5)
           man:systemd-cryptsetup-generator(8)
           man:systemd-cryptsetup@.service(8)
  Process: 541 ExecStart=/usr/lib/systemd/systemd-cryptsetup attach encryptedBOOT /dev/disk/by-uuid/16459d28-76a6-40c4-b96d-090cf2f411fc none luks,timeout=180 (code=exited, status=1/FAILURE)
 Main PID: 541 (code=exited, status=1/FAILURE)

Mar 30 10:00:17 x systemd[1]: Starting Cryptography Setup for encryptedBOOT...
Mar 30 10:00:24 x systemd-cryptsetup[541]: Set cipher aes, mode xts-plain64, key size 512 bits for device /dev/disk/by-uuid/16459d28-76a6-40c4-b96d-090cf2f411fc.
Mar 30 10:00:26 x systemd-cryptsetup[541]: Cannot use device /dev/disk/by-uuid/16459d28-76a6-40c4-b96d-090cf2f411fc which is in use (already mapped or mounted).
Mar 30 10:00:26 x systemd-cryptsetup[541]: Failed to activate with specified passphrase: Device or resource busy
Mar 30 10:00:26 x systemd[1]: systemd-cryptsetup@encryptedBOOT.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 10:00:26 x systemd[1]: systemd-cryptsetup@encryptedBOOT.service: Failed with result 'exit-code'.
Mar 30 10:00:26 x systemd[1]: Failed to start Cryptography Setup for encryptedBOOT.

cat /proc/cmdline

BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/Arch-root rw cryptdevice=/dev/sda3:crypto resume=/dev/mapper/Arch-swap quiet

journalctl -b | grep crypt

Mar 30 09:02:09 x kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/Arch-root rw cryptdevice=/dev/sda3:crypto resume=/dev/mapper/Arch-swap quiet
Mar 30 09:02:09 x kernel: Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=/dev/mapper/Arch-root rw cryptdevice=/dev/sda3:crypto resume=/dev/mapper/Arch-swap quiet
Mar 30 09:02:09 x kernel: Freeing unused decrypted memory: 2040K
Mar 30 09:02:09 x kernel: cryptd: max_cpu_qlen set to 1000
Mar 30 09:02:09 x kernel: random: cryptsetup: uninitialized urandom read (4 bytes read)
Mar 30 09:02:09 x kernel: random: cryptsetup: uninitialized urandom read (4 bytes read)
Mar 30 09:02:09 x kernel: random: cryptsetup: uninitialized urandom read (2 bytes read)
Mar 30 09:02:09 x kernel: device-mapper: crypt: xts(aes) using implementation "xts-aes-aesni"
Mar 30 09:02:10 x systemd[1]: Starting Cryptography Setup for encryptedBOOT...
Mar 30 09:02:16 x systemd-cryptsetup[537]: Set cipher aes, mode xts-plain64, key size 512 bits for device /dev/disk/by-uuid/16459d28-76a6-40c4-b96d-090cf2f411fc.
Mar 30 09:02:18 x systemd-cryptsetup[537]: Cannot use device /dev/disk/by-uuid/16459d28-76a6-40c4-b96d-090cf2f411fc which is in use (already mapped or mounted).
Mar 30 09:02:18 x systemd-cryptsetup[537]: Failed to activate with specified passphrase: Device or resource busy
Mar 30 09:02:18 x systemd[1]: systemd-cryptsetup@encryptedBOOT.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 09:02:18 x systemd[1]: systemd-cryptsetup@encryptedBOOT.service: Failed with result 'exit-code'.
Mar 30 09:02:18 x systemd[1]: Failed to start Cryptography Setup for encryptedBOOT.
Mar 30 09:02:18 x systemd[1]: Dependency failed for Local Encrypted Volumes.
Mar 30 09:02:18 x systemd[1]: cryptsetup.target: Job cryptsetup.target/start failed with result 'dependency'.
Mar 30 09:02:18 x audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-cryptsetup@encryptedBOOT comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Mar 30 09:02:18 x kernel: audit: type=1130 audit(1553936538.714:15): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-cryptsetup@encryptedBOOT comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Mar 30 09:02:29 x systemd[657]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Mar 30 09:02:29 x systemd[657]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Mar 30 09:02:29 x systemd[657]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Mar 30 09:02:29 x systemd[657]: Listening on GnuPG cryptographic agent and passphrase cache.

dmesg | grep -i "warn\|fail\|error"

Mar 30 09:02:09 x kernel: acpi PNP0A08:00: _OSC failed (AE_SUPPORT); disabling ASPM
Mar 30 09:02:09 x kernel: RAS: Correctable Errors collector initialized.
Mar 30 09:02:10 x kernel: ACPI Warning: SystemIO range 0x0000000000000428-0x000000000000042F conflicts with OpRegion 0x0000000000000400-0x000000000000047F (\_SB.PCI0.LPC.PMIO) (20181213/utaddress-213)
Mar 30 09:02:10 x kernel: ACPI Warning: SystemIO range 0x0000000000000540-0x000000000000054F conflicts with OpRegion 0x0000000000000500-0x000000000000057F (\_SB.PCI0.LPC.LPIO) (20181213/utaddress-213)
Mar 30 09:02:10 x kernel: ACPI Warning: SystemIO range 0x0000000000000530-0x000000000000053F conflicts with OpRegion 0x0000000000000500-0x000000000000057F (\_SB.PCI0.LPC.LPIO) (20181213/utaddress-213)
Mar 30 09:02:10 x kernel: ACPI Warning: SystemIO range 0x0000000000000500-0x000000000000052F conflicts with OpRegion 0x0000000000000500-0x000000000000057F (\_SB.PCI0.LPC.LPIO) (20181213/utaddress-213)
Mar 30 09:02:10 x kernel: platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
Mar 30 09:02:10 x kernel: cfg80211: failed to load regulatory.db
Mar 30 09:02:16 x kernel: random: 5 urandom warning(s) missed due to ratelimiting
Mar 30 09:02:18 x systemd-cryptsetup[537]: Failed to activate with specified passphrase: Device or resource busy
Mar 30 09:02:18 x systemd[1]: systemd-cryptsetup@encryptedBOOT.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 09:02:18 x systemd[1]: systemd-cryptsetup@encryptedBOOT.service: Failed with result 'exit-code'.
Mar 30 09:02:18 x systemd[1]: Failed to start Cryptography Setup for encryptedBOOT.
Mar 30 09:02:18 x systemd[1]: Dependency failed for Local Encrypted Volumes.
Mar 30 09:02:18 x systemd[1]: cryptsetup.target: Job cryptsetup.target/start failed with result 'dependency'.
Mar 30 09:02:18 x audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-cryptsetup@encryptedBOOT comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Mar 30 09:02:18 x kernel: audit: type=1130 audit(1553936538.714:15): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-cryptsetup@encryptedBOOT comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Mar 30 09:02:18 x systemctl[654]: Failed to stop systemd-ask-password-plymouth.path: Unit systemd-ask-password-plymouth.path not loaded.
Mar 30 09:02:18 x systemctl[654]: Failed to stop systemd-ask-password-plymouth.service: Unit systemd-ask-password-plymouth.service not loaded.

/etc/fstab

# /dev/mapper/Arch-root
UUID=46268152-ba54-4ecf-ad04-b381c8da1c2b    /           ext4        rw,relatime 0 1

# /dev/sda2
UUID=b558ecc3-2d22-481b-91eb-26cdc2e86cf0    /boot       ext2        rw,relatime,block_validity,barrier,user_xattr,acl   0 2

# /dev/sda1
UUID=7AE8-13D9          /boot/efi   vfat        rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro   0 2

# /dev/mapper/Arch-swap
UUID=4ef43d75-a4c7-4ef0-84d9-66a968578ff1    none        swap        defaults    0 0

/etc/crypttab

# Configuration for encrypted block devices.
# See crypttab(5) for details.

# NOTE: Do not list your root (/) partition here, it must be set up
#       beforehand by the initramfs (/etc/mkinitcpio.conf).

# <name>       <device>                                     <password>              <options>
# home         UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37    /etc/mypassword1
# data1        /dev/sda3                                    /etc/mypassword2
# data2        /dev/sda5                                    /etc/cryptfs.key
# swap         /dev/sdx4                                    /dev/urandom            swap,cipher=aes-cbc-essiv:sha256,size=256
# vol          /dev/sdb7                                    none
encryptedBOOT  UUID=16459d28-76a6-40c4-b96d-090cf2f411fc    none                    luks,timeout=180

lsblk -f

NAME            FSTYPE      LABEL UUID                                   FSAVAIL FSUSE% MOUNTPOINT
sda                                                                                     
├─sda1          vfat              7AE8-13D9                                98.3M     0% /boot/efi
├─sda2          ext2              b558ecc3-2d22-481b-91eb-26cdc2e86cf0    154.4M    31% /boot
└─sda3          crypto_LUKS       16459d28-76a6-40c4-b96d-090cf2f411fc                  
  └─crypto      LVM2_member       rPLuHu-xIDH-hRKB-WL5g-po3e-HmZz-blhnV3                
    ├─Arch-swap swap              4ef43d75-a4c7-4ef0-84d9-66a968578ff1                  [SWAP]
    └─Arch-root ext4              46268152-ba54-4ecf-ad04-b381c8da1c2b    108.1G     2% /

I followed these steps for setting up an uefi booting installation https://gist.github.com/HardenedArray/3 … a9ba458b07

Offline

Board footer

Powered by FluxBB