LVM & LUKS - problme between kb & chair or procedure problem: direction needed please

Hello all,

I’ve decided to try EndeavourOS after seeing a lot of good mentions, as well as it being #2 over the last 12 months on Distrowatch.

I’m trying to setup LVM & LUKS on a 500G SSD, following this procedure. I don’t think hardware specs. are required at the moment; if necessary, I can provide.

If I understand correctly, the procedure walks me through creating a temporary area (sda3), after sda2, create the new LVM root (swap if required) and home extents, rsyncs that back to sda2, corrects the LUKS formatting to reflect the new setup and finally reclaims the temporary partition as snapshot space or usable space.

I have no issues with steps 1 through 3. My problem starts with step 4.

Step 4

sudo cryptsetup luksOpen /dev/sda3 crypttemp

  • At :point_up_2: stage, sda3 doesn’t exist.
  • Assuming a typographical error, I created sda3 as an ext4 partition and executed cryptsetup luksFormat --type luks1 /dev/sda3 and continued mounting it, following the remaining two steps in this section.

Step 5

cryptsetup luksFormat --type luks1 /dev/sda2

  • major problems with this command, since it will (effectively), wipe my EndeavourOS installation out.

I think my problem revolves around the steps above. Being sequential, once the initial steps go wrong, the rest starts to not make sense at all. I would be grateful if someone could set me straight. I know the problem is with me, but I can’t see what I’m doing wrong.

Thanks
Mike

Welcome to the forum!

If that command is wiping your system out, the problem is that you installed into the wrong place. The tutorial is expecting you to install into the unpartitioned space at the end of the disk, not /dev/sda2

Thank you.

That’s the command the tutorial asks to be run, which to me, isn’t right, because (as you infer) sda2 contains the installed OS.

Equally, in step4, I expect the luxOpen command to be rung against sda2, not sda3 as the tutorial is asking.

Is this a problem with me or with the procedure?

No, at that point, sda2 shouldn’t contain the OS. At that point the OS should be on sda3. sda2 should still be empty.

Basically, the way that tutorial works is:

  • Create a big empty partition on sda2
  • Install the empty space at the end of the disk(which becomes sda3)
  • Setup luks and lvm manually on sda2
  • Copy the install from sda3 to sda2

That being said, that tutorial demonstrates an advanced and highly manual install method. Is luks an absolute requirement of your install? If not, the installer can natively handle a luks encrypted install, even with a separate /home if you want that.

The balance of probabilities always was stacked against me! :smile: I am running on the default encrypted setup now, but I want to learn and also want to play with “snapshotting”.

I’m grateful for your help! I’ll mark this as resolved but I’m unsure how to “close” this.

Mike

How were you planning to do that? xfs on lvm on luks? I think that would be the only combination that would allow snapshots via lvm.

btrfs on luks is a much easier way to support snapshots that is fully supported by the installer.

I stand corrected, I’ll take your suggestion; it’ll save me unnecessary pain. Thanks again dalto!

I went back to check my understanding. This suggest that LVM can do snapshots.

I’ll give my original plan a try and see how far I get.

For some reason, I though that lvm snapshots were only supported with xfs. It looks like they do work with other filesystems though.

That being said, I still think it would be worlds easier with btrfs which has lots of tools and services to help you with it.

Events have transpired whilst we’ve been messaging which means I’m now time-poor. I’ll go the btrfs route as you suggest. Thanks again!

1 Like

Welcome to the forum, I hope you enjoy your time here.

Does the under score before your name indicate you are a coder?

Pudge

Hand up! I’m a wannabe! :smile: I just put that there because I was trying to avoid Mike123456789 etc… If that is causing confusion, I can remove it, even if that means I have to delete this account and set it up again. I wasn’t aware of that connotation.

Mike

1 Like

No, your user name is fine. I just thought there was a correlation between the leading under score and coding. Very creative. Don’t change it, I like it.

Pudge

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.