FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 10-31-2008, 02:54 AM
"Walter Dnes"
 
Default Screwed up swap while trying to get hibernate working; help

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>
 
Old 10-31-2008, 03:13 AM
Iain Buchanan
 
Default Screwed up swap while trying to get hibernate working; help

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.
 
Old 10-31-2008, 04:51 PM
"Joshua Murphy"
 
Default Screwed up swap while trying to get hibernate working; help

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
 
Old 11-01-2008, 04:18 AM
Iain Buchanan
 
Default Screwed up swap while trying to get hibernate working; help

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
 
Old 11-02-2008, 09:37 PM
"Joshua Murphy"
 
Default Screwed up swap while trying to get hibernate working; help

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
 
Old 11-02-2008, 09:58 PM
"Joshua Murphy"
 
Default Screwed up swap while trying to get hibernate working; help

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
 
Old 11-02-2008, 10:04 PM
Iain Buchanan
 
Default Screwed up swap while trying to get hibernate working; help

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.
 
Old 11-02-2008, 10:13 PM
"Joshua Murphy"
 
Default Screwed up swap while trying to get hibernate working; help

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
 
Old 11-04-2008, 06:51 PM
Mick
 
Default Screwed up swap while trying to get hibernate working; help

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
 
Old 11-05-2008, 03:17 AM
Iain Buchanan
 
Default Screwed up swap while trying to get hibernate working; help

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.
 

Thread Tools




All times are GMT. The time now is 10:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org