Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cryptdevice and root have same PARTUUID -> unable to boot #1716

Closed
legymhueck opened this issue Apr 2, 2023 · 5 comments · Fixed by #1721
Closed

cryptdevice and root have same PARTUUID -> unable to boot #1716

legymhueck opened this issue Apr 2, 2023 · 5 comments · Fixed by #1721

Comments

@legymhueck
Copy link

Version: archinstall 2.5.4 (official 2023-04 ISO) and 2.5.5 (cloned)

Issue: encrypted root partition (btrfs) does not boot due to /boot/loader/entries .conf having the same UUID for cryptdevice and root

Fix: changing the root uuid to the encrypted partition (or just using /dev/mapper/luksdev) fixed the issue

@Torxed
Copy link
Member

Torxed commented Apr 2, 2023

Can you post before and after changes of your boot entry configurations?
Because I don't think I've ever seen this happen when I'm installing.

For reference, mine looks like this:

options cryptdevice=PARTUUID=a9667e09-5b26-4289-8680-392eb101d46b:luksdev root=/dev/mapper/luksdev

@mewejo
Copy link

mewejo commented Apr 2, 2023

This happened to me yesterday - dropped me into initramfs with rootfs # prompt.

Ended up being two options lines in the boot entry, one for an encrypted partition and one for not. Removed the 2nd (for non-encrypted) and it worked. This was BTRFS and on the 2023.04.01 ISO.

@legymhueck
Copy link
Author

legymhueck commented Apr 3, 2023

Yep, as @mewejo pointed out, there are 2 options lines. In the first, the root is correctly set, the second overwrtites the values and causes booting into emergency shell.

options cryptdevice=PARTUUID=a34c8618-c601-4c3a-bfdf-d6d983a17723:luksdev root=/dev/mapper/luksdev zswap.enabled=0 rw rootfstype=btrfs 
options root=PARTUUID=a34c8618-c601-4c3a-bfdf-d6d983a17723 zswap.enabled=0 rw rootfstype=btrfs

A question in general: Why doesn't the installer use labels (as in nixos) to be able to clone a system easily without the hassle of changing UUIDs?

@codefiles
Copy link
Contributor

This is caused by a portion of code that was duplicated in 5669f3b. I submitted a pull request that fixes the issue.

@Torxed
Copy link
Member

Torxed commented Apr 4, 2023

Yep, as @mewejo pointed out, there are 2 options lines. In the first, the root is correctly set, the second overwrtites the values and causes booting into emergency shell.

options cryptdevice=PARTUUID=a34c8618-c601-4c3a-bfdf-d6d983a17723:luksdev root=/dev/mapper/luksdev zswap.enabled=0 rw rootfstype=btrfs 
options root=PARTUUID=a34c8618-c601-4c3a-bfdf-d6d983a17723 zswap.enabled=0 rw rootfstype=btrfs

A question in general: Why doesn't the installer use labels (as in nixos) to be able to clone a system easily without the hassle of changing UUIDs?

Thank you for the details, and a huge thanks to @codefiles for submitting a fix.
I'll most likely submit a new patch release if #1604 testing takes longer than 20:th of this month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants