Next Previous Contents

6. Modular TuxOnIce

6.1 I get messages about the size of struct module not agreeing when the initrd tries to insert my suspend modules.

You built a new kernel and forgot the update the modules in the initrd.

6.2 The modules are installed fine but the swapwriter complains about not being able to access the suspend device.

Did you insert IDE/SCSI/USB modules prior to the suspend modules?

6.3 How do I update my running kernel modules without rebooting into a new kernel?

  1. Check release notes to ensure you don't need to install a new bzImage.
  2. Apply new patches to the kernel tree.
  3. make menuconfig modules modules_install
  4. Update your initrd. Sample script for updating /boot/mm.img (a gziped initrd with bootsplash concatenated) while running the matching kernel version:
    #!/bin/bash
    # Assumes /mnt/initrd exists and that modules are located in /lib.
    
    MOUNT=/boot/mm.img
    echo Updating $MOUNT.
    mv -f $MOUNT $MOUNT.gz
    gunzip $MOUNT.gz
    mount $MOUNT /mnt/initrd -o loop
    rm -f /mnt/initrd/lib/*
    cp -f /lib/modules/`uname -r`/kernel/kernel/power/* /mnt/initrd/lib/
    umount /mnt/initrd
    gzip $MOUNT
    splash -s -f /etc/bootsplash/themes/Mandrake-tux/config/bootsplash-1024x768.cfg >> $MOUNT.gz
    mv $MOUNT.gz $MOUNT
    
  5. Unload old modules:
    for NAME in `lsmod | grep suspend | awk '{print $1}'`; do rmmod $NAME; done
    
  6. Load new modules:
    modprobe toi_text; modprobe toi_swap; modprobe toi_lzf; modprobe toi_compression
    

6.4 How can I update my initrd (initramfs) on Fedora?

Edit the /init file of your initramfs as so:

  • Login as root
  • mkdir myinitrd
  • cd myinitrd
  • gzip -dc < /boot/initrd-your-version-here.img | cpio -i
  • edit init by adding echo 1 > /sys/power/suspend2/do_resume near the top of the script (after mounting /proc but before mounting any drives)
  • find . | cpio -o -c |gzip -9 > /boot/initrd-your-version-here.img
  • hibernate :)

6.5 How can I update my initrd on Debian?

See DebianInitrd on the wiki.


Next Previous Contents
Last updated: Mon, 25 May 2009 15:12:16 +0800

Frozen penguins image by darkmetal
and adapted by Nigel Cunningham
"Tuxsicle" artwork by Pierre-Philippe Coupard

Copyright © 2003-2005 Bernard B