Hanging on dots during boot - `/dev/mapper/luks-...` corrupted (?)

Hi Friends,

So I’ve re-installed Manjaro 25.06 latest ISO. After RNG’ing the boot a few times as per another post after the infinite hanging on the dots with no succes. And re-installing and formatting once again. I tried the following:

… During the boot after decrypting the drive once. I am able smash the ESC as the dots linger, being offered a second chance to decrypt the drive, although the first time worked – since I don’t get this far without the right decryption.

After decrypting twice I receive the following notification before correctly booting into the OS:
(blurry screenshot removed by community assistant)

As you see the main difference is the luks prefix (encryption) and the mapper rather than disk/by-uuid. the message reads failed to stat resume device. Maybe this is related to hibernation/sleep or sessions?

mkinit and updating grub I see this line (probably unrelated):
grub-probe: error: cannot find a GRUB drive for /dev/sdc1

Trying the newer kernel didn’t help either. I am running latest BIOS firmware after doing a factory reset on it.

The system works, but its cumbersome to boot, and I don’t want underlying issues with my new OS that may reappear later more severely. Sorry for the skimpy diagnostics, will add them when I transfer my login details to my semi-working Manjaro PC.

What is your resume device?

inxi -zv8
(format command output as “preformatted text”: → this symbol </>)

for more brevity also

lsblk -f

grep ^HOOKS /etc/mkinitcpio.conf

grep GRUB_CMDLINE_LINUX_DEFAULT /etc/default/grub

With the written info, that picture is useless - and blurry as well.
remove
Post text (copy/paste) instead of pictures - or upload pictures to image sharing platforms and share the link here.

1 Like

Please don’t use slang - what does the above even mean?

Possibly a reference to an attached USB stick - which can be ignored.
The same goes for the message that grub doesn’t recognise /dev/nvme...

Could be related to a recent change with mkinitcpio-openswap - please see the comments in the /etc/openswap.conf file.

openswap.conf
 $ cat /etc/openswap.conf
## cryptsetup open $swap_device $crypt_swap_name
## get uuid using e.g. lsblk -f
swap_device=/dev/disk/by-uuid/2788eb78-074d-4424-9f1d-ebffc9c37262
crypt_swap_name=cryptswap

## unlock_method can be either password, keyfile or keyfile_raw
## keyfile will use the keyfile_device and keyfile_filename to unlock the swap
## keyfile_raw will use the keyfile_device and keyfile_block_number to unlock the swap
## password will prompt for the password to unlock the swap
## if unlock_method is not set, then method is keyfile if keyfile_device and keyfile_filename are set
## otherwise it is password
unlock_method="password"
####### WARNING: There is a risk of data loss when using unlock_method="keyfile"
## You should double-check keyfile_device_mount_options,
## and note that this method is potentially dangerous regardless.
## https://docs.kernel.org/power/swsusp.html
## https://wiki.archlinux.org/title/Dm-crypt/Swap_encryption#busybox-based_initramfs


## keyfile_device is the device that contains the keyfile
## set it to the device that contains the keyfile
## e.g. /dev/mapper/root-device
####### THIS OPTION IS MANDATORY IF unlock_method IS keyfile OR keyfile_raw
keyfile_device=

## keyfile_filename is the path to the keyfile on the keyfile_device
## e.g. /etc/swap.key
####### THIS OPTION IS MANDATORY IF unlock_method IS keyfile
keyfile_filename=

## keyfile_block_number is the block number of the keyfile on the keyfile_device
## e.g. 12345
## on the ext4 filesystem, you can get the block number using
## debugfs $keyfile_device
## extents $keyfile_filename
## the relevant block number will appear under the Physical column in the output
####### THIS OPTION IS MANDATORY IF unlock_method IS keyfile_raw
keyfile_block_number=

## key_size is the size of the key in bytes
## e.g., 4096
## This is the size of the keyfile and should match the actual size of the keyfile.
## You can get the size of the keyfile using: wc -c <keyfile_filename>
## The openswap script will fail if the keyfile is fragmented,
## so keyfile_length should not exceed the filesystem block size.
## For ext4 filesystems, keyfile_length should not exceed 4096 bytes,
## and it SHOULD be greater than ~200 bytes to avoid inode inlining.
####### THIS OPTION IS MANDATORY IF unlock_method IS keyfile_raw
keyfile_length=4096

## additional arguments are given to mount for keyfile_device
## has to start with --options
## it is important to use the correct options for your filesystem
## to prevent any writes to the keyfile device and thus
## minimize the risk of data loss
#keyfile_device_mount_options="--options=subvol=__active/__"
keyfile_device_mount_options="--options=ro,noload"

## additional arguments are given to cryptsetup
## --allow-discards options is desired in case swap is on SSD partition
cryptsetup_options="--type luks"

It is a fact that encryption and hibernation does not play well together.

My advise is to avoid hibernation when using full disk encryption.

Should you choose to follow the advise, apply the required changes as follows

Required changes
  • remove resume from the HOOKS array in /etc/mkinitcpio.conf
  • remove resume from the kernel cmdline arguments in /etc/default/grub

Change swap to be dynamically encrypted on system start

  1. First assign a label to your swap partition
    e2label /dev/<your-swap-partition> cryptswap
    
  2. Change the /etc/fstab to mount your swap like
    /dev/mapper/swap  none swap  defaults,pri=-2  0  0
    
  3. Add this line to /etc/crypttab
    swap /dev/disk/by-partlabel/cryptswap /dev/urandom swap,offset=2048,cipher=aes-xts-plain64,size=256
    

Finally rebuild your initramfs

sudo mkinitcpio -P
2 Likes