You are not logged in.

#1 2022-12-10 21:27:23

u666sa
Member
Registered: 2020-08-01
Posts: 69

[SOLVED] error: no such cryptodisk found

This is driving me NUTZ!!! I've tried different things and realize I need some help.

Booting 'Arch Linux'

error: no such cryptodisk found, perhaps a needed disk or cryptodisk module is not loaded
Loading Linux linux-zen ...
Loading initial ram-disk ...

Press anykey to continue...


Then system boots normal after you press any key or wait 10 seconds or so....


This seems to be related to /etc/default/grub

6 GRUB_CMDLINE_LINUX_DEFAULT="intel_pstate=active splash loglevel=4 i915.enable_guc=3 enable_fbc=1 fastboot=1 lsm=landlock,lockdown,yama,integrity,apparmor,bpf mitigation=auto audit=1"                             
 7 ##GRUB_CMDLINE_LINUX="cryptdevice=UUID=2666a31e-612d-4037-8297-4bd758fdaacc:root root=/dev/mapper/luks_root"                                                                                                       
 8 GRUB_CMDLINE_LINUX="cryptdevice=/dev/mmcblk0p3:luks_root:allow-discards cryptkey=rootfs:/root/cryptlvm.keyfile"                                                                                                    
 9                                                                                                                                                                                                                    
10 # Preload both GPT and MBR modules so that they are not missed                                                                                                                                                     
11 GRUB_PRELOAD_MODULES="btrfs zstd part_gpt part_msdos"                                                                                                                                                              
12                                                                                                                                                                                                                    
13 # Uncomment to enable booting from LUKS encrypted devices                                                                                                                                                          
14 GRUB_ENABLE_CRYPTODISK=y    

Cometing out GRUB_ENABLE_CRYPTODISK removes this error, but then grub theme is not loaded, grub is in text mode.

Adding cryptodisk module to GRUB_PRELOAD_MODULES has no effect.


Help!!!

Last edited by u666sa (2022-12-11 06:36:34)

Offline

#2 2022-12-10 22:06:49

seth
Member
Registered: 2012-09-03
Posts: 58,728

Re: [SOLVED] error: no such cryptodisk found

https://wiki.archlinux.org/title/GRUB#Encrypted_/boot

Make sure to install grub after modifying this option or encrypting the partition.

Did you? (That's NOT grub-mkconfig!)
Were there any errors?
Is there a core.img?

Did you try to preload "cryptodisk"?

Assuming you're not the same user, https://bbs.archlinux.org/viewtopic.php?id=281647 might be interesting

Offline

#3 2022-12-11 06:36:11

u666sa
Member
Registered: 2020-08-01
Posts: 69

Re: [SOLVED] error: no such cryptodisk found

seth wrote:

https://wiki.archlinux.org/title/GRUB#Encrypted_/boot

Make sure to install grub after modifying this option or encrypting the partition.

Did you? (That's NOT grub-mkconfig!)
Were there any errors?
Is there a core.img?

Did you try to preload "cryptodisk"?

Assuming you're not the same user, https://bbs.archlinux.org/viewtopic.php?id=281647 might be interesting


Blah! You saved my day and SOLVED this post!

You see, thing is it was working well and then an update came and the entire thing broke.

Now, I did what you said, even tho it was done previously, and it is working.

1) I mounted /boot/EFI and reinstalled grub
2) updatedb && locate core.img --- there is no core.img, but then again my boot partition is not encrypted
3) Yes, cryptodisk was preloaded in grub preload modules

4) Not I'm not the same user.

Offline

#4 2022-12-14 18:37:18

Grandfather-Paradox
Member
Registered: 2017-08-22
Posts: 19

Re: [SOLVED] error: no such cryptodisk found

I have the same exact issue since the latest Grub update and it's driving me nuts. I get the same error message after entering in the password, yet it proceeds to boot normally.

Offline

#5 2022-12-14 20:06:30

seth
Member
Registered: 2012-09-03
Posts: 58,728

Re: [SOLVED] error: no such cryptodisk found

And did you run grub-install and do you have cryptodisk in the preloaded modules?

Offline

#6 2022-12-15 02:46:31

Grandfather-Paradox
Member
Registered: 2017-08-22
Posts: 19

Re: [SOLVED] error: no such cryptodisk found

seth wrote:

And did you run grub-install and do you have cryptodisk in the preloaded modules?

Yup, I did. Initially I just ran grub-install but then tried adding the preloaded modules after seeing this thread, to no avail. It's really strange because I've been using this exact configuration for many years, so I think something must have changed with Grub.

Install command I ran:

grub-install --target=x86_64-efi --boot-directory=/boot/efi --efi-directory=/boot/efi --bootloader-id=GRUB

My /etc/default/grub:

GRUB_DEFAULT="Arch Linux"
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="ibt=off lsm=landlock,lockdown,yama,apparmor,bpf"
GRUB_CMDLINE_LINUX="cryptdevice=UUID=3722dfb2-3b32-414b-bd59-4329fa92b6a9:crypt:allow-discards cryptkey=rootfs:/root/crypto_keyfile.bin resume=UUID=0bd23570-1d82-453f-932d-403434a27c3c"
GRUB_ENABLE_CRYPTODISK="y"

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

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT="5"
#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="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="white/black"
GRUB_COLOR_HIGHLIGHT="magenta/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
GRUB_BACKGROUND="/boot/efi/grub/themes/wallpaper.jpg"
#GRUB_THEME="/path/to/gfxtheme"

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

GRUB_SAVEDEFAULT="false"

GRUB_DISABLE_OS_PROBER="false"


GRUB_FONT="/boot/grub/unicode.pf2"

And my grub.cfg:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod cryptodisk
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="Arch Linux"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

set menu_color_normal=white/black
set menu_color_highlight=magenta/black

insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root B601-2519
if loadfont /grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root B601-2519
insmod jpeg
background_image -m stretch /grub/themes/wallpaper.jpg
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_grub-customizer_menu_color_helper ###
set color_normal=white/black
set color_highlight=magenta/black
### END /etc/grub.d/01_grub-customizer_menu_color_helper ###

### BEGIN /etc/grub.d/10_linux_proxy ###




### END /etc/grub.d/10_linux_proxy ###

### BEGIN /etc/grub.d/40_custom_proxy ###
menuentry "Arch Linux" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-ff84b208-9017-4c60-9343-36e2345d67b3' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod cryptodisk
		insmod luks
		insmod gcry_rijndael
		insmod gcry_rijndael
		insmod gcry_sha256
		insmod lvm
		insmod ext2
		cryptomount -u 3722dfb23b32414bbd594329fa92b6a9
		set root='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'  bc1fc89a-7de1-4ff9-855e-2ca66c008095
		else
		  search --no-floppy --fs-uuid --set=root bc1fc89a-7de1-4ff9-855e-2ca66c008095
		fi
		echo	'Loading Linux linux ...'
		linux	/boot/vmlinuz-linux root=/dev/mapper/crypt-arch rw cryptdevice=UUID=3722dfb2-3b32-414b-bd59-4329fa92b6a9:crypt:allow-discards cryptkey=rootfs:/root/crypto_keyfile.bin resume=UUID=0bd23570-1d82-453f-932d-403434a27c3c ibt=off lsm=landlock,lockdown,yama,apparmor,bpf
		echo	'Loading initial ramdisk ...'
		initrd	/boot/intel-ucode.img /boot/initramfs-linux.img
}
### END /etc/grub.d/40_custom_proxy ###

### BEGIN /etc/grub.d/43_linux_proxy ###
submenu "Advanced options for Arch Linux"{
menuentry "Arch Linux, with Linux linux-lts" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-advanced-bc1fc89a-7de1-4ff9-855e-2ca66c008095' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod cryptodisk
		insmod luks
		insmod gcry_rijndael
		insmod gcry_rijndael
		insmod gcry_sha256
		insmod lvm
		insmod ext2
		cryptomount -u 3722dfb2-3b32-414b-bd59-4329fa92b6a9
		set root='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'  bc1fc89a-7de1-4ff9-855e-2ca66c008095
		else
		  search --no-floppy --fs-uuid --set=root bc1fc89a-7de1-4ff9-855e-2ca66c008095
		fi
		echo	'Loading Linux linux-lts ...'
		linux	/boot/vmlinuz-linux-lts root=/dev/mapper/crypt-arch rw cryptdevice=UUID=3722dfb2-3b32-414b-bd59-4329fa92b6a9:crypt:allow-discards cryptkey=rootfs:/root/crypto_keyfile.bin resume=UUID=0bd23570-1d82-453f-932d-403434a27c3c ibt=off lsm=landlock,lockdown,yama,apparmor,bpf
		echo	'Loading initial ramdisk ...'
		initrd	/boot/intel-ucode.img /boot/initramfs-linux-lts.img
}
menuentry "Arch Linux, with Linux linux-lts (fallback initramfs)" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-fallback-bc1fc89a-7de1-4ff9-855e-2ca66c008095' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod cryptodisk
		insmod luks
		insmod gcry_rijndael
		insmod gcry_rijndael
		insmod gcry_sha256
		insmod lvm
		insmod ext2
		cryptomount -u 3722dfb2-3b32-414b-bd59-4329fa92b6a9
		set root='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'  bc1fc89a-7de1-4ff9-855e-2ca66c008095
		else
		  search --no-floppy --fs-uuid --set=root bc1fc89a-7de1-4ff9-855e-2ca66c008095
		fi
		echo	'Loading Linux linux-lts ...'
		linux	/boot/vmlinuz-linux-lts root=/dev/mapper/crypt-arch rw cryptdevice=UUID=3722dfb2-3b32-414b-bd59-4329fa92b6a9:crypt:allow-discards cryptkey=rootfs:/root/crypto_keyfile.bin resume=UUID=0bd23570-1d82-453f-932d-403434a27c3c ibt=off lsm=landlock,lockdown,yama,apparmor,bpf
		echo	'Loading initial ramdisk ...'
		initrd	/boot/intel-ucode.img /boot/initramfs-linux-lts-fallback.img
}
menuentry "Arch Linux, with Linux linux" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-bc1fc89a-7de1-4ff9-855e-2ca66c008095' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod cryptodisk
		insmod luks
		insmod gcry_rijndael
		insmod gcry_rijndael
		insmod gcry_sha256
		insmod lvm
		insmod ext2
		cryptomount -u 3722dfb2-3b32-414b-bd59-4329fa92b6a9
		set root='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'  bc1fc89a-7de1-4ff9-855e-2ca66c008095
		else
		  search --no-floppy --fs-uuid --set=root bc1fc89a-7de1-4ff9-855e-2ca66c008095
		fi
		echo	'Loading Linux linux ...'
		linux	/boot/vmlinuz-linux root=/dev/mapper/crypt-arch rw cryptdevice=UUID=3722dfb2-3b32-414b-bd59-4329fa92b6a9:crypt:allow-discards cryptkey=rootfs:/root/crypto_keyfile.bin resume=UUID=0bd23570-1d82-453f-932d-403434a27c3c ibt=off lsm=landlock,lockdown,yama,apparmor,bpf
		echo	'Loading initial ramdisk ...'
		initrd	/boot/intel-ucode.img /boot/initramfs-linux.img
}
menuentry "Arch Linux, with Linux linux (fallback initramfs)" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-bc1fc89a-7de1-4ff9-855e-2ca66c008095' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod cryptodisk
		insmod luks
		insmod gcry_rijndael
		insmod gcry_rijndael
		insmod gcry_sha256
		insmod lvm
		insmod ext2
		cryptomount -u 3722dfb2-3b32-414b-bd59-4329fa92b6a9
		set root='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'  bc1fc89a-7de1-4ff9-855e-2ca66c008095
		else
		  search --no-floppy --fs-uuid --set=root bc1fc89a-7de1-4ff9-855e-2ca66c008095
		fi
		echo	'Loading Linux linux ...'
		linux	/boot/vmlinuz-linux root=/dev/mapper/crypt-arch rw cryptdevice=UUID=3722dfb2-3b32-414b-bd59-4329fa92b6a9:crypt:allow-discards cryptkey=rootfs:/root/crypto_keyfile.bin resume=UUID=0bd23570-1d82-453f-932d-403434a27c3c ibt=off lsm=landlock,lockdown,yama,apparmor,bpf
		echo	'Loading initial ramdisk ...'
		initrd	/boot/intel-ucode.img /boot/initramfs-linux-fallback.img
}
}
### END /etc/grub.d/43_linux_proxy ###

### BEGIN /etc/grub.d/44_linux_xen ###
### END /etc/grub.d/44_linux_xen ###

### BEGIN /etc/grub.d/45_os-prober_proxy ###


### END /etc/grub.d/45_os-prober_proxy ###

### BEGIN /etc/grub.d/46_custom_proxy ###
menuentry "Windows Boot Manager (on /dev/nvme0n1p1)" --class windows --class os $menuentry_id_option 'osprober-efi-B601-2519' {
	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root B601-2519
	chainloader /EFI/Boot/bootx64.efi
}
### END /etc/grub.d/46_custom_proxy ###

### BEGIN /etc/grub.d/47_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
	fwsetup --is-supported
	if [ "$?" = 0 ]; then
		menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
			fwsetup
		}
	fi
fi
### END /etc/grub.d/47_uefi-firmware ###

### BEGIN /etc/grub.d/48_fwupd ###
### END /etc/grub.d/48_fwupd ###

### BEGIN /etc/grub.d/49_custom_proxy ###

# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.


### END /etc/grub.d/49_custom_proxy ###

### BEGIN /etc/grub.d/50_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/50_custom ###

Offline

#7 2022-12-15 03:19:48

kermit63
Member
Registered: 2018-07-04
Posts: 255

Re: [SOLVED] error: no such cryptodisk found

Is your /boot encrypted?

Based on your grub-install command, it seems your /boot is in the efi partition, which AFAIK can't be encrypted.

If that's the case, then there's no need for GRUB_ENABLE_CRYPTODISK="y".


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#8 2022-12-15 03:36:16

Grandfather-Paradox
Member
Registered: 2017-08-22
Posts: 19

Re: [SOLVED] error: no such cryptodisk found

kermit63 wrote:

Is your /boot encrypted?

Based on your grub-install command, it seems your /boot is in the efi partition, which AFAIK can't be encrypted.

If that's the case, then there's no need for GRUB_ENABLE_CRYPTODISK="y".

Nope, my /boot isn't on the EFI partition. That command makes it install Grub itself to the EFI partition, which is necessary for full disk encryption since obviously Grub has to not be encrypted to be able to start and decrypt the system. Those arguments --efi-directory and --boot-directory tell it where to put the Grub .efi stub and Grub (the full thing with the config, modules, themes, etc.), respectively. Since I want them both on the EFI partition, I use /boot/efi, which is where my EFI partition is mounted.

Last edited by Grandfather-Paradox (2022-12-15 03:36:40)

Offline

#9 2022-12-15 08:31:00

seth
Member
Registered: 2012-09-03
Posts: 58,728

Re: [SOLVED] error: no such cryptodisk found

The error is because of https://www.mail-archive.com/grub-devel … 33206.html

Sure the UUID is correct? What happens for "cryptomount -a"
Compare

lsblk -dno UUID /dev/<partition> | tr -d -

for the assumed <partition> and test other ones from "lsblk -f"

Offline

#10 2022-12-15 15:45:17

Grandfather-Paradox
Member
Registered: 2017-08-22
Posts: 19

Re: [SOLVED] error: no such cryptodisk found

seth wrote:

The error is because of https://www.mail-archive.com/grub-devel … 33206.html

Sure the UUID is correct? What happens for "cryptomount -a"
Compare

lsblk -dno UUID /dev/<partition> | tr -d -

for the assumed <partition> and test other ones from "lsblk -f"

Confirmed that it's the correct UUID. I think it would have to be or the system wouldn't be able to boot at all. That's the weirdest part, the fact that it boots fine after throwing that error.

Offline

#11 2022-12-15 16:06:37

seth
Member
Registered: 2012-09-03
Posts: 58,728

Re: [SOLVED] error: no such cryptodisk found

Correct UUID for what?
If the partition is in fact not encrypted (you can get the cryptodisk UUID for everything, try some random usb key…) the failure doesn't matter.
What happens if you remove the "cryptomount -u" call from one of the entries (so the others remain unaffected in case this will really prevent the boot)?

Offline

#12 2022-12-15 16:18:10

Grandfather-Paradox
Member
Registered: 2017-08-22
Posts: 19

Re: [SOLVED] error: no such cryptodisk found

seth wrote:

Correct UUID for what?
If the partition is in fact not encrypted (you can get the cryptodisk UUID for everything, try some random usb key…) the failure doesn't matter.
What happens if you remove the "cryptomount -u" call from one of the entries (so the others remain unaffected in case this will really prevent the boot)?

The correct UUID for my Arch partition. It is most definitely encrypted. I've had this setup for years and this error only just started occuring. Just to show that it's definitely encrypted and has the correct UUID:

"fdisk -l", showing that my Arch partition is /dev/nvme0n1p7

Disk /dev/nvme0n1: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: PC SN810 NVMe WDC 1024GB                
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: 9FBB20E0-0FC1-444C-BFC4-47CBC878BD5E

Device              Start        End    Sectors   Size Type
/dev/nvme0n1p1       2048     411647     409600   200M EFI System
/dev/nvme0n1p2     411648     673791     262144   128M Microsoft reserved
/dev/nvme0n1p3     673792  730810367  730136576 348.2G Microsoft basic data
/dev/nvme0n1p4 1959610368 1962086399    2476032   1.2G Windows recovery environment
/dev/nvme0n1p5 1962086400 1997451263   35364864  16.9G Windows recovery environment
/dev/nvme0n1p6 1997453312 2000377855    2924544   1.4G Windows recovery environment
/dev/nvme0n1p7  730810368 1959610367 1228800000 585.9G Linux filesystem

"blkid"

/dev/nvme0n1p7: UUID="3722dfb2-3b32-414b-bd59-4329fa92b6a9" TYPE="crypto_LUKS" PARTLABEL="Arch Linux" PARTUUID="0cb296b2-b730-4570-9ac7-8893bc79224b"

"cryptsetup luksDump /dev/nvme0n1p7"

LUKS header information for /dev/nvme0n1p7

Version:       	1
Cipher name:   	aes
Cipher mode:   	xts-plain64
Hash spec:     	sha256
Payload offset:	4096
MK bits:       	512
MK digest:     	d6 c8 c2 1e cb 5e f2 72 c1 f9 af 74 9c 32 62 88 8b 1e ed 41 
MK salt:       	22 ec 20 8e 5d cb 5c 4d 90 a9 60 6b 5b 8b 22 f7 
               	94 c1 23 74 7b df 86 16 fb 88 ae ca 63 72 be 8a 
MK iterations: 	377185
UUID:          	3722dfb2-3b32-414b-bd59-4329fa92b6a9

Key Slot 0: ENABLED
	Iterations:         	1945410
	Salt:               	ac 5f fb ee a9 48 c6 31 c5 63 6f 12 a0 be 2c 91 
	                      	b6 5c c4 21 9a 39 fc 85 b8 8e 48 00 b3 ac ff f1 
	Key material offset:	8
	AF stripes:            	4000
Key Slot 1: ENABLED
	Iterations:         	5833524
	Salt:               	93 b0 04 10 c8 75 c9 cf 86 cf 3e 36 b6 13 6e 34 
	                      	4a 3b fe 99 97 e2 8e dc 7c 72 f0 4f d4 3a b1 bd 
	Key material offset:	512
	AF stripes:            	4000
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED

Offline

#13 2022-12-15 16:48:19

seth
Member
Registered: 2012-09-03
Posts: 58,728

Re: [SOLVED] error: no such cryptodisk found

Wild guess: what if cryptomount objects the dashes, records an error, misinterprets it and glosses over it later on?
https://www.gnu.org/software/grub/manua … mount.html

Also, note that, unlike filesystem UUIDs, UUIDs for encrypted devices must be specified without dash separators.

Edit: Because at least some entries have "cryptomount -u 3722dfb2-3b32-414b-bd59-4329fa92b6a9"

Last edited by seth (2022-12-15 16:49:05)

Offline

#14 2022-12-15 16:50:56

Grandfather-Paradox
Member
Registered: 2017-08-22
Posts: 19

Re: [SOLVED] error: no such cryptodisk found

seth wrote:

Wild guess: what if cryptomount objects the dashes, records an error, misinterprets it and glosses over it later on?
https://www.gnu.org/software/grub/manua … mount.html

Also, note that, unlike filesystem UUIDs, UUIDs for encrypted devices must be specified without dash separators.

Edit: Because at least some entries have "cryptomount -u 3722dfb2-3b32-414b-bd59-4329fa92b6a9"

You're right - how strange. It seems like grub-mkconfig removes the dashes for the main entry but not for the others. I'll try manually removing the dashes from the others and see what happens.

Offline

#15 2022-12-15 17:05:33

Grandfather-Paradox
Member
Registered: 2017-08-22
Posts: 19

Re: [SOLVED] error: no such cryptodisk found

seth wrote:

Wild guess: what if cryptomount objects the dashes, records an error, misinterprets it and glosses over it later on?
https://www.gnu.org/software/grub/manua … mount.html

Also, note that, unlike filesystem UUIDs, UUIDs for encrypted devices must be specified without dash separators.

Edit: Because at least some entries have "cryptomount -u 3722dfb2-3b32-414b-bd59-4329fa92b6a9"

Made no difference without the dashes sadly.

Offline

#16 2022-12-15 17:34:19

Grandfather-Paradox
Member
Registered: 2017-08-22
Posts: 19

Re: [SOLVED] error: no such cryptodisk found

The strangest thing has happened. I should mention that I use grub-customizer to modify some of the Grub config. I decided to revert all the changes I had made and remove the entries that I don't want again. While doing this, I noticed that the dashes were added to the main entry, so I decided to leave them and see what would happen. Now it's working as expected without the error...

grub.cfg:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="Arch Linux"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

set menu_color_normal=white/black
set menu_color_highlight=magenta/black

insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root B601-2519
if loadfont /grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root B601-2519
insmod jpeg
background_image -m stretch /grub/themes/wallpaper.jpg
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux_proxy ###




### END /etc/grub.d/10_linux_proxy ###

### BEGIN /etc/grub.d/40_custom_proxy ###
menuentry "Arch Linux" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-bc1fc89a-7de1-4ff9-855e-2ca66c008095' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod cryptodisk
	insmod luks
	insmod gcry_rijndael
	insmod gcry_rijndael
	insmod gcry_sha256
	insmod lvm
	insmod ext2
	cryptomount -u 3722dfb2-3b32-414b-bd59-4329fa92b6a9
	set root='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'  bc1fc89a-7de1-4ff9-855e-2ca66c008095
	else
	  search --no-floppy --fs-uuid --set=root bc1fc89a-7de1-4ff9-855e-2ca66c008095
	fi
	echo	'Loading Linux linux...'
	linux	/boot/vmlinuz-linux root=/dev/mapper/crypt-arch rw cryptdevice=UUID=3722dfb2-3b32-414b-bd59-4329fa92b6a9:crypt:allow-discards cryptkey=rootfs:/root/crypto_keyfile.bin resume=UUID=0bd23570-1d82-453f-932d-403434a27c3c ibt=off lsm=landlock,lockdown,yama,apparmor,bpf
	echo	'Loading initial ramdisk ...'
	initrd	/boot/intel-ucode.img /boot/initramfs-linux.img
}
### END /etc/grub.d/40_custom_proxy ###

### BEGIN /etc/grub.d/41_linux_proxy ###
submenu "Advanced options for Arch Linux"{
menuentry "Arch Linux, with Linux linux-lts" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-advanced-bc1fc89a-7de1-4ff9-855e-2ca66c008095' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod cryptodisk
		insmod luks
		insmod gcry_rijndael
		insmod gcry_rijndael
		insmod gcry_sha256
		insmod lvm
		insmod ext2
		cryptomount -u 3722dfb2-3b32-414b-bd59-4329fa92b6a9
		set root='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'  bc1fc89a-7de1-4ff9-855e-2ca66c008095
		else
		  search --no-floppy --fs-uuid --set=root bc1fc89a-7de1-4ff9-855e-2ca66c008095
		fi
		echo	'Loading Linux linux-lts ...'
		linux	/boot/vmlinuz-linux-lts root=/dev/mapper/crypt-arch rw cryptdevice=UUID=3722dfb2-3b32-414b-bd59-4329fa92b6a9:crypt:allow-discards cryptkey=rootfs:/root/crypto_keyfile.bin resume=UUID=0bd23570-1d82-453f-932d-403434a27c3c ibt=off lsm=landlock,lockdown,yama,apparmor,bpf
		echo	'Loading initial ramdisk ...'
		initrd	/boot/intel-ucode.img /boot/initramfs-linux-lts.img
}
menuentry "Arch Linux, with Linux linux-lts (fallback initramfs)" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-lts-fallback-bc1fc89a-7de1-4ff9-855e-2ca66c008095' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod cryptodisk
		insmod luks
		insmod gcry_rijndael
		insmod gcry_rijndael
		insmod gcry_sha256
		insmod lvm
		insmod ext2
		cryptomount -u 3722dfb2-3b32-414b-bd59-4329fa92b6a9
		set root='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'  bc1fc89a-7de1-4ff9-855e-2ca66c008095
		else
		  search --no-floppy --fs-uuid --set=root bc1fc89a-7de1-4ff9-855e-2ca66c008095
		fi
		echo	'Loading Linux linux-lts ...'
		linux	/boot/vmlinuz-linux-lts root=/dev/mapper/crypt-arch rw cryptdevice=UUID=3722dfb2-3b32-414b-bd59-4329fa92b6a9:crypt:allow-discards cryptkey=rootfs:/root/crypto_keyfile.bin resume=UUID=0bd23570-1d82-453f-932d-403434a27c3c ibt=off lsm=landlock,lockdown,yama,apparmor,bpf
		echo	'Loading initial ramdisk ...'
		initrd	/boot/intel-ucode.img /boot/initramfs-linux-lts-fallback.img
}
menuentry "Arch Linux, with Linux linux" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-bc1fc89a-7de1-4ff9-855e-2ca66c008095' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod cryptodisk
		insmod luks
		insmod gcry_rijndael
		insmod gcry_rijndael
		insmod gcry_sha256
		insmod lvm
		insmod ext2
		cryptomount -u 3722dfb2-3b32-414b-bd59-4329fa92b6a9
		set root='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'  bc1fc89a-7de1-4ff9-855e-2ca66c008095
		else
		  search --no-floppy --fs-uuid --set=root bc1fc89a-7de1-4ff9-855e-2ca66c008095
		fi
		echo	'Loading Linux linux ...'
		linux	/boot/vmlinuz-linux root=/dev/mapper/crypt-arch rw cryptdevice=UUID=3722dfb2-3b32-414b-bd59-4329fa92b6a9:crypt:allow-discards cryptkey=rootfs:/root/crypto_keyfile.bin resume=UUID=0bd23570-1d82-453f-932d-403434a27c3c ibt=off lsm=landlock,lockdown,yama,apparmor,bpf
		echo	'Loading initial ramdisk ...'
		initrd	/boot/intel-ucode.img /boot/initramfs-linux.img
}
menuentry "Arch Linux, with Linux linux (fallback initramfs)" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-bc1fc89a-7de1-4ff9-855e-2ca66c008095' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod cryptodisk
		insmod luks
		insmod gcry_rijndael
		insmod gcry_rijndael
		insmod gcry_sha256
		insmod lvm
		insmod ext2
		cryptomount -u 3722dfb2-3b32-414b-bd59-4329fa92b6a9
		set root='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint='lvmid/JWvz3L-YjzR-3Abt-1FrT-5a1M-IRhY-ezsGln/hNLG1K-nX2J-om9t-Ka1T-iBff-s1g2-PMCQkb'  bc1fc89a-7de1-4ff9-855e-2ca66c008095
		else
		  search --no-floppy --fs-uuid --set=root bc1fc89a-7de1-4ff9-855e-2ca66c008095
		fi
		echo	'Loading Linux linux ...'
		linux	/boot/vmlinuz-linux root=/dev/mapper/crypt-arch rw cryptdevice=UUID=3722dfb2-3b32-414b-bd59-4329fa92b6a9:crypt:allow-discards cryptkey=rootfs:/root/crypto_keyfile.bin resume=UUID=0bd23570-1d82-453f-932d-403434a27c3c ibt=off lsm=landlock,lockdown,yama,apparmor,bpf
		echo	'Loading initial ramdisk ...'
		initrd	/boot/intel-ucode.img /boot/initramfs-linux-fallback.img
}
}
### END /etc/grub.d/41_linux_proxy ###

### BEGIN /etc/grub.d/42_linux_xen ###
### END /etc/grub.d/42_linux_xen ###

### BEGIN /etc/grub.d/43_os-prober_proxy ###


### END /etc/grub.d/43_os-prober_proxy ###

### BEGIN /etc/grub.d/44_custom_proxy ###

# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.







### END /etc/grub.d/44_custom_proxy ###

### BEGIN /etc/grub.d/45_os-prober_proxy ###
menuentry "Windows Boot Manager (on /dev/nvme0n1p1)" --class windows --class os $menuentry_id_option 'osprober-efi-B601-2519' {
	insmod part_gpt
	insmod fat
	search --no-floppy --fs-uuid --set=root B601-2519
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/45_os-prober_proxy ###

### BEGIN /etc/grub.d/46_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
	fwsetup --is-supported
	if [ "$?" = 0 ]; then
		menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
			fwsetup
		}
	fi
fi
### END /etc/grub.d/46_uefi-firmware ###

### BEGIN /etc/grub.d/47_fwupd ###
### END /etc/grub.d/47_fwupd ###

### BEGIN /etc/grub.d/49_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/49_custom ###

### BEGIN /etc/grub.d/50_grub-customizer_menu_color_helper ###
set color_normal=white/black
set color_highlight=magenta/black
### END /etc/grub.d/50_grub-customizer_menu_color_helper ###

Offline

#17 2023-03-31 07:13:34

casualwitness
Member
Registered: 2023-03-31
Posts: 1

Re: [SOLVED] error: no such cryptodisk found

Grandfather-Paradox wrote:

The strangest thing has happened. I should mention that I use grub-customizer to modify some of the Grub config. I decided to revert all the changes I had made and remove the entries that I don't want again. While doing this, I noticed that the dashes were added to the main entry, so I decided to leave them and see what would happen. Now it's working as expected without the error...

Same here. Error at boot with no visible consequences on all of my machines.

So that's your personal solution. But what about a more general way to solve this? Honestly, I have problems understanding your actions, especially how to transfer them to my systems, since I didn't customize anything in GRUB.

Offline

#18 2023-09-05 19:21:33

Nobody8549
Member
Registered: 2023-09-05
Posts: 1

Re: [SOLVED] error: no such cryptodisk found

Not sure how much it's related but I had similar issue when I was trying to have ESP on a separate unencrypted partition mounted to /efi and then another partition contained LUKS encrypted container with encrypted /boot. I was doing a clean install but when I finally rebooted to boot the newly installed system for the first time I got this after entering the right passphrase:

Enter passphrase for hd0,gpt2 (107ed0af-6288-45cc-b77-1fbMedfa0ss) :
error: no key data.
error: disk "cryptouid/107ed0af628845cch7?f1fbMe4fa055" not found.
Entering rescue mode...

I could find out what the problem is but then I realized I configured a wrong UUID in the grub config. I configured the UUID of the mapper devices and not the luks partition. Took me hours to realize that. For everyone getting stuck in the same point ...

Offline

Board footer

Powered by FluxBB