Bug 463555 - Add mount point for a LUKS encrypted partition will lead to booting into emergency mode
Summary: Add mount point for a LUKS encrypted partition will lead to booting into emer...
Status: REPORTED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-28 15:41 UTC by Uwe Köhler
Modified: 2022-12-28 19:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Köhler 2022-12-28 15:41:47 UTC
SUMMARY
***
Add mount point for a LUKS encrypted partition will lead to booting into emergency mode
***


STEPS TO REPRODUCE
1. Installed Neon with a encrypted data partition
2. Installed Neon with a encrypted data partition on a second drive
3. Use kpartitionmanager to add mount mount point for the second drive to the neon on the first drive
4. Reboot

OBSERVED RESULT
Partition is mounted correctly or no mount point can be provided

EXPECTED RESULT
Machine boots into emergency mode

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.26
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 5.15.0-56-generic (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5700U with Radeon Graphics
Memory: 15,0 GiB of RAM
Graphics Processor: AMD RENOIR
Manufacturer: Acer
Product Name: Aspire A515-45G
System Version: V1.08

ADDITIONAL INFORMATION
I now mounted the partition manually and will not try again, since installing Neon took 15 attempts
Comment 1 Andrius Štikonas 2022-12-28 15:54:48 UTC
It would be helpful if you could attach /etc/fstab file before and after it was edited with KDE Partition Manager.
Comment 2 Uwe Köhler 2022-12-28 16:32:27 UTC
Sorry, i didn't expect this behaviour at all and did not safe fstab before. After the problem I completely re-installed Neon since I only learned how to add the partition manually later.
Comment 3 Uwe Köhler 2022-12-28 19:19:11 UTC
Hmmm, come to thinks about it: Maybe the answer is in your question. To mount the encrypted partition, you have to take more steps than just changing the fstab. Otherwise the partition cannot be mounted and the boot process ends up in the emergency mode. I do have a precise protocol of the steps I had to o manually to get it working, if that helps.
Comment 4 Andrius Štikonas 2022-12-28 19:28:26 UTC
(In reply to Uwe Köhler from comment #3)
> Hmmm, come to thinks about it: Maybe the answer is in your question. To
> mount the encrypted partition, you have to take more steps than just
> changing the fstab. Otherwise the partition cannot be mounted and the boot
> process ends up in the emergency mode. I do have a precise protocol of the
> steps I had to o manually to get it working, if that helps.

Oh indeed, I think the source for the mount was missing because it was not decrypted (which could be done by e.g. initramfs on boot).

Not sure what's the best way to proceed. Running those extra steps would be way beyond scope of KDE Partition Manager, as it depends a lot on how system is configured... We could disable mounts for encrypted partitions but it's also not ideal.
Comment 5 Uwe Köhler 2022-12-28 19:54:42 UTC
Hmm, I have been using Linux since 1997 and I am an early adopter of KDE. I really like it and might be putting up with that, but a normal user will be really frustrated. The way I did it had nothing to do with initramfs, but with /etc/crypttab and sudo cryptsetup luksAddKey /dev/nvme0n1p9 /var/root2/crypto_keyfile.bin.

I believe that leaving the system not booting is way worse than simply not allowing to set a mount point for encrypted partitions.