From: "J. Roeleveld" <joost@antarean.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] hibernation
Date: Sat, 06 Dec 2014 08:38:20 +0100 [thread overview]
Message-ID: <34613076.cLnunO0tU3@andromeda> (raw)
In-Reply-To: <1450AC75-3E80-43CA-835B-3D6629D9E3F8@antarean.org>
[-- Attachment #1: Type: text/plain, Size: 2059 bytes --]
On Thursday, December 04, 2014 07:52:44 PM J. Roeleveld wrote:
> On 4 December 2014 18:32:16 CET, Michael Vetter <michael.vetter@uni-
konstanz.de> wrote:
> >Am 04/12/14 18:10, schrieb Randolph Maaßen:
> >> 2014-12-04 17:58 GMT+01:00 Michael Vetter
> >
> ><michael.vetter@uni-konstanz.de>:
> >>>> Did you try suspending using the echo command I mentioned earlier?
> >>>
> >>> Yes, it seemed to work (just starting up again didn't).
> >>>
> >>>> You can set the resume partition in the kernel. Might be an option.
> >>>
> >>> Okay, so I changed my kernel command string from "root=/dev/sdb2" to
> >>> "root=/dev/sdb2,resume=/dev/mapper/g-SWAP".
> >>
> >> In my menuconfig I have a space separated list, not comma separated.
> >> So I guess the boot failure is, that the kernel can't find the root
> >> partition /dev/sdb2,resume...
> >
> >Okay, sorry thought this is equivalent to [1].
> >Anyways, I changed it to space and my system boots now.
> >So I tried the suspend command again, but when rebooting its like a
> >fresh reboot.
> >
> >Any ideas?
> >
> >[1] http://man7.org/linux/man-pages/man7/bootparam.7.html
>
> Yes.
> If using LVM for the swap partition (and subsequently the resume) you need
> to use an initramfs.
>
> I will dig out the script I use on my laptop and post it tomorrow. (It boots
> faster with a custom script compared to the genkernel or dracut ones)
Bit later then planned.
The "init" file is the initramfs init-file.
The "config" is what I configure in the kernel:
$ zcat /proc/config.gz | grep initramfs
CONFIG_INITRAMFS_SOURCE="/usr/src/initramfs/config"
There are a few changes you'll need to do:
1) In the "init" file, change the name of the swap-partition you use
2) In the "config" file, change the following paths:
- init-file
3) In the "config" file, run the command mentioned at the end of the file and
add the result of the command to the end of the " config " file.
I have been using this config succesfully for over a year on my laptop.
--
Joost
[-- Attachment #2: config --]
[-- Type: text/plain, Size: 5094 bytes --]
# vim: set ft=initramfs :
# init script
file /init /usr/src/initramfs/init 0755 0 0
# basic device nodes
dir /dev 0755 0 0
nod /dev/console 0600 0 0 c 5 1
# mount point for our real root
dir /root 0700 0 0
dir /lib 0755 0 0
dir /etc 755 0 0
# utilities needed to do anything useful
dir /bin 0755 0 0
dir /sbin 0755 0 0
dir /usr 755 0 0
dir /usr/lib 755 0 0
dir /usr/sbin 755 0 0
dir /usr/bin 755 0 0
dir /lib64 755 0 0
dir /usr/lib64 755 0 0
file /bin/busybox /bin/busybox 0755 0 0
# some busybox symlinks
slink /bin/dd busybox 777 0 0
slink /bin/cp busybox 777 0 0
slink /bin/df busybox 777 0 0
slink /bin/ln busybox 777 0 0
slink /bin/ls busybox 777 0 0
slink /bin/mv busybox 777 0 0
slink /bin/ps busybox 777 0 0
slink /bin/rm busybox 777 0 0
slink /bin/sh busybox 777 0 0
slink /bin/vi busybox 777 0 0
slink /bin/ash busybox 777 0 0
slink /bin/cat busybox 777 0 0
slink /bin/pwd busybox 777 0 0
slink /bin/sed busybox 777 0 0
slink /bin/tar busybox 777 0 0
slink /bin/date busybox 777 0 0
slink /bin/echo busybox 777 0 0
slink /bin/grep busybox 777 0 0
slink /bin/gzip busybox 777 0 0
slink /bin/kill busybox 777 0 0
slink /bin/more busybox 777 0 0
slink /bin/ping busybox 777 0 0
slink /bin/sync busybox 777 0 0
slink /bin/true busybox 777 0 0
slink /bin/zcat busybox 777 0 0
slink /bin/chgrp busybox 777 0 0
slink /bin/chmod busybox 777 0 0
slink /bin/chown busybox 777 0 0
slink /bin/dmesg busybox 777 0 0
slink /bin/egrep busybox 777 0 0
slink /bin/false busybox 777 0 0
slink /bin/fgrep busybox 777 0 0
slink /bin/mkdir busybox 777 0 0
slink /bin/mknod busybox 777 0 0
slink /bin/mount busybox 777 0 0
slink /bin/pidof busybox 777 0 0
slink /bin/rmdir busybox 777 0 0
slink /bin/sleep busybox 777 0 0
slink /bin/touch busybox 777 0 0
slink /bin/uname busybox 777 0 0
slink /bin/gunzip busybox 777 0 0
slink /bin/hostname busybox 777 0 0
slink /bin/mktemp busybox 777 0 0
slink /bin/umount busybox 777 0 0
slink /bin/usleep busybox 777 0 0
slink /usr/bin/[ ../../bin/busybox 777 0 0
slink /usr/bin/du ../../bin/busybox 777 0 0
slink /usr/bin/id ../../bin/busybox 777 0 0
slink /usr/bin/tr ../../bin/busybox 777 0 0
slink /usr/bin/wc ../../bin/busybox 777 0 0
slink /usr/bin/cmp ../../bin/busybox 777 0 0
slink /usr/bin/cut ../../bin/busybox 777 0 0
slink /usr/bin/env ../../bin/busybox 777 0 0
slink /usr/bin/tee ../../bin/busybox 777 0 0
slink /usr/bin/tty ../../bin/busybox 777 0 0
slink /usr/bin/yes ../../bin/busybox 777 0 0
slink /usr/bin/chvt ../../bin/busybox 777 0 0
slink /usr/bin/find ../../bin/busybox 777 0 0
slink /usr/bin/expr ../../bin/busybox 777 0 0
slink /usr/bin/free ../../bin/busybox 777 0 0
slink /usr/bin/head ../../bin/busybox 777 0 0
slink /usr/bin/deallocvt ../../bin/busybox 777 0 0
slink /usr/bin/tail ../../bin/busybox 777 0 0
slink /usr/bin/sort ../../bin/busybox 777 0 0
slink /usr/bin/test ../../bin/busybox 777 0 0
slink /usr/bin/time ../../bin/busybox 777 0 0
slink /usr/bin/uniq ../../bin/busybox 777 0 0
slink /usr/bin/wget ../../bin/busybox 777 0 0
slink /usr/bin/dirname ../../bin/busybox 777 0 0
slink /usr/bin/killall ../../bin/busybox 777 0 0
slink /usr/bin/clear ../../bin/busybox 777 0 0
slink /usr/bin/bzcat ../../bin/busybox 777 0 0
slink /usr/bin/reset ../../bin/busybox 777 0 0
slink /usr/bin/unzip ../../bin/busybox 777 0 0
slink /usr/bin/which ../../bin/busybox 777 0 0
slink /usr/bin/xargs ../../bin/busybox 777 0 0
slink /usr/bin/strings ../../bin/busybox 777 0 0
slink /usr/bin/logger ../../bin/busybox 777 0 0
slink /usr/bin/openvt ../../bin/busybox 777 0 0
slink /usr/bin/hexdump ../../bin/busybox 777 0 0
slink /usr/bin/uptime ../../bin/busybox 777 0 0
slink /usr/bin/whoami ../../bin/busybox 777 0 0
slink /usr/bin/readlink ../../bin/busybox 777 0 0
slink /usr/bin/install ../../bin/busybox 777 0 0
slink /usr/bin/basename ../../bin/busybox 777 0 0
slink /usr/bin/bunzip2 ../../bin/busybox 777 0 0
slink /sbin/halt ../bin/busybox 777 0 0
slink /sbin/init ../bin/busybox 777 0 0
slink /sbin/klogd ../bin/busybox 777 0 0
slink /sbin/route ../bin/busybox 777 0 0
slink /sbin/poweroff ../bin/busybox 777 0 0
slink /sbin/swapoff ../bin/busybox 777 0 0
slink /sbin/switch_root ../bin/busybox 777 0 0
slink /sbin/syslogd ../bin/busybox 777 0 0
slink /sbin/ifconfig ../bin/busybox 777 0 0
slink /sbin/reboot ../bin/busybox 777 0 0
slink /sbin/pivot_root ../bin/busybox 777 0 0
slink /sbin/swapon ../bin/busybox 777 0 0
slink /sbin/mdev ../bin/busybox 777 0 0
slink /usr/sbin/chroot ../../bin/busybox 777 0 0
# end of busybox symlinks
# lvm configuration
dir /etc/lvm 755 0 0
file /etc/lvm/lvm.conf /etc/lvm/lvm.conf 644 0 0
file /sbin/lvm /sbin/lvm 555 0 0
slink /sbin/vgchange lvm 777 0 0
slink /sbin/vgscan lvm 777 0 0
dir /var 755 0 0
dir /var/log 755 0 0
dir /var/lock 755 0 0
# proc and sysfs mountpoints
dir /proc 755 0 0
dir /sys 755 0 0
dir /newroot 755 0 0
# Auto-add dependencies - Run following command as root and paste the output below
# for i in lvm busybox ; do ldd `which ${i}` | cut -d'>' -f2 | awk '{print $1}' ; done | sort -u | grep -v linux-vdso.so.1 | grep -v not | sed 's/\(.*\)/file \1 \1 0755 0 0/'
[-- Attachment #3: init --]
[-- Type: application/x-shellscript, Size: 941 bytes --]
next prev parent reply other threads:[~2014-12-06 7:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 10:32 [gentoo-user] hibernation Michael Vetter
2014-12-03 10:39 ` Randolph Maaßen
2014-12-03 12:43 ` J. Roeleveld
2014-12-03 12:50 ` Marc Stürmer
2014-12-04 16:30 ` Michael Vetter
2014-12-04 16:40 ` J. Roeleveld
2014-12-04 16:58 ` Michael Vetter
2014-12-04 17:10 ` Randolph Maaßen
2014-12-04 17:32 ` Michael Vetter
2014-12-04 18:52 ` J. Roeleveld
2014-12-06 7:38 ` J. Roeleveld [this message]
2014-12-04 21:22 ` Marc Stürmer
2014-12-05 15:08 ` [gentoo-user] hibernation James
2014-12-06 7:41 ` J. Roeleveld
2014-12-06 11:15 ` Mick
2014-12-06 13:59 ` Neil Bothwick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=34613076.cLnunO0tU3@andromeda \
--to=joost@antarean.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox