You are not logged in.

#1 2008-02-04 15:31:00

eMxyzptlk
Member
Registered: 2008-02-04
Posts: 7

LVM over DM-CRYPT

Hello,

I used to be an ArchLinux user ( old username _Gandalf_ if anyone remembers me big_smile )  and I moved to Gentoo since a while, anyway I'd like to have an ArchLinux installation as well but I have a Question first:

Here's how my HDD is formatted:
/dev/sda1  --> /boot
/dev/sda2  --> DM-CRYPT --> LVM --> Swap, Root, Storage, Home, Gentoo and hopefully Arch.

does Arch support this kind of setup hopefully without rebuilding the kernel or hack the initrd image?? if not are there any guides??

Thanks...

Offline

#2 2008-02-05 21:21:37

gothmog.todi
Member
From: Austria
Registered: 2007-07-18
Posts: 120

Re: LVM over DM-CRYPT

Welcome back! (Sooner or later they all come back... wink )

From a short look at rc.sysinit i would say that your setup is supported. You will need to change a few settings to use it, though. Mainly you need to add encrypt and lvm2 to the HOOKS array in /etc/mkinitcpio.conf, adapt the boot parameter in your grub/lilo config and change USELVM in /etc/rc.conf to "yes"

There are some wiki entries about this:
http://wiki.archlinux.org/index.php/Sys … r_dm-crypt for dm-crypt
http://wiki.archlinux.org/index.php/Ins … AID_or_LVM for lvm
http://wiki.archlinux.org/index.php/RAID_Encryption_LVM for both combined
(the last one is rather old, some things may be out of date)

Offline

#3 2008-02-10 22:29:12

scorpyn
Member
From: Sweden
Registered: 2008-01-29
Posts: 66

Re: LVM over DM-CRYPT

Debian can do it so I know it's possible, but it's not covered by the wiki. I tried it myself, but after rebooting a few times and either only being able to decrypt but not set up the lvm stuff, or seeing the boot process not even try to unlock the lvm partition, I gave up and decided to only use 2 passworded partitions (/ and /home).

I'm guessing that I'm missing something very simple, but I don't know what...

Offline

#4 2008-02-13 16:35:43

toki
Member
From: Germany
Registered: 2007-12-27
Posts: 9

Re: LVM over DM-CRYPT

My setup is similar. I stole the whole idea from the debian installer and adapted it to arch wink
Here's how:

1.) modify /etc/mkinitcpio.conf

MODULES="ahci libata dm-mod dm-crypt aes-x86-64"
...
HOOKS="base udev sata usbinput keymap encrypt lvm2 filesystems"

Of course replace aes-x86-64 with your crypto system (eg. aes-generic).
Run mkinitcpio.

2.) in /etc/rc.conf:

USELVM="yes"

3.) in /boot/grub/menu.lst, you need:

kernel /vmlinuz26 cryptdevice=/dev/sda2:crypthd1 root=/dev/mapper/cryptodisks-root resume=/dev/mapper/cryptodisks-swap ...

Change the mapper stuff according to your system.

4.) don't forget about changing /etc/fstab.

I run it this way, and IIRC that's all it took to get it up and running, because the arch initscripts already provide support for this kind of setup.

Offline

#5 2008-05-26 21:02:59

poor_kenny
Member
Registered: 2008-05-14
Posts: 13

Re: LVM over DM-CRYPT

i;m trying to do the same setup as described in wiki... is a separate volume in LVM for /tmp necessary?

Offline

#6 2008-05-26 23:17:18

elide
Member
From: Russia
Registered: 2007-12-02
Posts: 40

Re: LVM over DM-CRYPT

Keeping your /tmp on tmpfs is a much better idea.

Offline

Board footer

Powered by FluxBB