Describe DistroAndHardwareSetup/OpenSuSE10.3 here.

Overview

Once you've compiled and installed the patched kernel you will need to complete the steps below to be able to resume a suspended machine

  1. Edit your /lib/mkinitrd/scripts/boot-resume.userspace.sh file to include the functions below
  2. Make a new initrd

New boot-resume.userspace.sh file

The OpenSuSE 10.3 initrd boot setup is pretty twisted, in that it's broken apart into a bunch of little pieces that makes it hard to find the right parts. What I decided to do was dump the TuxOnIce stuff into the user space script (instead of trying to make a new script and get it into the proper sequence in the boot process).

First you'll need to add the function below to the script.

discover_tuxonice_resume() {
  echo "Looking for sysfs controls for TuxOnIce"
  if [ ! -f /sys/power/tuxonice/resume ]; then
    echo "TuxOnIce sysfs control interface not found... skipping"
  else
    # This is where we should check for a image to resume, but not sure how to do that, so, just try to resume instead
    echo "Found TuxOnIce control interface, attempting to resume..."
    echo "1" > /sys/power/tuxonice/do_resume
  fi
}

Then you'll you need to call the function, as shown below. Note this is the same file.

# Check for a resume device
discover_user_resume
discover_tuxonice_resume

Making a new initrd

The command below will make a new initrd for you. You'll need to do this as root (best not as an sudo).

mkinitrd -k /boot/<name of your new kernel image> -i /boot/<name of your new initrd>

Checking it all

For those who want to make sure this actually worked, before you try to boot your system, you can extract the initrd with the command below. Then look and see that the updated resume script was actually included. It should be located in the boot directory of the extracted file-system.

mkdir tmp
cd tmp
gunzip -c /boot/<name of your new initrd> | cpio -idmv

None: DistroAndHardwareSetup/OpenSuSE10.3 (last edited 2007-12-18 05:15:06 by LincolnLavoie)