You are not logged in.

#1 2011-01-04 17:28:11

Kenny94
Member
Registered: 2010-12-26
Posts: 12

[SOLVED] Hibernate with dm-crypt + LVM

I have set up LVM over an encrypted partition, i have created a volume group with 3 logical volumes: root, swap, home. (i have followed this guide http://www.pindarsign.de/webblog/?p=767 )
My question is:
How can i use suspension mode with my encrypted swap partition? I have searched around, but wiki talk only about suspension over a separate swap volume, my situation is a bit different.

Last edited by Kenny94 (2011-01-09 12:41:09)

Offline

#2 2011-01-05 16:38:31

Kenny94
Member
Registered: 2010-12-26
Posts: 12

Re: [SOLVED] Hibernate with dm-crypt + LVM

I add my fstab if can clearing my situation:

# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0
/dev/mapper/vgroup-home /home ext3 defaults 0 1
/dev/mapper/vgroup-root / ext3 defaults 0 1
/dev/mapper/vgroup-swap swap swap defaults 0 0
/dev/sda1 /boot ext2 defaults 0 1

Offline

#3 2011-01-05 19:16:48

moose jaw
Member
From: Milwaukee
Registered: 2007-08-20
Posts: 95

Re: [SOLVED] Hibernate with dm-crypt + LVM

By "suspension mode", do you mean suspend-to-RAM? Just suspend like you would ordinarily (e.g., with pm-suspend); there's nothing special that needs to be done due to dm-crypt or LVM. This is what I do on my laptop, which has a partition setup quite similar to yours. I don't use suspend-to-disk (i.e. hibernate) myself, so I don't know if there are other issues there, since that actually involves writing to the swap partition (unlike suspend-to-RAM), but my quasi-educated guess would be that you don't need to do anything special for that, either.

Offline

#4 2011-01-06 17:12:55

Kenny94
Member
Registered: 2010-12-26
Posts: 12

Re: [SOLVED] Hibernate with dm-crypt + LVM

Sorry, i have used wrong word, suspension (to ram) doesn't need any particular configuration; instead i would to know how configure the hibernate mode (save to disk, to swap in this case).

P.S. i have edited title of thread

Last edited by Kenny94 (2011-01-06 17:14:21)

Offline

#5 2011-01-07 08:13:36

seiichiro0185
Member
From: Leipzig/Germany
Registered: 2009-04-09
Posts: 182
Website

Re: [SOLVED] Hibernate with dm-crypt + LVM

Just using resume=/dev/mapper/vgroup-swap should do for the hibernation part. For Resuming from hibernate you have to create a "hibernation-aware" initrd. There is a "resume" hook for the initrd. Just put this after the encrypt and lvm2 hooks in your mkinitcpio.conf and rebuild the initrd. After this it should work.


My Scripts at github: github
My Homepage: Seiichiros HP

Offline

#6 2011-01-09 12:40:51

Kenny94
Member
Registered: 2010-12-26
Posts: 12

Re: [SOLVED] Hibernate with dm-crypt + LVM

seiichiro0185 wrote:

Just using resume=/dev/mapper/vgroup-swap should do for the hibernation part. For Resuming from hibernate you have to create a "hibernation-aware" initrd. There is a "resume" hook for the initrd. Just put this after the encrypt and lvm2 hooks in your mkinitcpio.conf and rebuild the initrd. After this it should work.

Thanks, you help me a lot

Offline

Board footer

Powered by FluxBB