Bug 392787 - Creating LUKS encrypted drive on secondary drives causes system to not boot.
Summary: Creating LUKS encrypted drive on secondary drives causes system to not boot.
Status: REPORTED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (show other bugs)
Version: 3.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-06 01:38 UTC by Chris
Modified: 2022-11-18 11:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
EditMountpoint (40.11 KB, image/png)
2018-04-06 02:37 UTC, Chris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2018-04-06 01:38:24 UTC
-Duplicated this on KFedora and headless Fedora install.
-After installing Fedora/KDE onto unencrypted drive.  Created a LUKS encrypted drive.  Updated the mount point to something easier to read which updated fstab.  Fedora failed to boot because it could not unlock the drive.  Partition Manager should not endanger a newbie (like myself).  I figured out how to get around it by setting up the encrypted drives to not auto mount during boot.
Comment 1 Andrius Štikonas 2018-04-06 01:48:48 UTC
Any suggestions what would have helped you to avoid the problem? Maybe a warning dialog when mountpoint of LUKS partition is changed?

Obviously it would still be good to have the feature to edit luks mountpoints for more advanced user. But I agree, for a new user it might be dangerous.
Comment 2 Chris 2018-04-06 02:13:32 UTC
When creating the luks drive and setting the password.  tell the user if automount is set, they will be prompted for the password during boot.  Configure Partition manager to force the password prompt during boot if automount is set for a luks drive.

This would allow them to type in the password to let the system to continue to boot and avoid reinstalling like i did until i figured out what the issue was.

I wasn't able find any resources on the net to help me find how to fix it.  I had to stage it and experiment until i realized the issue.  I made a backup of fstab and then experimented until i understood the issue.
Comment 3 Andrius Štikonas 2018-04-06 02:21:32 UTC
I'll at some point have to try to experiment to reproduce this issue.

By tthe way how did you add mount point to fstab? At the moment Partition Manager can not yet add mount points, only edit them. So just creating a new LUKS encrypted partition wouldn't trigger this...
Comment 4 Chris 2018-04-06 02:37:03 UTC
Created attachment 111868 [details]
EditMountpoint

I had edited it.  That is what i meant in "Updated the mount point to something easier to read which updated fstab"

See attachment.  I had changed the mount point as so but left the no auto mount unchecked.  It updated fstab, i rebooted, and the system would not boot except to only the maintenace/emergency mode.
Comment 5 Andrius Štikonas 2018-04-06 10:31:01 UTC
(In reply to Chris from comment #4)
> Created attachment 111868 [details]
> EditMountpoint
> 
> I had edited it.  That is what i meant in "Updated the mount point to
> something easier to read which updated fstab"
> 
> See attachment.  I had changed the mount point as so but left the no auto
> mount unchecked.  It updated fstab, i rebooted, and the system would not
> boot except to only the maintenace/emergency mode.

I meant how did fstab entry appear there initially. Did you add it manually by editing fstab? Not using GUI?
Comment 6 Chris 2018-04-06 12:12:46 UTC
After adding the LUKS drive and editing the mount point.  I had an additional entry like this.  I actually used partition manager to add the no automount.  I never directly edited fstab.

I believe this is how it was when it would not boot.  I simply commented it out to get the system to boot.
/dev/mapper/luks-a56b638d-3b1a-451b-bb09-7cbc0263f787   /run/media/user/DATA1   ext4    defaults        0       0

This is how it is now and will boot.
/dev/mapper/luks-a56b638d-3b1a-451b-bb09-7cbc0263f787   /run/media/user/DATA1   ext4    noauto  0       0
Comment 7 Andrius Štikonas 2018-04-06 12:20:40 UTC
(In reply to Chris from comment #6)
> After adding the LUKS drive and editing the mount point.  I had an
> additional entry like this.  I actually used partition manager to add the no
> automount.  I never directly edited fstab.
> 
> I believe this is how it was when it would not boot.  I simply commented it
> out to get the system to boot.
> /dev/mapper/luks-a56b638d-3b1a-451b-bb09-7cbc0263f787  
> /run/media/user/DATA1   ext4    defaults        0       0
> 
> This is how it is now and will boot.
> /dev/mapper/luks-a56b638d-3b1a-451b-bb09-7cbc0263f787  
> /run/media/user/DATA1   ext4    noauto  0       0
But what I don't understand is how fstab entry appeared in the first place (because I would think the warning should be shown at some point then).

You created a new LUKS encrypted partition. Surely there was no fstab entry before you created the partition.
Comment 8 Chris 2018-04-06 12:26:32 UTC
I think it appeared when i used partition manager to set a mount point.  I did get the fstab warning, but adding a second drive, even if encrypted, should not cause the system to fail to boot.  I'll recreate it in a VM and get a video of it.  Give me a day or two.
Comment 9 Andrius Štikonas 2018-04-06 12:29:38 UTC
(In reply to Chris from comment #8)
> I think it appeared when i used partition manager to set a mount point.  I
> did get the fstab warning, but adding a second drive, even if encrypted,
> should not cause the system to fail to boot.  I'll recreate it in a VM and
> get a video of it.  Give me a day or two.

That's strange. I thought you can't create a new mount points from within Partition Manager... At some point I want to add this though. Then some checks to avoid this bug would be useful. I'll have to try to recreate this setup too when I have some time.
Comment 10 Chris 2018-04-07 20:36:22 UTC
here is a video of what i did.
https://vimeo.com/263656284
F1ndM3!
Comment 11 Andrius Štikonas 2018-04-15 14:01:12 UTC
(In reply to Chris from comment #10)
> here is a video of what i did.
> https://vimeo.com/263656284
> F1ndM3!

Thanks, I see. Don't think this mount point adding "feature" was intended to be there. But apparently adding mount points already works if you somehow manage to get that dialog (which is available after the steps you performed.