You are not logged in.

#1 2025-02-13 08:31:15

Jazztache
Member
Registered: 2022-10-07
Posts: 32

[SOLVED] Using Arrow Keys In Home Partition LUKS Decryption Password

Hello!

I am having trouble using the arrow keys in my encryption password.
I am running and Arch install with an encrypted root and home partitions.

This is a Steam Deck dual-boot setup between SteamOS and Arch Linux.
This fact should not have any bearing, as all of the issues arise on Arch.

= Current Setup =

1. After getting to systemd-boot screen, I can select the Arch Linux option and start a boot.
2. I can type in my root password just fine. No issues.
However, with my home password, I cannot type it in. So...
3. I have to put in a purposely wrong password 2 times.
4. I have to wait for the systemd service for encryption to time out after 1 minute and 30 seconds.
5. After which, I get put into maintenance mode.
6. Press Control+D
7. The arrows now work (presumably because it is further into userspace)
8. I can type in my password. I have auto-login setup so it automatically drops me into the fish shell, where I can start KDE.

= Intended Setup =

1. Same as the current setup, see above.
2. I type in my root password, and it unlocks my root partition AND my home partition.

= lsblk =

jazztache@archlinux-steamdeck ~> lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINTS
nvme0n1      259:0    0  1.8T  0 disk  
├─nvme0n1p1  259:1    0   64M  0 part  
├─nvme0n1p2  259:2    0   32M  0 part  
├─nvme0n1p3  259:3    0   32M  0 part  
├─nvme0n1p4  259:4    0    5G  0 part  
├─nvme0n1p5  259:5    0    5G  0 part  
├─nvme0n1p6  259:6    0  256M  0 part  
├─nvme0n1p7  259:7    0  256M  0 part  
├─nvme0n1p8  259:8    0  250G  0 part  
├─nvme0n1p9  259:9    0    1G  0 part  /boot
├─nvme0n1p10 259:10   0    4G  0 part  [SWAP]
├─nvme0n1p11 259:11   0  100G  0 part  
│ └─root     254:0    0  100G  0 crypt /
└─nvme0n1p12 259:12   0  1.5T  0 part  
  └─home     254:1    0  1.5T  0 crypt /home

As you can see, the Arch install spans partitions 9 through 12 on the internal nvme drive.

= mkinitcpio =

jazztache@archlinux-steamdeck ~> 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=(usbhid xhci_hcd)
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 modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   This will create a systemd based initramfs which loads an encrypted root filesystem.
#    HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block encrypt filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
# Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"

I have the encrypt hook added in as per https://wiki.archlinux.org/title/Dm-cry … _partition

= Other =

I am happy to run through the process of making a keyfile, but only as a last resort.
I would much rather have some way of forcing Arch to check for the password later in userspace, without forcing it to open in maintenance mode.

Any and all help is appreciated.
If I missed any essential documentation/ things to know, or if there are any tricks to making the setup better, please do tell me smile

Thankyou!

Last edited by Jazztache (2025-02-14 04:26:40)

Offline

#2 2025-02-14 04:25:52

Jazztache
Member
Registered: 2022-10-07
Posts: 32

Re: [SOLVED] Using Arrow Keys In Home Partition LUKS Decryption Password

I decided to set up a keyfile.
https://www.cyberciti.biz/hardware/cryp … ile-linux/

Ignore the parts about shredding and formatting the hard drive.

Offline

Board footer

Powered by FluxBB