2005年5月30日

Finally, Hibernation.

- Fedora core 3 with latest kernel rpm. (2.6.11-1.27_FC3 now)
- My Protégé 2000 laptop.

FC3 does not enable the experimental "software suspend (swsusp)" feature for kernel 2.6.x. So I decided to take it into my own hands.
  1. Download the latest kernel source rpm from fedora updates.

  2. Install the kernel source rpm. (into /usr/src/redhat, usually.)

  3. Modify SOURCES/kernel-(whatever)-i686.config, add the following:

    CONFIG_SOFTWARE_SUSPEND=y
    CONFIG_PM_STD_PARTITION=(your swap partition. /dev/hda3 in my case)

  4. Modify SPECS/kernel-2.6.spec, modify %define buildsmp 1 to %define buildsmp 0 to save some time.

  5. $ rpmbuild --target=i686-pc-linux -bb SPECS/kernel-2.6.spec

  6. Install the new rpm.

How to hibernate:

$ echo -n "shutdown" > /sys/power/disk
$ echo -n "disk" > /sys/power/state

If your swap partition is in different place with the one compiled into kernel, append resume=/dev/xxx to kernel paramters.

沒有留言 :

張貼留言