You are not logged in.

#1 2021-09-14 10:36:24

sudonite
Member
Registered: 2021-09-14
Posts: 7

[SOLVED] no key available with this passphrase

Last 3 times when upgrading kernel, after restart got a "no key available with this passphrase" problem. I can't fix it, just reinstalled the system. But now break the system only the initcpio regenerated.
On the live system file manager unlock the partition sucessfully and arch installer too. Where is the problem guys?

/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=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

# 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 plymouth autodetect modconf block keyboard keymap plymouth-encrypt filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used. 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=()
/etc/mkinitcpio.conf.d/linux.preset

# mkinitcpio preset file for the 'linux' package

ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux"

PRESETS=('default' 'fallback')

#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux.img"
#default_options=""

#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-fallback.img"
fallback_options="-S autodetect"
/etc/fstab

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/mapper/crypt
UUID=f200b5cd-7e61-4031-8d49-01852e1d0418	/         	ext4      	rw,relatime	0 1

# /dev/nvme0n1p2
UUID=d05c587a-24d8-408d-86ab-6d4954f2f34f	/boot     	ext4      	rw,relatime	0 2

# /dev/nvme0n1p1
UUID=34CB-1C0A      	/boot/EFI 	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro	0 2

/swapfile none swap sw 0 0
/etc/default/grub

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=3
GRUB_RECORDFAIL_TIMEOUT=$GRUB_TIMEOUT
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash vt.global_cursor_default=0 loglevel=2 rd.systemd.show_status=false rd.udev.log-priority=3 sysrq_always_enabled=1 nvidia-drm.modeset=1"
GRUB_CMDLINE_LINUX="cryptdevice=UUID=c819bb90-fbf8-4d15-a90d-6593c6944269:crypt root=/dev/mapper/crypt net.ifnames=0 biosdevname=0"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=true

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=0
#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=1920x1080,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_LINUX_UUID=true

# 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="/boot/grub/themes/vimix/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires to
# set 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"
/etc/pacman.d/hooks/nvidia.hook

[Trigger]
Operation=Install
Operation=Upgrade
Operation=Remove
Type=Package
Target=nvidia
Target=linux

[Action]
Description=Update Nvidia module in initcpio
Depends=mkinitcpio
When=PostTransaction
NeedsTargets
Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'
$ sudo cryptsetup luksDump /dev/nvme0n1p3

LUKS header information
Version:       	2
Epoch:         	3
Metadata area: 	16384 [bytes]
Keyslots area: 	16744448 [bytes]
UUID:          	c819bb90-fbf8-4d15-a90d-6593c6944269
Label:         	(no label)
Subsystem:     	(no subsystem)
Flags:       	(no flags)

Data segments:
  0: crypt
	offset: 16777216 [bytes]
	length: (whole device)
	cipher: aes-xts-plain64
	sector: 512 [bytes]

Keyslots:
  0: luks2
	Key:        512 bits
	Priority:   normal
	Cipher:     aes-xts-plain64
	Cipher key: 512 bits
	PBKDF:      argon2id
	Time cost:  6
	Memory:     1048576
	Threads:    4
	Salt:       *
	AF stripes: 4000
	AF hash:    sha512
	Area offset:32768 [bytes]
	Area length:258048 [bytes]
	Digest ID:  0
Tokens:
Digests:
  0: pbkdf2
	Hash:       sha512
	Iterations: 176409
	Salt:       *
	Digest:     *
$ sudo blkid

/dev/nvme0n1p1: UUID="34CB-1C0A" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="35bb45d2-91c4-d04e-8497-1e5a5d9e59ee"
/dev/nvme0n1p2: UUID="d05c587a-24d8-408d-86ab-6d4954f2f34f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="39f02c69-2023-d743-91db-ffa7d4ae27ae"
/dev/nvme0n1p3: UUID="c819bb90-fbf8-4d15-a90d-6593c6944269" TYPE="crypto_LUKS" PARTUUID="adacb4fc-6c10-bd4a-bd74-5d50d85c62bd"

Last edited by sudonite (2021-09-14 16:13:03)

Offline

#2 2021-09-14 13:09:16

Kinrar
Member
Registered: 2021-09-12
Posts: 13

Re: [SOLVED] no key available with this passphrase

Could it be some keyboard layout issue? Do you have to switch layouts when using the live system?

Offline

#3 2021-09-14 13:34:33

sudonite
Member
Registered: 2021-09-14
Posts: 7

Re: [SOLVED] no key available with this passphrase

I don't think so.

/etc/vconsole.conf

KEYMAP=hu

And tried to enter the pass with "en" layout. (I know "en" keys on "hu" keyboard.)

Last edited by sudonite (2021-09-14 15:39:04)

Offline

#4 2021-09-14 15:02:05

Khere
Member
From: Italy
Registered: 2020-03-04
Posts: 170

Re: [SOLVED] no key available with this passphrase

sudonite wrote:

I can't fix it, just reinstalled the system.
But now break the system only the initcpio regenerated.

What do you mean with break the system? You re only able to boot from live cd ?


Fan of Giorgio Moroder & Mohammad Ammax enemy

Offline

#5 2021-09-14 15:37:10

sudonite
Member
Registered: 2021-09-14
Posts: 7

Re: [SOLVED] no key available with this passphrase

On normal boot process can't able to unlock the disk encryption, but boot from arch live cd and ran the following command:

cryptsetup open /dev/nvme0n1p3 crypt

And there able to unlock, mount and chroot to system and everything working.
Also tried the followings, but I have not succeded to fix:

mkinitcpio -P
grub-mkconfig -o /boot/grub/grub.cfg

Offline

#6 2021-09-14 15:41:33

Kinrar
Member
Registered: 2021-09-12
Posts: 13

Re: [SOLVED] no key available with this passphrase

I really can't see any reason for dm-crypt to change behavior from the live cd to your persistent install, assuming the settings are right, which they probably are, as the luks header seems to be found. Are you 100% sure there's no keyboard layout issue? Could you try maybe with a very simple passphrase temporarily that you would be able to easily enter on both layouts?

Offline

#7 2021-09-14 15:55:00

sudonite
Member
Registered: 2021-09-14
Posts: 7

Re: [SOLVED] no key available with this passphrase

You're right, now working with simple password.
Any way to use a more complex password and fix the keyboard layout issue ?

Offline

#8 2021-09-14 15:57:51

Kinrar
Member
Registered: 2021-09-12
Posts: 13

Re: [SOLVED] no key available with this passphrase

Well it *should* work if you have the same layout set when you add the key and then when you use it. You can use localectl to check both VC keymap and X11 layout are set to hu. Also, now that you're booted, I would recommend you just add another passphrase for your tests before removing the sample one.

Offline

#9 2021-09-14 16:12:22

sudonite
Member
Registered: 2021-09-14
Posts: 7

Re: [SOLVED] no key available with this passphrase

Oh, I find the problem:

VC keymap: hu101

Changed to:

VC keymap: hu

And now working. Today, I learned that setting up a keyboard layout is painful. Thank you so much for your help.

Offline

#10 2021-09-14 16:18:59

Kinrar
Member
Registered: 2021-09-12
Posts: 13

Re: [SOLVED] no key available with this passphrase

You're welcome! Happy to know I could help smile

Offline

Board footer

Powered by FluxBB