You are not logged in.

#1 2011-12-16 23:32:38

danielt
Member
Registered: 2011-12-16
Posts: 5

[SOLVED] Booting encrypted LVM

Hi,

finally i've installed archlinux after my Ubuntu upgrade failed disastrous. Ubuntu was running with an encrypted LVM, and i've managed to reuse the volumes, I've just wiped the root volume, all the important data is on a different volume.

I've done the following:

  • setup dmcrypt and lvm

  • run archsetup

  • USELVM="yes" in rc.conf

  • HOOKS="base udev autodetect pata scsi sata lvm2 encrypt filesystems usbinput"

    in mkinitcpio.conf

  • grubs menu.lst:

    # (0) Arch Linux
    title  Arch Linux
    root   (hd0,4)
    kernel /vmlinuz-linux cryptdevice=/dev/sda1:cryptsda1 root=/dev/mapper/europium-root ro
    initrd /initramfs-linux.img

sda1 is the encrypted disk, europium is the volumegroup and europium-root is the
root volume.

On startup, the password prompt for dm-crypt appears and it accepts my password. Then it says it waits 10 seconds for europium-root and then an emergency shell is started. Why?

Currently to get the machine booted I type into the emergency shell:

$ /sbin/lvm vgchange --sysinit -a y
$ exit

And then it boots.

Isn't that what the lvm2-Hook should do?

I've extracted the initrd image into /tmp and examined it a bit:

$ grep HOOK config
HOOKS="base udev autodetect pata scsi sata lvm2 encrypt filesystems usbinput"
$ ls hooks 
encrypt  lvm2  udev

What am I missing? Is something wrong with the kernel line in my menu.lst?

Thanks,
Daniel

Last edited by danielt (2011-12-17 19:02:24)

Offline

#2 2011-12-17 00:03:45

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: [SOLVED] Booting encrypted LVM

danielt wrote:

Hi,

finally i've installed archlinux after my Ubuntu upgrade failed disastrous. Ubuntu was running with an encrypted LVM, and i've managed to reuse the volumes, I've just wiped the root volume, all the important data is on a different volume.

I've done the following:

  • setup dmcrypt and lvm

  • ...

sda1 is the encrypted disk, europium is the volumegroup and europium-root is the
root volume.

I've extracted the initrd image into /tmp and examined it a bit:

$ grep HOOK config
HOOKS="base udev autodetect pata scsi sata lvm2 encrypt filesystems usbinput"

What am I missing? Is something wrong with the kernel line in my menu.lst?

You say sda1 is the encrypted disk, implying you have LVM over LUKS, but you call lvm2 before encrypt in your hooks, where order matters.

Check what happens when you swap the order.

Offline

#3 2011-12-17 18:12:17

danielt
Member
Registered: 2011-12-16
Posts: 5

Re: [SOLVED] Booting encrypted LVM

Uh... don't know how often I overlooked that. But that fixed it, thanks.

Offline

#4 2011-12-17 18:15:28

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: [SOLVED] Booting encrypted LVM

Cool, glad to help :-)

Last edited by /dev/zero (2011-12-17 19:05:45)

Offline

Board footer

Powered by FluxBB