* [gentoo-user] Screwed up swap while trying to get hibernate working; help
@ 2008-10-31 3:54 Walter Dnes
2008-10-31 4:13 ` Iain Buchanan
2008-10-31 17:51 ` Joshua Murphy
0 siblings, 2 replies; 12+ messages in thread
From: Walter Dnes @ 2008-10-31 3:54 UTC (permalink / raw
To: Gentoo Users List
I ran hibernate once unsuccessfully. I forgot to put "resume=" into
my lilo.conf (oops). I finally did that, but now, hiberate gets to...
hibernate: Running /usr/sbin/s2disk ...
s2disk: Could not use the resume device (try swapon -a). Reason: No such device
...and backs out gracefully. According to "fdisk -l", swap is there...
[d530][root][~] fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd0000000
Device Boot Start End Blocks Id System
/dev/sda1 1 60801 488384001 5 Extended
/dev/sda5 1 62 497952 83 Linux
/dev/sda6 63 549 3911796 82 Linux swap / Solaris
/dev/sda7 550 60801 483974158+ 83 Linux
...but according to swapon, it's not...
[d530][root][~] swapon -a
swapon: /dev/sda6: Invalid argument
What did I did? And how do I straighten it out?
--
Walter Dnes <waltdnes@waltdnes.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Screwed up swap while trying to get hibernate working; help
2008-10-31 3:54 [gentoo-user] Screwed up swap while trying to get hibernate working; help Walter Dnes
@ 2008-10-31 4:13 ` Iain Buchanan
2008-10-31 21:41 ` Walter Dnes
2008-10-31 17:51 ` Joshua Murphy
1 sibling, 1 reply; 12+ messages in thread
From: Iain Buchanan @ 2008-10-31 4:13 UTC (permalink / raw
To: gentoo-user
Walter Dnes wrote:
> I ran hibernate once unsuccessfully. I forgot to put "resume=" into
> my lilo.conf (oops). I finally did that, but now, hiberate gets to...
>
> hibernate: Running /usr/sbin/s2disk ...
> s2disk: Could not use the resume device (try swapon -a). Reason: No such device
>
> ...and backs out gracefully. According to "fdisk -l", swap is there...
>
>
> [d530][root][~] fdisk -l
>
> Disk /dev/sda: 500.1 GB, 500107862016 bytes
> 255 heads, 63 sectors/track, 60801 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0xd0000000
>
> Device Boot Start End Blocks Id System
> /dev/sda1 1 60801 488384001 5 Extended
> /dev/sda5 1 62 497952 83 Linux
> /dev/sda6 63 549 3911796 82 Linux swap / Solaris
> /dev/sda7 550 60801 483974158+ 83 Linux
>
> ...but according to swapon, it's not...
>
>
> [d530][root][~] swapon -a
> swapon: /dev/sda6: Invalid argument
>
>
> What did I did? And how do I straighten it out?
mkswap /dev/sda6
swapon /dev/sda6
?
--
Iain Buchanan <iaindb at netspace dot net dot au>
They had to edit the first ending of 'Lone Wolf McQuade' after Chuck
Norris kicked David Carradine's ass, then proceeded to barbecue and eat
him.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Screwed up swap while trying to get hibernate working; help
2008-10-31 3:54 [gentoo-user] Screwed up swap while trying to get hibernate working; help Walter Dnes
2008-10-31 4:13 ` Iain Buchanan
@ 2008-10-31 17:51 ` Joshua Murphy
2008-11-01 3:41 ` Walter Dnes
2008-11-01 5:18 ` Iain Buchanan
1 sibling, 2 replies; 12+ messages in thread
From: Joshua Murphy @ 2008-10-31 17:51 UTC (permalink / raw
To: gentoo-user
On Thu, Oct 30, 2008 at 11:54 PM, Walter Dnes <waltdnes@waltdnes.org> wrote:
> I ran hibernate once unsuccessfully. I forgot to put "resume=" into
> my lilo.conf (oops). I finally did that, but now, hiberate gets to...
>
> hibernate: Running /usr/sbin/s2disk ...
> s2disk: Could not use the resume device (try swapon -a). Reason: No such device
>
> ...and backs out gracefully. According to "fdisk -l", swap is there...
>
>
> [d530][root][~] fdisk -l
>
> Disk /dev/sda: 500.1 GB, 500107862016 bytes
> 255 heads, 63 sectors/track, 60801 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Disk identifier: 0xd0000000
>
> Device Boot Start End Blocks Id System
> /dev/sda1 1 60801 488384001 5 Extended
> /dev/sda5 1 62 497952 83 Linux
> /dev/sda6 63 549 3911796 82 Linux swap / Solaris
> /dev/sda7 550 60801 483974158+ 83 Linux
>
> ...but according to swapon, it's not...
>
>
> [d530][root][~] swapon -a
> swapon: /dev/sda6: Invalid argument
>
>
> What did I did? And how do I straighten it out?
Umm... if you're hibernating to the same swap partition you're using
when the system's live... I'm pretty sure you can't do that... even if
everything does manage to fit, having sort out what belongs back in
ram and what doesn't ... it's not a very sane thing to expect the
kernel+userspace tools there to do. If I recall from last time I
considered setting it up on my system, software hibernate needs an
otherwise unused swap partition that's just a little bigger than the
amount of physical ram in your system.
--
Poison [BLX]
Joshua M. Murphy
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Screwed up swap while trying to get hibernate working; help
2008-10-31 4:13 ` Iain Buchanan
@ 2008-10-31 21:41 ` Walter Dnes
0 siblings, 0 replies; 12+ messages in thread
From: Walter Dnes @ 2008-10-31 21:41 UTC (permalink / raw
To: gentoo-user
> mkswap /dev/sda6
> swapon /dev/sda6
Thanks, that worked. Having been bitten before by "doing the
obvious", I was wondering if something else was required.
--
Walter Dnes <waltdnes@waltdnes.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Screwed up swap while trying to get hibernate working; help
2008-10-31 17:51 ` Joshua Murphy
@ 2008-11-01 3:41 ` Walter Dnes
2008-11-02 22:58 ` Joshua Murphy
2008-11-01 5:18 ` Iain Buchanan
1 sibling, 1 reply; 12+ messages in thread
From: Walter Dnes @ 2008-11-01 3:41 UTC (permalink / raw
To: gentoo-user
On Fri, Oct 31, 2008 at 01:51:58PM -0400, Joshua Murphy wrote
> Umm... if you're hibernating to the same swap partition you're using
> when the system's live... I'm pretty sure you can't do that... even if
> everything does manage to fit, having sort out what belongs back in
> ram and what doesn't ... it's not a very sane thing to expect the
> kernel+userspace tools there to do. If I recall from last time I
> considered setting it up on my system, software hibernate needs an
> otherwise unused swap partition that's just a little bigger than the
> amount of physical ram in your system.
Which begs the next question... howsabout if I turn swap off as part
of the hibernation process? I.e. in /etc/hibernate/hibernate.conf
include the lines...
OnSuspend 00 swapoff /dev/sda6
OnResume 00 swapon /dev/sda6
or for that matter, what's the worst that can happen if I turn off
swap alltogether, and run out of memory? Is it catastrophic, or merely
inconvenient (additional programs refuse to launch)?
--
Walter Dnes <waltdnes@waltdnes.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Screwed up swap while trying to get hibernate working; help
2008-10-31 17:51 ` Joshua Murphy
2008-11-01 3:41 ` Walter Dnes
@ 2008-11-01 5:18 ` Iain Buchanan
2008-11-02 22:37 ` Joshua Murphy
2008-11-04 19:51 ` Mick
1 sibling, 2 replies; 12+ messages in thread
From: Iain Buchanan @ 2008-11-01 5:18 UTC (permalink / raw
To: gentoo-user
Joshua Murphy wrote:
> On Thu, Oct 30, 2008 at 11:54 PM, Walter Dnes<waltdnes@waltdnes.org> wrote:
>> I ran hibernate once unsuccessfully. I forgot to put "resume=" into
>> my lilo.conf (oops). I finally did that, but now, hiberate gets to...
>>
[snip]
>> What did I did? And how do I straighten it out?
>
> Umm... if you're hibernating to the same swap partition you're using
> when the system's live... I'm pretty sure you can't do that...
:) Actually it can! This is the whole point of using a swap partition
for hibernating! In fact, this is the only configuration I used (one
swap partition to suspend to) for years, until I got a laptop with 4G
ram I thought a large swap partition was a bit redundant. Now I
hibernate to a file.
tuxonice can hibernate to 1 or more swap partitions.
> even if
> everything does manage to fit, having sort out what belongs back in
> ram and what doesn't ... it's not a very sane thing to expect the
> kernel+userspace tools there to do. If I recall from last time I
> considered setting it up on my system, software hibernate needs an
> otherwise unused swap partition that's just a little bigger than the
> amount of physical ram in your system.
actually it can also free up some ram, and your image is compressed
using lzf which can achieve a claimed 30 - 50% but generally you should
have enough free swap to cover the size of used RAM.
If you have too little swap, tuxonice will "abort gracefully"
cya,
--
Iain Buchanan <iaindb at netspace dot net dot au>
"He don't know me vewy well, DO he?" -- Bugs Bunny
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Screwed up swap while trying to get hibernate working; help
2008-11-01 5:18 ` Iain Buchanan
@ 2008-11-02 22:37 ` Joshua Murphy
2008-11-02 23:04 ` Iain Buchanan
2008-11-04 19:51 ` Mick
1 sibling, 1 reply; 12+ messages in thread
From: Joshua Murphy @ 2008-11-02 22:37 UTC (permalink / raw
To: gentoo-user
On Sat, Nov 1, 2008 at 12:18 AM, Iain Buchanan <iaindb@netspace.net.au> wrote:
> Joshua Murphy wrote:
>>
>> On Thu, Oct 30, 2008 at 11:54 PM, Walter Dnes<waltdnes@waltdnes.org>
>> wrote:
>>>
>>> I ran hibernate once unsuccessfully. I forgot to put "resume=" into
>>> my lilo.conf (oops). I finally did that, but now, hiberate gets to...
>>>
> [snip]
>>>
>>> What did I did? And how do I straighten it out?
>>
>> Umm... if you're hibernating to the same swap partition you're using
>> when the system's live... I'm pretty sure you can't do that...
>
> :) Actually it can! This is the whole point of using a swap partition for
> hibernating! In fact, this is the only configuration I used (one swap
> partition to suspend to) for years, until I got a laptop with 4G ram I
> thought a large swap partition was a bit redundant. Now I hibernate to a
> file.
>
> tuxonice can hibernate to 1 or more swap partitions.
>
>> even if
>> everything does manage to fit, having sort out what belongs back in
>> ram and what doesn't ... it's not a very sane thing to expect the
>> kernel+userspace tools there to do. If I recall from last time I
>> considered setting it up on my system, software hibernate needs an
>> otherwise unused swap partition that's just a little bigger than the
>> amount of physical ram in your system.
>
> actually it can also free up some ram, and your image is compressed using
> lzf which can achieve a claimed 30 - 50% but generally you should have
> enough free swap to cover the size of used RAM.
>
> If you have too little swap, tuxonice will "abort gracefully"
>
> cya,
> --
> Iain Buchanan <iaindb at netspace dot net dot au>
>
> "He don't know me vewy well, DO he?" -- Bugs Bunny
>
>
I stand quite humbly corrected... this is what I get for leaving my
old desktop running 24/7 unless kernel changes or power outtages
interrupted. Now with my playing Combat Arms... and being limited to
Windows for that... I may well resort to setting up hibernating for my
system... finally. Great to know the details better now! (and my
apologies for the misinformation)
--
Poison [BLX]
Joshua M. Murphy
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Screwed up swap while trying to get hibernate working; help
2008-11-01 3:41 ` Walter Dnes
@ 2008-11-02 22:58 ` Joshua Murphy
0 siblings, 0 replies; 12+ messages in thread
From: Joshua Murphy @ 2008-11-02 22:58 UTC (permalink / raw
To: gentoo-user
On Fri, Oct 31, 2008 at 10:41 PM, Walter Dnes <waltdnes@waltdnes.org> wrote:
> On Fri, Oct 31, 2008 at 01:51:58PM -0400, Joshua Murphy wrote
>
>> Umm... if you're hibernating to the same swap partition you're using
>> when the system's live... I'm pretty sure you can't do that... even if
>> everything does manage to fit, having sort out what belongs back in
>> ram and what doesn't ... it's not a very sane thing to expect the
>> kernel+userspace tools there to do. If I recall from last time I
>> considered setting it up on my system, software hibernate needs an
>> otherwise unused swap partition that's just a little bigger than the
>> amount of physical ram in your system.
>
> Which begs the next question... howsabout if I turn swap off as part
> of the hibernation process? I.e. in /etc/hibernate/hibernate.conf
> include the lines...
>
> OnSuspend 00 swapoff /dev/sda6
> OnResume 00 swapon /dev/sda6
>
> or for that matter, what's the worst that can happen if I turn off
> swap alltogether, and run out of memory? Is it catastrophic, or merely
> inconvenient (additional programs refuse to launch)?
>
> --
> Walter Dnes <waltdnes@waltdnes.org>
Well, aside from pointing toward the place where I was corrected... I
*can* answer what happens when you run out of ram... or ram+swap,
actually, if you have swap. It can either kill processes of its own
accord or simply deny new processes and forks of old processes. The
article below has a much better explanation...
http://lwn.net/Articles/104179/
--
Poison [BLX]
Joshua M. Murphy
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Screwed up swap while trying to get hibernate working; help
2008-11-02 22:37 ` Joshua Murphy
@ 2008-11-02 23:04 ` Iain Buchanan
2008-11-02 23:13 ` Joshua Murphy
0 siblings, 1 reply; 12+ messages in thread
From: Iain Buchanan @ 2008-11-02 23:04 UTC (permalink / raw
To: gentoo-user
Joshua Murphy wrote:
> On Sat, Nov 1, 2008 at 12:18 AM, Iain Buchanan<iaindb@netspace.net.au> wrote:
> I stand quite humbly corrected... this is what I get for leaving my
> old desktop running 24/7 unless kernel changes or power outtages
> interrupted. Now with my playing Combat Arms... and being limited to
> Windows for that... I may well resort to setting up hibernating for my
> system... finally. Great to know the details better now! (and my
> apologies for the misinformation)
np, I've done much worse in the past...
Hibernate is also great for rebooting to windows for games: hibernate
linux - boot windows - restart - resume linux! Just make sure you have
Unmout vfat ntfs
and whatever else windows can mount in your common.conf
--
Iain Buchanan <iaindb at netspace dot net dot au>
Stealing a rhinoceros should not be attempted lightly.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Screwed up swap while trying to get hibernate working; help
2008-11-02 23:04 ` Iain Buchanan
@ 2008-11-02 23:13 ` Joshua Murphy
0 siblings, 0 replies; 12+ messages in thread
From: Joshua Murphy @ 2008-11-02 23:13 UTC (permalink / raw
To: gentoo-user
On Sun, Nov 2, 2008 at 6:04 PM, Iain Buchanan <iaindb@netspace.net.au> wrote:
> Joshua Murphy wrote:
>>
>> On Sat, Nov 1, 2008 at 12:18 AM, Iain Buchanan<iaindb@netspace.net.au>
>> wrote:
>
>> I stand quite humbly corrected... this is what I get for leaving my
>> old desktop running 24/7 unless kernel changes or power outtages
>> interrupted. Now with my playing Combat Arms... and being limited to
>> Windows for that... I may well resort to setting up hibernating for my
>> system... finally. Great to know the details better now! (and my
>> apologies for the misinformation)
>
> np, I've done much worse in the past...
>
> Hibernate is also great for rebooting to windows for games: hibernate linux
> - boot windows - restart - resume linux! Just make sure you have
> Unmout vfat ntfs
> and whatever else windows can mount in your common.conf
>
>
> --
> Iain Buchanan <iaindb at netspace dot net dot au>
>
> Stealing a rhinoceros should not be attempted lightly.
I'll actually have it unmounting my 500GB xfs storage drive and
killing mpd to do it ... colinux in windows (running Gentoo,
obviously), samba, and winamp... I've gone without my music far too
much in the past, it won't be happening again if I can help it. :-P
... I do simply hibernate windows most of the time, though... so I'll
need to come up with something to go through unmounting that storage
from the colinux side on hibernate, and picking it back up when it
comes back up...
--
Poison [BLX]
Joshua M. Murphy
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Screwed up swap while trying to get hibernate working; help
2008-11-01 5:18 ` Iain Buchanan
2008-11-02 22:37 ` Joshua Murphy
@ 2008-11-04 19:51 ` Mick
2008-11-05 4:17 ` Iain Buchanan
1 sibling, 1 reply; 12+ messages in thread
From: Mick @ 2008-11-04 19:51 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 389 bytes --]
On Saturday 01 November 2008, Iain Buchanan wrote:
> actually it can also free up some ram, and your image is compressed
> using lzf which can achieve a claimed 30 - 50% but generally you should
> have enough free swap to cover the size of used RAM.
Is the compression a tuxonice only feature, or has it been applied on the
gentoo kernel suspend modules too?
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [gentoo-user] Screwed up swap while trying to get hibernate working; help
2008-11-04 19:51 ` Mick
@ 2008-11-05 4:17 ` Iain Buchanan
0 siblings, 0 replies; 12+ messages in thread
From: Iain Buchanan @ 2008-11-05 4:17 UTC (permalink / raw
To: gentoo-user
Mick wrote:
> On Saturday 01 November 2008, Iain Buchanan wrote:
>> actually it can also free up some ram, and your image is compressed
>> using lzf which can achieve a claimed 30 - 50% but generally you should
>> have enough free swap to cover the size of used RAM.
>
> Is the compression a tuxonice only feature, or has it been applied on the
> gentoo kernel suspend modules too?
what are "the gentoo kernel suspend modules"? None of the kernels in
portage are really gentoo kernels, but they're kernel.org (or other)
kernels, with gentoo (and other) patches.
If you mean gentoo-sources or vanilla-sources, then tuxonice patches
haven't been applied, and I don't _think_ kernel.org's kernel suspend
uses compression. At least not lzf. Someone else will answer here :)
There is of course tuxonice-sources though!
--
Iain Buchanan <iaindb at netspace dot net dot au>
The sooner you fall behind, the more time you have to catch up.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-11-05 4:17 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-31 3:54 [gentoo-user] Screwed up swap while trying to get hibernate working; help Walter Dnes
2008-10-31 4:13 ` Iain Buchanan
2008-10-31 21:41 ` Walter Dnes
2008-10-31 17:51 ` Joshua Murphy
2008-11-01 3:41 ` Walter Dnes
2008-11-02 22:58 ` Joshua Murphy
2008-11-01 5:18 ` Iain Buchanan
2008-11-02 22:37 ` Joshua Murphy
2008-11-02 23:04 ` Iain Buchanan
2008-11-02 23:13 ` Joshua Murphy
2008-11-04 19:51 ` Mick
2008-11-05 4:17 ` Iain Buchanan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox