Good to hear it worked!
Since the issue is solved, the below are my thoughts on how different encrypted partitions are linked together to the same LUKS key so multiple partitions will use the same passphrase.
First, in response to your Post #3 quoting me about having three passphrases (keyslots) on your system, what I stated is not correct to how your system is configured. I would not have posted that had I remembered what you wrote in your Post #1 that showed only one passphrase was used to open all three encrypted partitions at bootup.
Regarding adding a new keyslot to each of the three partitions, all of which use the same passphrase (during bootup). I have a hunch that that was not necessary and that only one partition would have been necessary to run the "luksAddKey" command on since all three encrypted partitions use the same LUKS key or keyfile. I also wonder if creating an additional keyslot on the two additional partitions created two additional keyslots, each with the same passphrase. If so, instead of having a total of 2 keyslots for the three partitions, there would be a total four (1 for the original keyslot plus 3 more for the second keyslot [1 keyslot for each for the 3 partitions] = 4 total). I have not tested this so I am not 100% sure. See below.
BUT the encrypted partitions appear to have LUKS linked in slightly different ways so maybe only the
first LUKS created encrypted partition must be used. I have not tested this so I am not 100% sure.
For example, in my MX-19 that uses full disk encryption, there are two encrypted partitions (root and swap) which are both unlocked using one passphrase during bootup.
While not 100% certain, I think
/etc/crypttab is the file that is responsible for linking the two encrypted partitions (root and swap) so they use the same passphrase, allowing both to be unlocked during bootup.
The contents of
crypttab on my MX-19 is:
Code: Select all
root.fsm /dev/disk/by-uuid/...UUID_NUMBER... none luks
swap /dev/disk/by-uuid/...UUID_NUMBER... /root/keyfile luks
In the above, "luks" appears for both the root and swap partitions (although swap has
/root/keyfile included but root does not.
If correct, then changing one keyslot will change the contents of (
/root/keyfile). Since both partitions use the same keyfile, both will be unlocked using the same passphrase during bootup.
I am not certain on the above so any corrections or additions to this post would be welcome.
Regarding Amandaville's additional keyslot that was made. I would be curious to see if the output of cryptsetup is now identical on all three partitions. For example, is the output identical for the three commands in the below code window:
Code: Select all
sudo cryptsetup luksDump /dev/nvme0n1p3
sudo cryptsetup luksDump /dev/nvme0n1p4
sudo cryptsetup luksDump /dev/nvme0n1p5
I am thinking one of two scenarios when adding a LUKS Key:
- all 3 encrypted partitions will show only 2 keyslots in use (0 and 1), OR:
- the first encrypted partition that used the "luksAddKey" command will now have 2 keyslots;
the 2nd encrypted partition that used the "luksAddKey" command will now have 3 keyslots;
the 3rd encrypted partition that used the "luksAddKey" command will now have 4 keyslots
The reason for the second scenario is because each time the "luksAddKey" command was run on a partition, it added an additional keyslot to the same keyfile (the original keyslot plus an additional keyslot for each time the "luksAddKey" command was run). If that is true then keyslots 3 and 4 would have the same passphrase since the same passphrase was used when creating it. If that is true, then having keyslots 3 and 4 is of no use and could be removed.
If keyslots 3 and 4 exist, to see if they use the same passphrase as keyslot 2, then test that passphrase on a specific keyslot number as shown in the below command (keyslot 3 is used in this example):
Code: Select all
sudo cryptsetup -v open --test-passphrase /dev/nvme0n1p3 -S 3