[wplug] Hibernating Fedora Core 3

Bill Moran wmoran at potentialtech.com
Mon Feb 28 13:46:55 EST 2005


Any chance you're going to be at the Installfest in March?  It'd be nice
to have someone handy who's done this ...

Either way, thanks for the info!

"Scott Husek" <shusek-wplug at husek.com> wrote:
> 
> This recipe worked for FC3 on my desktop (APM), which I then applied to my
> wife's FC3 laptop (ACPI).  However, it completely disregards the ACPI
> support in the kernel, so you might not be interested in this.  It's the
> swsusp2 stuff from sourceforge.  It takes her laptop about 30 seconds to
> go down, and the same to come up.  On the plus side, the only glitch she's
> noticed thus far is that the USB card reader has "issues" sometimes.  I
> told her to just reboot when that happens.  She liked the simplicity of
> that, and I liked not having to troubleshoot it anymore.  Anyway, here's
> my notes (typos and all) from when I installed it:
> 
> ########################################################################
> ### swsusp2 (hibernate) install/config
> ########################################################################
> cd /usr/local/src
> mkdir swsusp2_stuff
> cd swsusp2_stuff
> # get kernel src
> ncftpget
> ftp://redhat.secsup.org/pub/linux/redhat/fedora/core/3/SRPMS/kernel-2.6.9-1.667.src.rpm
> # get swsusp2 tarball
> wget
> http://download.berlios.de/softwaresuspend/software-suspend-2.1.5-for-2.6.9.tar.bz2
> # install the kernel source
> rpm -ivh kernel-2.6.9-1.667.src.rpm
> # prep the kernel source
> rpmbuild -bp --target=i686 /usr/src/redhat/SPECS/kernel-2.6.spec
> #
> # unpack the swsusp2 tarball
> tar xjf software-suspend-2.1.5-for-2.6.9.tar.bz2
> # get the extra patches that make this work on Fedora's kernel source
> cd software-suspend-2.1.5-for-2.6.9
> wget
> http://softwaresuspend.berlios.de/fedora/010-2.6.9-fc3-1.667-to-2.1.5-pre
> wget
> http://softwaresuspend.berlios.de/fedora/990-2.6.9-fc3-1.667-to-2.1.5-post
> # apply the swsusp2 patches to the Fedora kernel source
> cd /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/
> /usr/local/src/swsusp2_stuff/software-suspend-2.1.5-for-2.6.9/apply
> #
> # remove "CONFIG_X86_4G" from the .config file
> emacs /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/.config
> #
> # enable some crap in the kernel
> make menuconfig
> # Power management options -->
> #  enable swsusp2 crap:
> #    Swap Writer
> #    LZF image compression
> #    Text mode console support
> # Under "Device Drivers" --> "Character devices"
> #   make "/dev/nvram support" a "Y", not an "M"
> #
> # edit the Makefile and change the kernel's name extention to "-swsusp2"
> emacs Makefile
> # compile the new kernel
> make && make modules_install && make install
> #
> # edit grub
> emacs /etc/grub.conf
> # add "resume2=swap:/dev/hda2" to the kernel line
> # then copy it and add this to it "noresume2"
> #
> # fix the initrd file created when compiling the kernel
> cd /usr/local/src/swsusp2_stuff
> mkdir myinitrd
> cd myinitrd
> gzip -dc < /boot/initrd-2.6.9-swsusp2.img | cpio -i
> cp /boot/initrd-2.6.9-swsusp2.img /boot/initrd-2.6.9-swsusp2.img.orig
> # edit init by adding:
> #    echo > /proc/software_suspend/do_resume
> # near the middle of the script (after unmounting /sys, but before
> mounting root)
> emacs init
> find . | cpio -o -c | gzip -9 > /boot/initrd-2.6.9-swsusp2.img
> #
> # download and configure the hibernate script
> cd /usr/local/src/swsusp2_stuff
> wget http://download.berlios.de/softwaresuspend/hibernate-1.02-1.i386.rpm
> rpm -Uvh hibernate-1.02-1.i386.rpm
> emacs /etc/hibernate/hibernate.conf
> ########################################################################
> 
> If anyone wants, I can post the hibernate.conf file I'm using too.
> 
> Since this actually shuts the computer off, to resume you simply boot it
> up.  It should detect the suspend image in the swap space and pickup where
> you left off.
> 
> As much as I'd love to use ACPI for the laptop, it simply wasn't working
> for me.  However, I've been quite happy with this setup, because my wife
> has been quite happy with this setup.  ;)
> 
> Oh, if you use yum, don't forget to add this to yum.conf:
> exclude=kernel*
> 
> -Scott
> 
> >
> > Hey all.
> >
> > I just got a new workstation at work, and I'm running FC3 on it (more on
> > that later)
> >
> > Since it's a newer desktop, it's got all the various ACPI stuff
> > available.  Since I'm kind of a tree hugger, I'd like to figure out how
> > to tell the system to hibernate, so I can save precious electricity
> > while I'm sleeping or otherwise not computing.
> >
> > My web searches have resulted in HOWTOs involving patching the kernel
> > and lots of people complaining that hibernation doesn't work correctly
> > on their system.  I'm hoping someone has first-hand experience with this
> > and can point me to a reliable explanation on how to accomplish this
> > without problems.
> >
> > Also, on our laptop (running FreeBSD) opening and closing the cover
> > causes the OS to go into and out of hibernation (very cool) but since
> > this desktop doesn't have a cover, I want to make sure I can wake it
> > back up before I hibernate it - will hitting a key on the keyboard work?
> >
> > For those who know me and are shocked that I'm using FC3 as my desktop,
> > I'm not.  I'm using FC3 as a platform to run VMWare, and inside VMWare
> > is my FreeBSD desktop.  This makes life grand as it means I also have
> > Windows on this machine, and I don't have to reboot.  Very spiffy.
> >
> > --
> > Bill Moran
> > Potential Technologies
> > http://www.potentialtech.com
> > _______________________________________________
> > wplug mailing list
> > wplug at wplug.org
> > http://www.wplug.org/mailman/listinfo/wplug
> 
> 
> 
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug


-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com


More information about the wplug mailing list