Hibernation woes

Ted Hilts thilts at mcsnet.ca
Tue May 13 22:56:46 UTC 2008

NoOp wrote:
> On 05/11/2008 10:56 AM, Derek Broughton wrote:
>> NoOp wrote:
>>> Or perhaps it might be easier to use a swap file instead:
>>> https://help.ubuntu.com/community/SwapFaq
>>> [How do I add more swap?]
>> It's an option if hibernation works with swap files - I wasn't sure, and I
>> don't see anything in there (otoh, it specifically mentions needing swap
>> for hibernation, but doesn't say it _won't_ work with a file).
>> That's the first time I've seen that swap files should be as fast as swap
>> partitions, now.  Nice to hear, because it really simplifies setup (though
>> it really should be possible to use mkswap to specify the size, instead of
>> having to go through dd).
> I wasn't aware of it either until this thread & the fact that I'd just
> reinstalled another drive just to increase the swap partition on that.
> That was a major PITB, so I gave tried the swap _file_ method on my
> laptop and it worked great. Fired up my other old lapbrick (Clevo 350Mhz
> w/128Mb) and did the same on that one, so twice tested (on Hardy -
> Gnome) & both without any problems whatsoever.
> Note: I've also tried it by commenting out the swap_file_
> '# /mnt/1024Mb.swap  none  swap  sw  0 0' (reboot)
> and free then returns to the standard partition size - put it back in
> (reboot) and walla! I now have the added swap space (partition plus
> swapfile). :-)
I read from NoOp's reference URL the following:

Hibernation needs swap

The hibernation feature (suspend-to-disk) writes out the contents of the 
memory to the swap partition before turning off the machine. Therefore, 
your swap partition should be at least as big as your RAM size. The 
hibernation implementation currently used in Ubuntu, swsusp, needs a 
swap or suspend partition, and ***can not use a swap file on an active 
file system***.

Note the use of "file" and "partition" in the above excerpt. My Ubuntu 
hibernation implementation requires a swap partion because it uses 

So either the swap PARTITION itself needs to be enlarged -- if that is 
safely possible (and there is no example in the article suggesting this) 
or a swap PARTITION needs to be created from (free) disk space which I 
take to mean unformatted free physical unused disk space just laying 
around for no reason at all. Most of the article deals with swap "file" 
creation and change.

I have gone over the article many times and I do not read anything about 
enlarging an existing swap PARTITION already in use by a live Ubuntu 

If I am wrong then cut and paste me the part of the article that deals 
with an existing swap PARTITION enlargement and I will read it again.

Thanks -- Ted

More information about the ubuntu-users mailing list