You are not logged in.

#1 2023-05-01 04:40:58

fhftsai256
Member
Registered: 2020-05-12
Posts: 11

[SOLVED] Thrown Into Emergency Shell With Encryption Setup

I was trying to re-install my system with full partition encryption enabled with "minimal" profile. After reboot, I run into the same situation as in this thread. However, I don't think their solution applies here. I did some quick check as suggested in the thread mentioned above, but then I have no clue how to move forward (e.g. mounting encrypted btrfs subvolumes, chroot into it, and the re-run mkinitcpio... I think?)

Partition Configurations:
https://i.ibb.co/vc8w424/IMG-0825.jpg

Error Messages with some information:
https://i.ibb.co/XDSY4xD/IMG-0827.jpg

I would have to bite the bullet to understand what Wiki says.

Thanks for the advice.


moderator edit -- replaced oversized image with link.
Pasting pictures and code

Last edited by fhftsai256 (2023-05-03 20:19:01)

Offline

#2 2023-05-02 03:50:14

fhftsai256
Member
Registered: 2020-05-12
Posts: 11

Re: [SOLVED] Thrown Into Emergency Shell With Encryption Setup

I read this wiki page, section #8 and can only find GRUB references. Maybe GRUB has better supports on such use case? It clicks if I use GRUB instead of systemd-boot, but I may give the example described in section #10 a try.

Offline

#3 2023-05-02 06:28:52

frostschutz
Member
Registered: 2013-11-15
Posts: 1,417

Re: [SOLVED] Thrown Into Emergency Shell With Encryption Setup

in your cmdline you have root= twice ... and the second one is the same as your cryptdev which is wrong.

fix your kernel parameters and it should work...

Offline

#4 2023-05-02 21:14:14

fhftsai256
Member
Registered: 2020-05-12
Posts: 11

Re: [SOLVED] Thrown Into Emergency Shell With Encryption Setup

@frostschutz thank you very much for the advice and I will give it a shot whenever I have a chance. Also I think this might be a bug to report.

Offline

#5 2023-05-04 23:54:34

Orionis
Member
Registered: 2018-01-19
Posts: 42

Re: [SOLVED] Thrown Into Emergency Shell With Encryption Setup

I just had the same issue in this thread and saw there was indeed a double entry for the root. So it repeated

root, zwap.enabled, rootflags, rw and rootfstype

for the LUKS volume.in the cmdline. When I removed in in the boot loader the system booted normally. This would indeed be a bug. @fhftsai256 did you report it yet?

Offline

#6 2023-05-05 00:16:40

Orionis
Member
Registered: 2018-01-19
Posts: 42

Re: [SOLVED] Thrown Into Emergency Shell With Encryption Setup

I posted the fix in my thread, I'll duplicate it here so it is easy to find.

Post-install the cmdline contains a double entry for the root volume. The first points to the unlocked and mapped BTRFS volume, the second one points to the LUKS volume. Like this:

cryptdevice=PARTUUID=0abcdef1-1234-1234-1234-1abcdef23456:luksdev root=/dev/mapper/luksdev zswap.enabled=0 rootflags=subvol=@ rw rootfstype=btrfs root=PARTUUID=0abcdef1-1234-1234-1234-1abcdef23456 zswap.enabled=0 rootflags=subvol=@ rw rootfstype=btrfs

The fix is the fhe following:
First, in the boot loader, press "e" on the default entry to edit your cmdline. Remove the duplicate. Using my example, the result would be:

cryptdevice=PARTUUID=0abcdef1-1234-1234-1234-1abcdef23456:luksdev root=/dev/mapper/luksdev zswap.enabled=0 rootflags=subvol=@ rw rootfstype=btrfs

Press enter and the system should boot normally.

Once booted, you will find the error in the boot loader entries, which can be found in /boot/loader/entries

Here you will see 2 files, for the default and fallback entries. Inside each are 2 lines starting with options, one starting with options cryptdevice and one with options root. Remove the second one.

Reboot. It should work now.

Offline

#7 2023-05-12 13:24:50

kasazn
Member
Registered: 2023-05-10
Posts: 1

Re: [SOLVED] Thrown Into Emergency Shell With Encryption Setup

This thread has been a lifesaver. On the bootloader screen, I pressed E to edit the entry to delete the second line as advised on the post above. Worked.

Proceed to remove the entry from /boot/loader/entries and it works now.

Many thanks!

EDIT: I installed Arch using archinstall, this is a bug. Is it known?

Last edited by kasazn (2023-05-12 13:25:20)

Offline

#8 2023-05-13 03:15:00

fhftsai256
Member
Registered: 2020-05-12
Posts: 11

Re: [SOLVED] Thrown Into Emergency Shell With Encryption Setup

Thank you for reporting this issue. I wasn't following this thread for a while. And yes this is a known issue and has been fixed in this pull request. In theory it should work OOB with 05.03 archlinux image.

Offline

Board footer

Powered by FluxBB