Can't install EndeavourOS with two LUKS partition

On both VirtualBox (non-efi mode and efi mode) and on my main computer which uses UEFI (not the computer that has the Nvidia graphics card) I created a root partition and a home partition and encrypted it with the same password in the installation process. When I click to install it will fail to install and gives me an error message.

This is the error message I get (this is particularly from VirtualBox)

How do I install the OS and encrypt the root and the home partition?

Only one LUKS partition is working, caused by a bug with kpmcore. Hopefully it will be solved for next release, as it seems to be solved in latest kpmcore.

1 Like

Oh ok thanks mate, another question, if I encrypt both the root and the home partition with the same password, would I be prompted twice to unlock the root and home partition or would I be prompted only once if I boot into EndeavourOS?

At the moment, you will be prompted two times to enter the password.
If you create a LUKS-LVM partition with both partitions inside, you have to enter password only once.

If you want you want to install it this way, please read https://forum.endeavouros.com/t/howto-gpt-uefi-install-with-full-disk-encryption-lvmonluks-with-a-separate-home-partition-and-working-hibernation-with-a-swapfile/985

1 Like

If you have /home as a folder inside encrypted / (root) you will be asked to unlock partition on boot and on login to DE for users password.
Having two partions encrypted will not work if you run it only with installer.

1 Like

Hey mate, I just want to understand a bit better as to what is going on in the guy’s instruction. So if I create an LVM partition and if I encrypt it by typing cryptsetup luksFormat /dev/sda2/ and after typing the password, after I unlock it again cryptsetup open --type luks /dev/sda2 lvm, I have to do create a physical volume in this partition then, right, so what is the physical volume I am a little confused? I thought that the partition (sda2) is already a physical volume?

With luksFormat you are creating an encrypted LVM which you are opening for use with luksOpen.

You are creating a physical volume inside the LVM. That is different to the real physical volume /dev/sdx on the drive.
Please read the Arch wiki on LUKS and LVM. Maybe there you can find some more answers to your questions.

1 Like

Ok I am understand this better.

pvcreate /dev/mapper/crypt So I type this in after encrypting the partition and opening the encrypted partition, this creates a physical volume in /dev/mapper/crypt, but what is it that when I open the encrypted partition the unlocked contents go to /dev/mapper/crypt? What is the /dev/mapper directory?

EDIT: One other question, if I setup an LVM-luks partition, is it possible to resize the partition at all (not the partitions inside the LVM-luks partition)?

Yes, you can shrink or grow the underlying luks partition, the logical volume(s) and your filesystem.
You will have to use the cli though.

You can’t use Gparted at all? Would fdisk work?

Well, you could resize the unlocked filesystem with Gparted but not the logical volumes or the luks partition. No way around the cli.

Listen, if you really need to do this I’d be glad to post a how-to. This wouldn’t be a short post though. I’d have to make sure that readers don’t destroy their system. So, if you need me to put in the time, I’ll provide instructions. But maybe it would suffice for you to know that it can be done if the need should ever arrise.:smirk:

1 Like

At the moment I am actually curious to know how to resize just the unlocked filesystem, not the logical volumes. So I would guess that if I made the two logical volumes smaller, then I can make the unlocked filesystem smaller via gparted, am I correct?

No! Wrong order.
You would destroy the underlying filesystem by first shrinking the logical volume before shrinking the filesystem.

+-------------------------------------------------+
| filesystem: EXT4       | filesystem: EXT4       |  (4)
| /                      | /home                  | 
|_ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ |
| logical volume: lvroot | logical volume: lvhome |  (3)
| /dev/vg0/lvroot        | /dev/vg0/lvhome        | 
|_ _ _ _ _ _ _ _ _ _ _ _ |_ _ _ _ _ _ _ _ _ _ _ _ |
|         (physical) volume group: vg0            |  (2)
|_________________________________________________|
|          LUKS partition: /dev/sda2              |  (1)
+-------------------------------------------------+

But if you would want to shrink or grow the /dev/sda2 partition for instance, you have to take care to do things in a specific order.

e. g. SHRINK the physical partition sda2 (1)

  1. shrink the filesystem of /home (4) to minimal size
  2. shrink the logical volume lvhome (3)
  3. grow the filesystem (4) to the new maximum size
  4. shrink the (LVM) Physical Volume (2)
  5. resize the LUKS container (1) to LVM size
  6. shrink the (crypt) physical partition /dev/sda2 (1)
  7. change partition table to reflect start and new end of (1)

So, if you’re shrinking stuff you have to manipulate from (4) to (1).

If you want to GROW stuff you’d have to reverse the order and work your way up from (1) to (4).

1 Like

I see, one last question, say if I wanted to install another operating system (lets just say BSD) and I wanted to mount the /home partition. Is this possible when using luks-lvm?

I think DragonFly BSD supported LVM2 and cryptsetup (LUKS) the last time I played with it. But it being quite some time ago I could be wrong.

1 Like