Why does nothing rhyme with Linux???

Friday, December 16, 2005

HOWTO: Hibernation on Linux (Suspend2)

I have a guide up if you want to learn how to Hibernate in Linux.

You can leave comments for it here.

17 Comments:

  • At 12/16/2005 05:26:00 PM, Blogger Jon said…

    Looks great - lots of good stuff in there that would have taken me forever to figure out.

    When you say 'Ubuntu users do this' throughout the document, does that include us Kubuntu users? I *think* the guts are the same, just KDE instead of Gnome, so I think the answer is 'yes', but I'm not sure.

    Thanks again - big help :)

     
  • At 12/16/2005 06:04:00 PM, Blogger Justin said…

    Yes, that includes Kubuntu. They both have the same inner-workings.

     
  • At 12/17/2005 01:45:00 AM, Blogger Jon said…

    OK, so I started mucking around :)

    Step 7 - The cp /boot/`uname -r` .config directory.

    My echo `uname -r` shows 2.6.12-9-386.

    Here's the contents of my boot directory:

    drwxr-xr-x 3 root root 296 2005-12-15 18:04 .
    drwxr-xr-x 23 root root 624 2005-12-15 10:55 ..
    -rw-r--r-- 1 root root 239770 2005-10-10 07:16 abi-2.6.12-9-386
    -rw-r--r-- 1 root root 64135 2005-10-10 06:12 config-2.6.12-9-386
    drwxr-xr-x 2 root root 384 2005-12-16 17:03 grub
    -rw-r--r-- 1 root root 4946776 2005-12-15 10:54 initrd.img-2.6.12-9-386
    -rw-r--r-- 1 root root 94664 2005-06-30 09:49 memtest86+.bin
    -rw-r--r-- 1 root root 897159 2005-10-10 07:16 System.map-2.6.12-9-386
    -rw-r--r-- 1 root root 1206555 2005-10-10 07:16 vmlinuz-2.6.12-9-386

    The only folder I seem to have is my grub folder.

    I've looked through the directions since I did them pretty quick, but can't see where I went wrong. Any ideas?

    Thanks!

    J

     
  • At 12/17/2005 10:54:00 AM, Blogger Justin said…

    Problem fixed. I forgot to put a little 'config-' in front of it.

    Thanks for pointing that out.

     
  • At 12/17/2005 11:12:00 AM, Blogger Jon said…

    Ahh..cool. Works now. Thanks!

    On wth my newbie journey...

    Step 10: fdisk =l | grep 'swap' returns nothing. Just brings me back to the bash prompt.

    I'm not a swap expert, but it seems something I'm not used to is going on. My swap partition is a 1.5MB hda2 partition. I know I set is as swap during the install, and I have a Superkaramba sensor that sees that partition as swap. However, doing a df -h doesn't show my swap partition:

    Filesystem Size Used Avail Use% Mounted on
    /dev/hda3 8.9G 2.2G 6.7G 25% /
    tmpfs 220M 0 220M 0% /dev/shm
    tmpfs 220M 13M 208M 6% /lib/modules/2.6.12-9-386/volatile
    /dev/hda1 99M 86M 7.7M 92% /media/hda1
    /dev/hda4 18G 12G 6.2G 66% /media/hda4

    Any ideas how to get around that?

    Thanks!

     
  • At 12/17/2005 11:23:00 AM, Blogger Justin said…

    Ok... first of all, it's fdisk -l, not fdisk =l. Make sure you typed it in right.

    If you know your swap is /dev/hda2, that should work. But when you compile the kernel, make sure you add the filewriter support just in case. This will make it write to a file on a normal partition rather than swap.

     
  • At 12/17/2005 11:32:00 AM, Blogger Justin said…

    Just do a plain fdisk -l. That will list your swap. df -h doesn't show the swap on my system, either.

     
  • At 12/17/2005 11:34:00 AM, Blogger Justin said…

    (oh, and make sure you're root. Doing it as a normal user doesn't do anything)

     
  • At 12/17/2005 12:04:00 PM, Blogger Jon said…

    Oops..yeah the = was a typo.

    Crap man..it WAS the root thing. I'm still getting used to sudo'ing everything and I forgot. However, in the case of fdisk, it doesn't throw the usual 'permission denied' type of non-root error, it just returns to the prompt.

    Stupid me....

    I'm compiling!

    Thanks :)

     
  • At 12/17/2005 01:32:00 PM, Blogger Jon said…

    Ahhh Kernel Panic. My old friend...

    Kernel panic - now syncing: VFS: Unable to mount root fs on unknown-block(3,3).

    I've tried all the solutions I can find on the Ubuntu forums. I know I have the right root= option and my IDE chipset (SiS 5513) is listed and selected in the menuconfig.

    I don't know where to go from here. Any ideas?

    Are you sorry you wrote this yet?

    :)

     
  • At 12/17/2005 03:40:00 PM, Blogger Justin said…

    Could you post the 'kernel' boot line in your Grub menu.lst file?

     
  • At 12/17/2005 05:39:00 PM, Blogger Jon said…

    Sure...here:

    kernel /boot/vmlinuz root=/dev/hda3 ro quiet splash resume2=swap:/dev/hda2

    In the line before the kernel panic I get something like 'Suspend2 signature found' or something so I think the resume2= part is set up OK.

    hda3 IS my system paritition, all of the other entries in GRUB point to it.

    For the record, I'm aware that this problem is likely to do with my IDE setup in my menuconfig and not anything to do with your HOWTO.

    Confuzzled...

    Thanks!

     
  • At 12/17/2005 06:36:00 PM, Blogger Jon said…

    Got it!

    My root partition is reiserfs and I didn't chose that in menuconfig. So I ended up with a kernel that had no ability to mount the root filesystem.

    Now to suspend!

     
  • At 12/17/2005 06:42:00 PM, Blogger Jon said…

    Sigh...no go.

    It writes the pages and then stack dumps on me.

    Crap...so close.

     
  • At 12/17/2005 10:49:00 PM, Blogger Justin said…

    By any chance, are you using the proprietary NVidia drivers (I noticed you have a Dell laptop, mine has an NVidia card)? If you are, try using the open source 'nv' driver. The proprietary version doesn't work with hibernation without a minor hack.

     
  • At 12/18/2005 11:57:00 AM, Blogger Jon said…

    No, an SiS chipset.

    I posted to the Suspend2 list with a screen cap so we'll see what happens.

    I'm pretty sure once whatever this is gets figured out that it will suspend, though. All of the other indicators look good.

    Thanks!

     
  • At 12/18/2005 01:56:00 PM, Blogger Jon said…

    I posted the HOWTO on New Linux User and I'll be mentioning it on this week's show.

    Thanks!

     

Post a Comment

<< Home