[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hibernation



>All you need is a FAT filesystem of sufficient size to hold the hibernate
>volume.  It does not need to have a working copy of DOS, or anything else
>on it.  My 96 Mb box uses a little over 99 M for its hibernate volume,
>which shows up (if you look at it via DOS, or mount it up) as a hidden file.
>In theory one could hibernate while doing something interested, then awaken
>and look at the dump, but I've never actually looked that deeply.  (I'm
>a userland type myself.)

One thing to keep in mind is that passwords etc will reside in the dump. 
Even passwords that normally can't get put in swap space (such as a mount
password for an encrypted file system) will end up in hibernation.

>What I do not know, because I set it up correctly early on, is whether it
>needs to be the first partition, or whether you can just use ext2resize
>and sacrifice a scrap of your /tmp volume to it.

For Thinkpad's you use a program PS2.EXE to create it.  This program runs
under DOS and takes a parameter "C:" or "D:".  The limitation is that it has
to be a DOS visible partition (which effectively restricts you to the first
partition).

>>        However, Tobias Bachmor <bachmor@cs.concordia.ca> reported the
>>existence of a "hibernation feature" for the kernel. I am using this
>
>I have not tried this; not sure it's worth getting a mere 100 MB back.
>The question is whether this can add full hibernation to older laptops
>which only did suspend?  That'd be cool.

If you want to save 100M of disk space then you could have the same disk area
used for hibernation and swap space.  At hibernation time you could have the
suspend script do "swapoff /dev/hda1 ; gzip -d < /boot/hib.gz > /dev/hda1"
where hib.gz is an archive of the part of the /dev/hda1 device containing FAT
and the root directory (should only be a few K when gzipped).
Then at resume time you do "mkswap /dev/hda1 ; swapon /dev/hda1".

People used this trick to share a swap space between OS/2 and Linux when
dual-booting so there's no reason for it not to work.

-- 
Electronic information tampers with your soul.


Reply to: