View previous topic :: View next topic |
Author |
Message |
mrfree Veteran
Joined: 15 Mar 2003 Posts: 1303 Location: Europe.Italy.Sulmona
|
Posted: Mon Dec 05, 2005 2:43 pm Post subject: suspend2 w/ filewriter + lmv2 problem + genkernel [SOLVED] |
|
|
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 |
|
|
mrfree Veteran
Joined: 15 Mar 2003 Posts: 1303 Location: Europe.Italy.Sulmona
|
Posted: Tue Dec 06, 2005 3:07 pm Post subject: |
|
|
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 |
|
|
mrfree Veteran
Joined: 15 Mar 2003 Posts: 1303 Location: Europe.Italy.Sulmona
|
Posted: Tue Dec 13, 2005 10:00 am Post subject: |
|
|
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 |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Mon Jun 26, 2006 1:31 am Post subject: |
|
|
any translated howto? I am trying to use suspend2 with dmraid (nvraid) and same issue. |
|
Back to top |
|
|
|