suspend-to-disk with suspend2 and swap on LVM - Works!
Alexander Skwar
listen at alexander.skwar.name
Tue Aug 15 19:04:38 UTC 2006
· Dick Davies <rasputnik at gmail.com>:
> Thanks Alexander - I was one of the people trying to get
> suspend (hibernate, actually) to lvm swap working.
Ah, okay. Sorry for not remembering your name.
> Tried what you suggested but it still didn't work.
> Some questions:
>
> Are you on Dapper?
Yes. Using the suspend2 kernel from dagobah - http://www.ucc.asn.au/~dagobah/dapper-kernels/
> Are you hibernating or suspending?
Suspending - Power is turned off.
> Doesn't 'kopt=....' do nothing (until you run update-grub at least)?
Yes. And because of that, I actually did not modify kopt but
the real boot line ;) You caught me there *G* Good catch. :-)
> What package provides /etc/hibernate/suspend2.conf
hibernate. Packaged by dagobah as well.
> The reason I'm asking is if I'd done the below,
> I'd still be suspending to /dev/hda6 - since it still exists
I don't understand. With the *OPTIONAL* "resume2" boot option,
you control, to which "device" (swap or file) suspend2 will suspend.
If the boot option isn't set, you'll need to set it in
/etc/hibernate/suspend2.conf. And if you don't set it in suspend2.conf,
you've got to set it on the boot line. So - chose at least one, or
use both, like I do.
The "resume" boot option doesn't do anything. It's of no use
at all and thanks to you, I'm now removing it. It's just waste.
It's waste, if suspend2 is used.
> (and I'm
> assuming the kopt line is a null-op).
Yep.
> On 15/08/06, Alexander Skwar <listen at alexander.skwar.name> wrote:
>> Hi!
>>
>> I can't find the correct thread anymore, but somebody wanted to
>> know, if it's possible to do suspend-to-disk with suspend2
>> and have it use a swap "partition" which is on LVM.
>>
>> I just tested, and this works. To get it to work, I didn't have
>> to do anything special.
>>
>> In /boot/grub/menu.lst, I added to the
>>
>> # kopt=...
>>
>> line:
>>
>> resume2=swap:/dev/sys/Swap
>>
>> The line reads:
>>
>> # kopt=root=/dev/mapper/sys-URoot ro resume=/dev/hda6 resume2=swap:/dev/sys/Swap
>>
>> In /etc/fstab, I added:
>>
>> /dev/sys/Swap none swap sw 0 0
>>
>> In /etc/hibernate/suspend2.conf I set:
>>
>> SuspendDevice swap:/dev/sys/Swap
>>
>> In all those places where there is now /dev/sys/Swap, I used to have
>> /dev/hda6. So, I didn't have to do anything special at all.
>
Alexander Skwar
--
Wer beim Schreiben viele Ausrufezeichen verwendet, spricht auch sehr
laut.
-- Heimito von Doderer (Pseudonym: Stangeler, Reneé)
More information about the ubuntu-users
mailing list