1 |
On Thu, Oct 30, 2008 at 12:33 AM, Walter Dnes <waltdnes@××××××××.org> wrote: |
2 |
> On Wed, Oct 29, 2008 at 12:27:39PM +0100, Pint?r Tibor wrote |
3 |
>>> [d530][root][~] emerge -pv s2disk |
4 |
>>> These are the packages that would be merged, in order: |
5 |
>>> Calculating dependencies | |
6 |
>>> emerge: there are no ebuilds to satisfy "s2disk". |
7 |
>>> Now what? |
8 |
>> |
9 |
>> emerge -pv suspend |
10 |
> |
11 |
> First, I had to keyword "=sys-power/suspend-0.8 ~x86" in |
12 |
> package.keywords. I set up suspend.conf like so... |
13 |
> |
14 |
> snapshot device = /dev/snapshot |
15 |
> resume device = /dev/sda6 |
16 |
> #image size = 350000000 |
17 |
> #suspend loglevel = 2 |
18 |
> compute checksum = y |
19 |
> #compress = y |
20 |
> #encrypt = y |
21 |
> #early writeout = y |
22 |
> #splash = y |
23 |
> |
24 |
> Here is my disk layout |
25 |
> |
26 |
> [d530][root][~] fdisk -l |
27 |
> |
28 |
> Disk /dev/sda: 500.1 GB, 500107862016 bytes |
29 |
> 255 heads, 63 sectors/track, 60801 cylinders |
30 |
> Units = cylinders of 16065 * 512 = 8225280 bytes |
31 |
> Disk identifier: 0xd0000000 |
32 |
> |
33 |
> Device Boot Start End Blocks Id System |
34 |
> /dev/sda1 1 60801 488384001 5 Extended |
35 |
> /dev/sda5 1 62 497952 83 Linux |
36 |
> /dev/sda6 63 549 3911796 82 Linux swap / Solaris |
37 |
> /dev/sda7 550 60801 483974158+ 83 Linux |
38 |
> |
39 |
> No, it's not LVM. / is half-a-gig, followed by swap, followed by the |
40 |
> rest of the drive. I use multiple bindmounts to make things look |
41 |
> normal. When I tried "sync", followed by "hibernate" it shut down, but |
42 |
> when I powered back up with the power button, here's what happened... |
43 |
> |
44 |
> - on the reboot, it complained about the superblock "last access" being |
45 |
> in the future (the half-gig partition is ext2) |
46 |
> |
47 |
> - it "fixed" the access date |
48 |
> |
49 |
> - complained that the hard drive was "dirty", i.e. not properly shut |
50 |
> down |
51 |
> |
52 |
> - rebooted |
53 |
> |
54 |
> - played back a whole bunch of disk transactions on /dev/sda7 |
55 |
> (reiserfs). Did i mention I ran "sync" before "hibernate"? |
56 |
> |
57 |
> - it did the rest of the ordinary boot process. |
58 |
> |
59 |
> - it did *NOT* restore anything from the previous session. Do I have to |
60 |
> explicitly set something to tell it to restore a previous session? |
61 |
> Gentoo-wiki is stll down. |
62 |
> |
63 |
> -- |
64 |
> Walter Dnes <waltdnes@××××××××.org> |
65 |
|
66 |
I've not touched hibernation, but from what I've gathered in 5 mins on |
67 |
google, I've a few probable guesses. Firstly, the image of the system |
68 |
set aside by s2disk leaves the system's partitions in a 'dirty' state |
69 |
simply because they're technically still in use. Your kernel needs to |
70 |
be told to look at /dev/sda6 for resuming, appending resume=/dev/sda6 |
71 |
(might be resume=swap:/dev/sda6, not sure) in your grub/lilo config |
72 |
should handle that part, though I've a vague recollection of something |
73 |
about a default resume partition last time I ran through menuconfig |
74 |
too, so you may even be able to avoid that. When it boots, rather than |
75 |
running through init and the usual, it needs access to the 'resume' |
76 |
executable, which has to be usable *before* the system's current |
77 |
mounts are reestablished... which means initrd or initramfs. If you |
78 |
already have both of those things (kernel knowing what the resume |
79 |
partition is and having access to 'resume' where it wants it) as they |
80 |
should be... I'm at a loss. |
81 |
|
82 |
If you go to: |
83 |
http://www.google.com/search?q=HOWTO+Userspace+Software+Suspend+(uswsusp)+-+Gentoo+Linux+Wiki |
84 |
and then hit 'cached' under the first hit, it'll take you to google's |
85 |
last copy of the page. |
86 |
|
87 |
Also, as a side note, from http://www.freewebs.com/gkiagia/hibernate.html -- |
88 |
"WARNING: Never boot the suspended system with another kernel than the |
89 |
one that you used to suspend and never try to mount suspended |
90 |
partitions from another linux system, such as a live cd, otherwise you |
91 |
will probably have data loss." |
92 |
|
93 |
-- |
94 |
Poison [BLX] |
95 |
Joshua M. Murphy |