Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
suspend2 w/ filewriter + lmv2 problem + genkernel [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Mon Dec 05, 2005 2:43 pm    Post subject: suspend2 w/ filewriter + lmv2 problem + genkernel [SOLVED] Reply with quote

I'm trying to use suspend2 (suspend2-sources) using filewriter on my system (all partition on lvm2), the problem is... I don't known which device to use when resuming :)

Let me explain...
during the first hibernate run, the script suggests me to add
Code:
resume2=file:/dev/dm-0:0x44610
to my cmdline , and I've do that...
now my system go to sleep correctly (the state is stored in /suspend_file) but when I reboot the system started normally without resume anything... :(

The problem seems to be in the initrd image... I create it using genkernel with
Code:
genkernel --gensplash=livecd-2005.1 --gensplash-res=1024x768 --lvm2 --install --oldconfig all


I've read some suspend2 docs:
http://www.suspend2.net/HOWTO-7.html#ss7.4
http://www.suspend2.net/FAQ-6.html#ss6.4
http://wiki.suspend2.net/DistroAndHardwareSetup/DebianInitrd

and I found that genkernel inirtd image doesn't contain linuxrc file! So I've tryed to add a simple one
Code:
#!/bin/sh
echo > /proc/suspend2/do_resume

and this is the final result
Code:
[...] myinitrd # tree
.
|-- bin
|-- dev
|   |-- console
|   |-- null
|   `-- tty1
|-- etc
|   `-- fstab
|-- lib64 -> ../lib
|-- linuxrc
|-- proc
|-- sbin
|-- sys
|-- temp
|-- usr
|   |-- bin
|   `-- sbin
`-- var
    `-- lock
        `-- dmraid

13 directories, 6 files


The linuxrc script seems to be executed correctly during the boot process but suspend2 doesn't like it
Code:
[...] Missing or invalid storage location (resume2=...) [...]


Where is the mistake? :?:
_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic


Last edited by mrfree on Tue Dec 13, 2005 10:01 am; edited 2 times in total
Back to top
View user's profile Send private message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Tue Dec 06, 2005 3:07 pm    Post subject: Reply with quote

Mhhhh no replay... :?

Probably I need to do some thing like this
Quote:
This requires Suspend2 2.1.4.2 or later.

1. You will need to use an initrd or initramfs support, so your kernel must have support for this.
2. Configure your LVM/encrypted swap/whatever like you normally would.
3. Modify your initrd/initramfs as follows:
* install a statically linked version of dmsetup
* install any dm modules needed for your configuration
* ensure that /dev, /dev/mapper, /proc and /sys exist on that filesystem
* create a link from /dev/mapper/<partition name> to /dev/dm-0:

ln -s /dev/mapper/<partition name> /dev/dm-0

* use dmsetup table <partition name> to store the configuration for your partition in a file on the initrd|ramfs.
* in your linuxrc/init:
o mount /proc
o load modules as required
o use dmsetup create dm-0 <path to config-file> to set up access to the LVM partition
o echo > /proc/suspend2/do_resume
o do any other actions required (mount rootfs if initramfs...)
o umount /proc if initrd.


My questions are...
Why the initrd image, build by genkernel, is a simple empty directories structure?
During the init this tree is probably filled... how?

I probably need to make an handmade initrd image, but... exists a genkernel patch for this? :)
_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Back to top
View user's profile Send private message
mrfree
Veteran
Veteran


Joined: 15 Mar 2003
Posts: 1303
Location: Europe.Italy.Sulmona

PostPosted: Tue Dec 13, 2005 10:00 am    Post subject: Reply with quote

Ok... I've readed genkernel, suspend2 and others documentations and finally I've made an howto ;)

Now all works well!!!

[HOWTO] suspend2 e filewriter su lvm2 (usando genkernel) (in Italian)
_________________
Please EU, pimp my country!

ICE: /etc/init.d/iptables panic
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Mon Jun 26, 2006 1:31 am    Post subject: Reply with quote

any translated howto? I am trying to use suspend2 with dmraid (nvraid) and same issue.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum