You are not logged in.

#1 2014-01-26 21:33:17

D4ve
Member
Registered: 2012-08-02
Posts: 209

[Solved] LUKS and LVM

Hello everyone,

I really hate to ask this (again - I'm sure there a thousands of threads about this topic) but I don't get it what's wrong. I want a full encrypted setup where /boot is on an external usb drive and both root and home are encrypted on my internal ssd. The mainboard boots with uefi.

I'm sure I read every wiki article about this but it's still too complicated for me. What I've done:

- Creating a gpt-table on /dev/sda
- Created a linux-partition on /dev/sda with 120GB

But what's the next step? Formatting with luks is no problem (over cryptsetup) but I can't open the device via cryptsetup open. I just get an error:

# cryptsetup open --type luks /dev/sda1 lvm
Device /dev/sda1 is not a valid LUKS device

My plan was to encrypt the whole disk via luks and create lvm partitions within it containing root (16GB) and home (rest). Then I would mount my usb drive, create a mbr table on it, mount it as /boot, install the whole system and tell uefi that it only should boot from this specific removable media. Should work, right?

I'll provide more information later, maybe in the meantime someone could give me a hint?

Last edited by D4ve (2014-01-27 07:13:18)

Offline

#2 2014-01-26 21:36:58

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] LUKS and LVM

Did you actually run cryptsetup? What parameters did you pass it? Please include the whole command you used to create the LUKS device.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-01-27 07:12:53

D4ve
Member
Registered: 2012-08-02
Posts: 209

Re: [Solved] LUKS and LVM

I'm sorry, but of course it was just a stupid typo from my side:

cryptsetup -c aes-xts-plain -s 512 -h sha256 -y luksFormat /dev/sda1
cryptsetup open --type luks /dev/sda1 lvmpool

As mentioned in the wiki, the manpages and a few other sites this works.

I'll mark this thread as solved.

Offline

#4 2014-01-27 09:33:00

frostschutz
Member
Registered: 2013-11-15
Posts: 1,425

Re: [Solved] LUKS and LVM

The wiki unfortunately mentions -c aes-xts-plain several times. It should be -c aes-xts-plain64 instead. It's the default now, same speed and supports disks >2TB.

Offline

#5 2014-01-27 18:46:25

D4ve
Member
Registered: 2012-08-02
Posts: 209

Re: [Solved] LUKS and LVM

frostschutz wrote:

The wiki unfortunately mentions -c aes-xts-plain several times. It should be -c aes-xts-plain64 instead. It's the default now, same speed and supports disks >2TB.

Hm, ok. To be honest I never managed to find the difference between aes-xts-plain and aes-xts-plain64. So thanks for the info.

Offline

Board footer

Powered by FluxBB