hibernate with swap+swapfile?

Marius Gedminas marius at pov.lt
Mon Mar 28 17:25:07 UTC 2011


On Mon, Mar 28, 2011 at 04:21:34PM +0200, Franz Waldmüller wrote:
> Am 2011-03-28 15:16, schrieb Karl Larsen:
> >On 03/28/2011 07:07 AM, Franz Waldmüller wrote:
> [snip]
> >>i am going to upgrade my RAM this week from 4 to 12 GB. Since my swap
> >>partition is only 4,5GB in size I will have to increase the swap space
> >>because I want to use the hibernate on this machine.
> >>
> >>I would like to know, if creating a swapfile of around 8GB and adding
> >>it to fstab is all I need to do?
> >>
> >>Will ubuntu use both, the swap partition and the swap file?
...
> Thank you for your help. When a system hibernates Linux stores the
> content of the RAM in the swap space or in a swap file. If you want
> to hibernate you need some sort of swap regardless if it is used
> during normal operation.

To the best of my knowledge, hibernation requires a single swap
partition and cannot make use of swap files.

Also note that if you reformat a swap partition with mkswap, you'll need
to write the new UUID to /etc/initramfs-tools/conf.d/resume and
regenerate your initramfs image with

  dpkg-reconfigure linux-image-$(uname -r)

or you won't be able to resume from hibernation.

Marius Gedminas
-- 
There are a lotta computer languages out there doing drugs.
		-- Larry Wall
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20110328/c1169e2f/attachment.sig>


More information about the ubuntu-users mailing list