Is it possible to unlock multiple LUKS devices to form a LVM at boot?
I have the following setup: A LUKS encrypted SSD on which a LVM is used to form the typical linux partitions (/, /home/, etc.). This setup is unlocked at boot by a password. I'm using Debian Jessie.
Due to the lack of space, I wanted to add another PV to the LVM, which of course should be LUKS encrypted and decrypted at boot - with the use of key derivation from the first PV or by using the same password as the first PV.
This means that the LVM (which includes /, /home/, etc.) spans over two LUKS encrypted SSDs (of course each SSD contains one partition that is actually encrypted and not the SSDs themselves, but I think this is obvious.).
It seems impossible to unlock this kind of setup at boot since Systemd has been integrated - all found instructions derive keys (or else) that is not possible to do anymore with Systemd beacause the key derivation scripts are not executed anymore at boot (or the instructions just fail).
Does someone know if and how this actually works?
Otherwise I have to change my setup to have a seperate root partition (outside the LVM) so that the rest can be mounted after boot, or to have luks inside the lvm. But both are the last options I want to choose.
Thx!
linux debian lvm luks
bumped to the homepage by Community♦ 28 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have the following setup: A LUKS encrypted SSD on which a LVM is used to form the typical linux partitions (/, /home/, etc.). This setup is unlocked at boot by a password. I'm using Debian Jessie.
Due to the lack of space, I wanted to add another PV to the LVM, which of course should be LUKS encrypted and decrypted at boot - with the use of key derivation from the first PV or by using the same password as the first PV.
This means that the LVM (which includes /, /home/, etc.) spans over two LUKS encrypted SSDs (of course each SSD contains one partition that is actually encrypted and not the SSDs themselves, but I think this is obvious.).
It seems impossible to unlock this kind of setup at boot since Systemd has been integrated - all found instructions derive keys (or else) that is not possible to do anymore with Systemd beacause the key derivation scripts are not executed anymore at boot (or the instructions just fail).
Does someone know if and how this actually works?
Otherwise I have to change my setup to have a seperate root partition (outside the LVM) so that the rest can be mounted after boot, or to have luks inside the lvm. But both are the last options I want to choose.
Thx!
linux debian lvm luks
bumped to the homepage by Community♦ 28 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have the following setup: A LUKS encrypted SSD on which a LVM is used to form the typical linux partitions (/, /home/, etc.). This setup is unlocked at boot by a password. I'm using Debian Jessie.
Due to the lack of space, I wanted to add another PV to the LVM, which of course should be LUKS encrypted and decrypted at boot - with the use of key derivation from the first PV or by using the same password as the first PV.
This means that the LVM (which includes /, /home/, etc.) spans over two LUKS encrypted SSDs (of course each SSD contains one partition that is actually encrypted and not the SSDs themselves, but I think this is obvious.).
It seems impossible to unlock this kind of setup at boot since Systemd has been integrated - all found instructions derive keys (or else) that is not possible to do anymore with Systemd beacause the key derivation scripts are not executed anymore at boot (or the instructions just fail).
Does someone know if and how this actually works?
Otherwise I have to change my setup to have a seperate root partition (outside the LVM) so that the rest can be mounted after boot, or to have luks inside the lvm. But both are the last options I want to choose.
Thx!
linux debian lvm luks
I have the following setup: A LUKS encrypted SSD on which a LVM is used to form the typical linux partitions (/, /home/, etc.). This setup is unlocked at boot by a password. I'm using Debian Jessie.
Due to the lack of space, I wanted to add another PV to the LVM, which of course should be LUKS encrypted and decrypted at boot - with the use of key derivation from the first PV or by using the same password as the first PV.
This means that the LVM (which includes /, /home/, etc.) spans over two LUKS encrypted SSDs (of course each SSD contains one partition that is actually encrypted and not the SSDs themselves, but I think this is obvious.).
It seems impossible to unlock this kind of setup at boot since Systemd has been integrated - all found instructions derive keys (or else) that is not possible to do anymore with Systemd beacause the key derivation scripts are not executed anymore at boot (or the instructions just fail).
Does someone know if and how this actually works?
Otherwise I have to change my setup to have a seperate root partition (outside the LVM) so that the rest can be mounted after boot, or to have luks inside the lvm. But both are the last options I want to choose.
Thx!
linux debian lvm luks
linux debian lvm luks
edited May 30 '17 at 10:39
baderas
asked May 30 '17 at 10:34
baderasbaderas
414
414
bumped to the homepage by Community♦ 28 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 28 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Method 1
I found, since Systemd was implemented in *buntu desktop, that it will unlock all additional LUKS partitions if
- all of the partitions you want to unlock use the same password
- you enter the password for the root partition correctly the first time. If you get it wrong, you'll need to enter it again for every other LUKS partition
This does not work for me in Ubuntu Server 16.04
Method 2
Using the gnome-disk-utility (GUI) app...
- select the encrypted LUKS partition
- click the gear button (additional partition options)
- Edit encryption options
- disable auto encryption options
- enable Unlock at startup
- (optional) change Name. This will label the unlocked partition under /dev/mapper/
- enter passphrase. The utility will create a keyfile in /etc/luks-keys/ for each partition you set up this way
- (optional) add unlocked partitions to fstab manually or using the disk utility
- update-initramfs (not sure if this is required)
- update-grub
Method 3 Using keyutils.
I haven't tested this. From https://www.redpill-linpro.com/techblog/2016/08/12/btrfs-and-encryption.html
- make use of the same passphrase for both of the encrypted volumes.
- Boot into your newly installed system:
~# apt-get install keyutils
and add the keyscript=decrypt_keyctl option to both of the encrypted volumes listed in /etc/crypttab.- Then issue:
~# update-initramfs -u -k all
to update your initramfs to include keyutils. - Then reboot and check that the entered passphrase is cached and used to unlock both of the encrypted volumes.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f368073%2fis-it-possible-to-unlock-multiple-luks-devices-to-form-a-lvm-at-boot%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Method 1
I found, since Systemd was implemented in *buntu desktop, that it will unlock all additional LUKS partitions if
- all of the partitions you want to unlock use the same password
- you enter the password for the root partition correctly the first time. If you get it wrong, you'll need to enter it again for every other LUKS partition
This does not work for me in Ubuntu Server 16.04
Method 2
Using the gnome-disk-utility (GUI) app...
- select the encrypted LUKS partition
- click the gear button (additional partition options)
- Edit encryption options
- disable auto encryption options
- enable Unlock at startup
- (optional) change Name. This will label the unlocked partition under /dev/mapper/
- enter passphrase. The utility will create a keyfile in /etc/luks-keys/ for each partition you set up this way
- (optional) add unlocked partitions to fstab manually or using the disk utility
- update-initramfs (not sure if this is required)
- update-grub
Method 3 Using keyutils.
I haven't tested this. From https://www.redpill-linpro.com/techblog/2016/08/12/btrfs-and-encryption.html
- make use of the same passphrase for both of the encrypted volumes.
- Boot into your newly installed system:
~# apt-get install keyutils
and add the keyscript=decrypt_keyctl option to both of the encrypted volumes listed in /etc/crypttab.- Then issue:
~# update-initramfs -u -k all
to update your initramfs to include keyutils. - Then reboot and check that the entered passphrase is cached and used to unlock both of the encrypted volumes.
add a comment |
Method 1
I found, since Systemd was implemented in *buntu desktop, that it will unlock all additional LUKS partitions if
- all of the partitions you want to unlock use the same password
- you enter the password for the root partition correctly the first time. If you get it wrong, you'll need to enter it again for every other LUKS partition
This does not work for me in Ubuntu Server 16.04
Method 2
Using the gnome-disk-utility (GUI) app...
- select the encrypted LUKS partition
- click the gear button (additional partition options)
- Edit encryption options
- disable auto encryption options
- enable Unlock at startup
- (optional) change Name. This will label the unlocked partition under /dev/mapper/
- enter passphrase. The utility will create a keyfile in /etc/luks-keys/ for each partition you set up this way
- (optional) add unlocked partitions to fstab manually or using the disk utility
- update-initramfs (not sure if this is required)
- update-grub
Method 3 Using keyutils.
I haven't tested this. From https://www.redpill-linpro.com/techblog/2016/08/12/btrfs-and-encryption.html
- make use of the same passphrase for both of the encrypted volumes.
- Boot into your newly installed system:
~# apt-get install keyutils
and add the keyscript=decrypt_keyctl option to both of the encrypted volumes listed in /etc/crypttab.- Then issue:
~# update-initramfs -u -k all
to update your initramfs to include keyutils. - Then reboot and check that the entered passphrase is cached and used to unlock both of the encrypted volumes.
add a comment |
Method 1
I found, since Systemd was implemented in *buntu desktop, that it will unlock all additional LUKS partitions if
- all of the partitions you want to unlock use the same password
- you enter the password for the root partition correctly the first time. If you get it wrong, you'll need to enter it again for every other LUKS partition
This does not work for me in Ubuntu Server 16.04
Method 2
Using the gnome-disk-utility (GUI) app...
- select the encrypted LUKS partition
- click the gear button (additional partition options)
- Edit encryption options
- disable auto encryption options
- enable Unlock at startup
- (optional) change Name. This will label the unlocked partition under /dev/mapper/
- enter passphrase. The utility will create a keyfile in /etc/luks-keys/ for each partition you set up this way
- (optional) add unlocked partitions to fstab manually or using the disk utility
- update-initramfs (not sure if this is required)
- update-grub
Method 3 Using keyutils.
I haven't tested this. From https://www.redpill-linpro.com/techblog/2016/08/12/btrfs-and-encryption.html
- make use of the same passphrase for both of the encrypted volumes.
- Boot into your newly installed system:
~# apt-get install keyutils
and add the keyscript=decrypt_keyctl option to both of the encrypted volumes listed in /etc/crypttab.- Then issue:
~# update-initramfs -u -k all
to update your initramfs to include keyutils. - Then reboot and check that the entered passphrase is cached and used to unlock both of the encrypted volumes.
Method 1
I found, since Systemd was implemented in *buntu desktop, that it will unlock all additional LUKS partitions if
- all of the partitions you want to unlock use the same password
- you enter the password for the root partition correctly the first time. If you get it wrong, you'll need to enter it again for every other LUKS partition
This does not work for me in Ubuntu Server 16.04
Method 2
Using the gnome-disk-utility (GUI) app...
- select the encrypted LUKS partition
- click the gear button (additional partition options)
- Edit encryption options
- disable auto encryption options
- enable Unlock at startup
- (optional) change Name. This will label the unlocked partition under /dev/mapper/
- enter passphrase. The utility will create a keyfile in /etc/luks-keys/ for each partition you set up this way
- (optional) add unlocked partitions to fstab manually or using the disk utility
- update-initramfs (not sure if this is required)
- update-grub
Method 3 Using keyutils.
I haven't tested this. From https://www.redpill-linpro.com/techblog/2016/08/12/btrfs-and-encryption.html
- make use of the same passphrase for both of the encrypted volumes.
- Boot into your newly installed system:
~# apt-get install keyutils
and add the keyscript=decrypt_keyctl option to both of the encrypted volumes listed in /etc/crypttab.- Then issue:
~# update-initramfs -u -k all
to update your initramfs to include keyutils. - Then reboot and check that the entered passphrase is cached and used to unlock both of the encrypted volumes.
edited Sep 4 '17 at 4:34
answered Sep 4 '17 at 0:56
jay armstrongjay armstrong
114
114
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f368073%2fis-it-possible-to-unlock-multiple-luks-devices-to-form-a-lvm-at-boot%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown