add lvm-on-luks partition to crypttab #398
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was trying to restore a snapshot from one Linux Mint installation onto a fresh install. Timeshift would transfer all files, but the restored installation would be unbootable. The boot would hang at the Mint splash screen with a message about how it was waiting for something to provide a particular partition UUID.
The UUID it was waiting for was the LUKS partition on my original installation. Timeshift hadn't updated
/etc/crypttab
with the UUID of my new LUKS partition.I tracked this down to the fact that the way the Linux Mint installer sets up encryption is LVM-on-LUKS. The LVM layer between LUKS and ext4 caused
Device.is_on_encrypted_partition()
to returnfalse
when called for my root mount point.These are the relevant lines of the
lsblk
output that Timeshift used to determine my device layout:Device.is_on_encrypted_partition
is looking forTYPE
to becrypt
, but for mine it islvm
. It's the parent of that partition that has type crypt. That's because it's the grand-parent that is the LUKS partition.I added the grand-parent check, and then Timeshift correctly updated my
/etc/crypttab
.I think this change may address the problem noted in #302.