[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Suspend to disk?



On Fri, 2007-08-24 at 17:05 -0500, Nate Bargmann wrote:
> 
> Trying to suspend to disk with powersave -U results in a message that I
> need to add a 'resume=...' to the kernel commandline and reboot.

This is correct.  For this to work you need to add the following option
onto your kernel boot command line in /boot/grub/menu.lst (assuming
that's what you use to choose kernels :-)  E.g.:

	resume=/dev/hda5

Where you replace '/dev/hda5/' with whatever partition *you* use for
swap.

For me, for example, the 'resume' appears in menu.lst on my own laptop
in the following two lines:

# defoptions=vga=0 resume=/dev/sda5 pci=assign-busses,routeirq
kernel          /boot/vmlinuz-2.6.22.1-hippy root=/dev/sda1 ro vga=0 resume=/dev/sda5 pci=assign-busses,routeirq


>   Then it advises to check the documentation which is rather mum and
> nowhere do I find the suggested SUSPEND2DISK_SKIP_RESUME_CHECK option
> so I can set it to "yes".

I'm not sure skipping the check would be ideal in any case.  If you want
to resume, you have to tell the booting kernel which partition contains
the image to resume from.

I guess that in friendlier world the suspend could write some
identifying string into the beginning of the partition it wrote to, so
that resume could just find it, but AFAIK it takes the simpler approach.


> So, I then tried the s2disk program from the uswsusp package and it
> suspended to the swap partition without complaint.  When I powered the
> machine back up using the same kernel as when I suspended it, it booted
> normally except that it couldn't find a swap signature on my swap
> partition.  Well, duh, my suspended image was there!  So, I would up
> doing a mkswap and swapon -a to restore it.

Indeed.  Because the kernel wasn't told to try and resume from that
partition.  All credit to "powersave -U" for checking you had a working
configuration before actually suspending, but I guess the documentation
is lacking.


I realise you've solved your problem in *other* ways now, but I thought
that this answer might also be useful and enlightening :-)

Cheers,
					Andrew McMillan.

-------------------------------------------------------------------------
Andrew @ Catalyst .Net .NZ  Ltd,  PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/            PHYS: Level 2, 150-154 Willis St
DDI: +64(4)803-2201      MOB: +64(272)DEBIAN      OFFICE: +64(4)499-2267
Facts do not cease to exist because they are ignored. -- Aldous Huxley,
                         "Proper Studies", 1927
-------------------------------------------------------------------------

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: