You are not logged in.

#1 2018-04-27 08:27:51

Sweetroll
Member
Registered: 2018-04-27
Posts: 11

[solved] Arch with LUKS cryptodisk not found

I was unclear previously so I will try again

Hi I am completely new to arch and wanted to try it out I followed a third party tutorial which I noticed pretty fast that a lot was ether incorrect or inconsistent so I ended up using the arch wiki for understanding how I should do the install but following the tutorial to see what steps I should take even with this I used the wiki a lot. After a lot of reading and trying to understand in the wiki I've ended up on a dead end. The problem I am now facing is I can boot into grub and I have two menu entries Arch and a submenu if I click arch the output is ending with waiting for 10 seconds can't find cryptodisk error not found and then I end up in emergency shell .

Partition table
sda1 -Efi
sda2 - Windows
sda3 -recovery (windows)
sda4
sda5
sda6
sda7 <boot>
sda8 <swap>
sda9 <root>
|_cryptroot <crpt>

NOTE the cryptroot partition of sda9 is occupying all space of that partition sda9 and there uuid is different from eachother

The lines I've edited in /etc/default/grub is
GRUB_CMDLINE_LINUX_DEFAULT="i915.preliminary_hw_support=1"
GRUB_ENABLE_CRYPTODISK = y
GRUB_CMDLINE_LINUX="cryptdevice=UUID=uuid-of-sda9:cryptroot root=/dev/mapper/cryptroot"

and in /etc/mkinitcpio.conf I've changed the Hook to
HOOKS=(base udev autodetect keyboard keymap console font modconf block encrypt filesystem fsck)

if there is anything more that can help you help me please ask.

Edit progress update: i tried reinstalling grub following the wiki but i dont think im doing any better i remounted the efi parttition (sda1) to /boot/efi folder and then reinstalled grubb pointing to that directory then updated the config without (GRUB_CMDLINE_LINUX_DEFAULT row) and changed GRUB_CMDLINE_LINUX="cryptdevice=UUID=uuid_root=/dev/mapper/cryptroot to GRUB_CMDLINE_LINUX="cryptdevice=UUID=uuid_crpt:cryptroot" and now when i boot grub tells me to enter my encryption pass after that i get straight into grub console the good thing being that i can reach the root correctly but now im in a console. What can i do now? Note if i type the wrong encrypt key i fall into grub rescue.

Last edited by Sweetroll (2018-04-28 17:18:22)

Offline

#2 2018-04-27 15:38:39

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: [solved] Arch with LUKS cryptodisk not found

When you are dropped to the rescue shell which of the following exist /dev/disk/by-uuid/uuid-of-sda9 /dev/mapper /dev/mapper/cryptroot?

Offline

#3 2018-04-27 19:27:01

Sweetroll
Member
Registered: 2018-04-27
Posts: 11

Re: [solved] Arch with LUKS cryptodisk not found

If i do $ls i see (crypto0) among other (hd0,sdx) and it seem to contain my arch install if i do $ls (crypt0)/ the uuid for it is also equal to the partition uuid.
Doing $ls /dev/disk/by-uuid reports not found
Doing $ls /dev/mapper reports not found
Thus does the last one checking the dev of crypt0 it is also empty

Offline

#4 2018-04-27 19:34:12

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: [solved] Arch with LUKS cryptodisk not found

Were those commands run in a grub shell instead of the rescue shell of the initrd?

Offline

#5 2018-04-28 03:41:22

Sweetroll
Member
Registered: 2018-04-27
Posts: 11

Re: [solved] Arch with LUKS cryptodisk not found

Yeah sorry...
In grub rescue I tried the command $set and noticed something strange my root is cryptouuid/uuid_ofcryptouuid
Does that mean it think uuid_of_cryptroot is a partition of cryptouuid?
Note it actualy says cryptouuid
Doing $ls /dev, yields error disk cryptouuid/uuid_of_cryptroot not found
I guess i should use the uuid of sda9 in the grub.cfg and not the uuid of the partition cryptroot?

Progress update: i tried $ls (hpt0, gptx) on all end everything is unknown filesystem except one which is ext2 i tried changing the root to the uuid of sda9 but it says unknown filesystem

Edit: Could it be that i installed arch in cryptroot and grub cant load files necessary because they are crypted?

Last edited by Sweetroll (2018-04-28 04:05:03)

Offline

#6 2018-04-28 04:16:45

mneiner
Member
Registered: 2017-12-13
Posts: 20

Re: [solved] Arch with LUKS cryptodisk not found

I had a similar problem, the root cause of it was I decided to overwrite my mkinitcpio.conf file with mkinitcpio.conf.pacnew.  Big Mistake and I am in my formative ARCH years..aka Rookie....

I run LVM with LUKS (encrypted root).  Well the new mkinitcpio.conf didn't have the required hooks for LVM and LUKS. Everything was fine until a couple days later, I performed a system upgrage that included an updated Linux kernal version.  Pacman did the usual generation of a new initramfs file, and of course now using a mkinitcpio that didn't support LVM or LUKS....

When I rebooted, the system couldn't find my encrypted root.

I had a cloner hard drive so was able to recover and have since done a bunch of research and have a really good appreciation of that mkinitcpio.conf file and it's hooks.


_________________________
Asus X200CA Notebook

Offline

#7 2018-04-28 04:17:45

ryanerwin
Member
Registered: 2018-04-28
Posts: 11

Re: [solved] Arch with LUKS cryptodisk not found

Sweetroll wrote:

GRUB_CMDLINE_LINUX_DEFAULT="i915.preliminary_hw_support=1"
GRUB_ENABLE_CRYPTODISK = y
GRUB_CMDLINE_LINUX="cryptdevice=UUID=uuid-of-sda9:cryptroot root=/dev/mapper/cryptroot"

Hang in there. I went through the same thing yesterday.

For me, there were two issues that caused a lot of problems...

1. in GRUB_CMDLINE_LINUX change root=/dev/mapper/cryptroot to use a UUID... So you've got a UUID for cryptdevice and for cryptroot.

2. Note that there are TWO different UUIDs that `blkid` reports for raw partitions... Make sure you're using the UUID value, not the PARTUUID value.


/etc/default/grub (excerpt)
GRUB_CMDLINE_LINUX="cryptdevice=UUID=c58ca81a-f5df-4ac5-a388-33096d2a11ae:lvmcrypt root=UUID=93bda731-5aa1-4bd9-810b-d9de130395e9"

# Uncomment to enable booting from LUKS encrypted devices
GRUB_ENABLE_CRYPTODISK=y
blkid
/dev/nvme0n1: PTUUID="f079adee-30c2-439a-ad58-b2cdfba9a81f" PTTYPE="gpt"
/dev/nvme0n1p1: UUID="C228-AD54" TYPE="vfat" PARTUUID="ededc730-1288-d845-b0d3-586d37fcfff4"
/dev/nvme0n1p3: UUID="c58ca81a-f5df-4ac5-a388-33096d2a11ae" TYPE="crypto_LUKS" PARTUUID="2b6c8a9f-ad04-b442-aefe-12d9cbe053fb"
/dev/mapper/lvmcrypt: UUID="rhMlid-bBLM-LhbE-kwqk-Hi8F-bw1A-fJI9LO" TYPE="LVM2_member"
/dev/mapper/vg-swap: UUID="71540dfb-def5-4187-b400-74c6a12f06d9" TYPE="swap"
/dev/mapper/vg-root: UUID="93bda731-5aa1-4bd9-810b-d9de130395e9" TYPE="ext4"

If you still can't get it to work, post the full output of `blkid` and `/etc/default/grub`.

Offline

#8 2018-04-28 05:50:41

Sweetroll
Member
Registered: 2018-04-27
Posts: 11

Re: [solved] Arch with LUKS cryptodisk not found

I changed the GRUB_CMDLINE_LINUX with the correct uuid just before i read your reply and now i am able to load the grub menu but the second problem just after the hook udev cant find /dev/mapper/cryptodisk remains, i added the specification of root as you wrote (thanks for clairing up what uuid should go where)

nice format you got wonder how.... anyhot
Edit: figuered it out tried the quoute link and saw the syntax.


blkid in arch-chroot from usb (cryptroot unlocked):
/dev/sda1: LABEL="ESP" UUID="A8BF-0AE8" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="74de90ed-28a0-4a26-8305-7ff9e336d167"
/dev/sda2: PARTLABEL="Microsoft reserved partition" PARTUUID="405449a8-6ade-4db8-80a5-4e10f8de9d07"
/dev/sda3: LABEL="OS" UUID="C66E1D966E1D7FFB" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="b76db21e-f160-4622-825d-c8d80af96ee5"
/dev/sda4: LABEL="WINRETOOLS" UUID="8A4C68C34C68AC1F" TYPE="ntfs" PARTUUID="7a191401-2d91-43ca-a728-5c9a6a29579d"
/dev/sda5: LABEL="Image" UUID="80C86901C868F736" TYPE="ntfs" PARTUUID="906729cb-90b0-4ac4-9a1f-d13803d43ab9"
/dev/sda6: LABEL="DELLSUPPORT" UUID="B4F676F0F676B26A" TYPE="ntfs" PARTUUID="c96963a9-6e3e-4d4c-a67b-143accdcc812"
/dev/sda7: UUID="75e586a1-f0eb-47dc-87c2-963d97130122" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="f9a68117-438a-4de3-b8b3-1f12df671ad1"
/dev/sda8: LABEL="Linux Swap" UUID="b87f0564-dfff-4fab-a638-0bffee46b79b" TYPE="swap" PARTLABEL="Linux filesystem" PARTUUID="8511904a-7eae-4d0f-825f-e68322da7a34"
/dev/sda9: UUID="3a017ebd-6bda-41ac-b80f-ad11e9d9223b" TYPE="crypto_LUKS" PARTLABEL="Linux filesystem" PARTUUID="353384c1-ca8d-4b1a-bf56-7fdb849c5121"
/dev/sdb1: UUID="2018-04-01-05-06-08-00" LABEL="ARCH_201804" TYPE="iso9660" PTUUID="19ca1100" PTTYPE="dos" PARTUUID="19ca1100-01"
/dev/sdb2: SEC_TYPE="msdos" LABEL="ARCHISO_EFI" UUID="8943-6BE9" TYPE="vfat" PARTUUID="19ca1100-02"
/dev/loop0: TYPE="squashfs"
/dev/mapper/cryptroot: LABEL="Arch Linux" UUID="4735c908-7667-4e2b-a84e-92423efe79a0" TYPE="ext4"

content of /etc/default/grub:
# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"

GRUB_CMDLINE_LINUX="cryptdevice=UUID=4735c908-7667-4e2b-a84e-92423efe79a0:cryptroot root=UUID=3a017ebd-6bda-41ac-b80f-ad11e9d9223b"
                                                                                                                                                                                                                                                              
# 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=y

# 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="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="/path/to/gfxtheme"

# 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"

Last edited by Sweetroll (2018-04-28 07:59:04)

Offline

#9 2018-04-28 08:18:08

Sweetroll
Member
Registered: 2018-04-27
Posts: 11

Re: [solved] Arch with LUKS cryptodisk not found

mneiner wrote:

I had a similar problem, the root cause of it was I decided to overwrite my mkinitcpio.conf file

I wonder if my configured hooks are used because it says that it runs udev and right after that it checks for cryptoroot and reports not found or does the encrypt hook dont print out anything this is the output when trying to boot

:: running early hook [udev]
starting version 238
:: running hook [udev]
::Triggering events.. 
Waiting for 10 seconds for device /dev/mapper/cryptroot...
ERROR: device 'dev/mapper/cryptroot' not found skipping fsck
:: mounting 'dev/mapper/cryptroot' on real root
You are now being dropped to emergency shell
sh: cant access tty: job control turned off

When updating the hooks in /etc/mkinitcpio.conf/ do i need to do something more like with grub-mkconfig?
I didn't see anything in about that in the wiki about mkinitcpio..

Last edited by Sweetroll (2018-04-28 08:19:47)

Offline

#10 2018-04-28 08:37:58

ryanerwin
Member
Registered: 2018-04-28
Posts: 11

Re: [solved] Arch with LUKS cryptodisk not found

Looks like you need to flip them...

CRYPTDEVICE points to the RAW ENCRYPTED DATA
CRYPTROOT points to the EXT4 filesystem after it's decrypted...

So try:

GRUB_CMDLINE_LINUX="cryptdevice=UUID=3a017ebd-6bda-41ac-b80f-ad11e9d9223b:cryptroot root=UUID=4735c908-7667-4e2b-a84e-92423efe79a0"

Offline

#11 2018-04-28 09:54:35

Sweetroll
Member
Registered: 2018-04-27
Posts: 11

Re: [solved] Arch with LUKS cryptodisk not found

I tried that but now it says can´t find uuid of 4735c908-7667-4e2b-a84e-92423efe79a0 which i checked (ls -l /dev/disk/by-uuid) and it is not there because its not decrypted...

Offline

#12 2018-04-28 10:41:14

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: [solved] Arch with LUKS cryptodisk not found

When you are dropped to the rescue shell does /dev/mapper/cryptroot exist?

Offline

#13 2018-04-28 10:45:48

Sweetroll
Member
Registered: 2018-04-27
Posts: 11

Re: [solved] Arch with LUKS cryptodisk not found

No even /dev/mapper does not exist

Offline

#14 2018-04-28 11:08:52

ryanerwin
Member
Registered: 2018-04-28
Posts: 11

Re: [solved] Arch with LUKS cryptodisk not found

Noticed a typo in your /etc/mkinitcpio.conf

HOOKS=(base udev autodetect keyboard keymap console font modconf block encrypt filesystem fsck)

Should be:

HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt filesystems fsck)

So you're missing an "S" on filesystems
You have an extra space between console and font

Make these changes to your /etc/mkinitcpio.conf, update the /etc/default/grub as I commented a few posts ago, then run:

mkinitcpio -p linux
grub-mkconfig -o /boot/grub/grub.cfg
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub

And I think it should be fine.

Offline

#15 2018-04-28 11:11:27

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: [solved] Arch with LUKS cryptodisk not found

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

should that not be

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

Offline

#16 2018-04-28 11:29:28

Sweetroll
Member
Registered: 2018-04-27
Posts: 11

Re: [solved] Arch with LUKS cryptodisk not found

YES finally thank you, can you post a link to where i can read about "mkinitcpio -p linux" i seem to have missed it all the time i think that is what solved it i did the following
changed in /etc/mkinitcpio.conf i removed console font previously cause i couldnt find them "with mkinitcpio -H"

HOOKS=(base udev autodetect keyboard keymap console font modconf block encrypt filesystem fsck)
to
HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt filesystems fsck)

and then these commands
mkinitcpio -p linux
grub-mkconfig -o /boot/grub/grub.cfg
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
...
...
...
reboot #the most satisfying reboot i can think of....
and now im in Arch for the first time thank you all

Offline

#17 2018-04-28 11:30:57

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: [solved] Arch with LUKS cryptodisk not found

Offline

#18 2018-04-28 11:34:02

Sweetroll
Member
Registered: 2018-04-27
Posts: 11

Re: [solved] Arch with LUKS cryptodisk not found

I read that so many times but didnt understand that it is whats needed when changing /etc/...conf

Offline

#19 2018-04-28 15:57:43

Sweetroll
Member
Registered: 2018-04-27
Posts: 11

Re: [solved] Arch with LUKS cryptodisk not found

Sorry im also new to the forum do i need to close it or mark it as resolved or something and how..

Offline

#20 2018-04-28 16:15:07

Gigamo
Member
Registered: 2008-01-19
Posts: 394

Re: [solved] Arch with LUKS cryptodisk not found

Sweetroll wrote:

Sorry im also new to the forum do i need to close it or mark it as resolved or something and how..

Edit your first post and prepend [SOLVED] to the title.

Offline

Board footer

Powered by FluxBB