[ltp] lphdisk.c for hibernation files

Tom Grydeland linux-thinkpad@linux-thinkpad.org
Tue, 17 Jun 2003 11:58:23 +0200 (MET DST)


On Tue, 17 Jun 2003, Tino Keitel wrote:

> Hi folks,
> 
> some moths ago I found a lphdisk.c that was able to create a
> hibernation file, not just a hibernation partition, so it should work
> on ThinkPads. The .c file was behind a link in a collection of several
> small tools on a private home page. It does not seem to be related to
> the lphdisk from <http://www.procyon.com/~pda/lphdisk/>. Any hints?

I used a program called tphdisk for my T30.  I can't find the source at
the moment, but here is its help text:

---------------------------------------
Usage: tphdisk <size in MB>

written by Andrew Tridgell <tridge@samba.org>

This program writes a 'save2dsk.bin' hibernation file to stdout. To
use it you should do something like this:

1) create a type 16 (Hidden FAT16) partition on your laptop
2) format the partition with 'mkdosfs'
3) mount the partition as VFAT
4) create the 'save2dsk.bin' file on the partition using something like
      tphdisk 280 > save2dsk.bin
5) Do a full reboot

The only parameter is the size in megabytes of the save file. This
needs to be at least as big as your main memory + video memory, but you
can make it larger if you want to.

You should also be able to use this to create a hibernation partition
by directing the output to the right device (eg. /dev/hdaX) and
setting the partition type to A0.  I haven't tried this as my thinkpad
doesn't seem to support hibernation partitions.
---------------------------------------

> Tino

Hope that helps!

-- 
//Tom Grydeland <Tom.Grydeland@phys.uit.no>   plain text e-mail preferred

(EN) http://www.goldmark.org/netrants/no-word/attach.html
(NO) http://www.efn.no/brave-new-word.html