LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   HIbernation not working (https://www.linuxquestions.org/questions/slackware-14/hibernation-not-working-4175451670/)

daf1kpp 02-25-2013 04:23 PM

HIbernation not working
 
Hi, I have been doing like it's writen right here http://docs.slackware.com/howtos:sla...in:hibernation

All my partitions are primary so as far as I understod I should only add
append=" resume=/dev/sda1"
to my lilo.conf file.

My /etc/lilo.conf look like this after modification:

Quote:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=0"
boot = /dev/sda

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used. We don't specify it here, as there's just one column.
bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
bmp-timer = 65,27,0,255

# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
#message = /boot/boot_message.txt

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# Normal VGA console
vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
#vga=791
# VESA framebuffer console @ 1024x768x32k
#vga=790
# VESA framebuffer console @ 1024x768x256
#vga=773
# VESA framebuffer console @ 800x600x64k
#vga=788
# VESA framebuffer console @ 800x600x32k
#vga=787
# VESA framebuffer console @ 800x600x256
#vga=771
# VESA framebuffer console @ 640x480x64k
#vga=785
# VESA framebuffer console @ 640x480x32k
#vga=784
# VESA framebuffer console @ 640x480x256
#vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda2
label = Slack
append=" resume=/dev/sda1"
read-only
# Linux bootable partition config ends
I have added only the line like:
Quote:

append=" resume=/dev/sda1"
My swapPartition > my ram size.

My partitions:
/dev/sda1 ; primary; swap
/dev/sda2 ; primary; ext4, root ("/")
/dev/sda3 ; primary; ext4, ("/home")


I use KDE and turn on hibernation by clicking "HIBERNATE" in menu.
After I want to resume i click power on button, LILO starts I choose my linux system and click enter, slackware boots up and its like new session - not resuming my old one.

Why is it happening like that ?

Bazzaah 02-25-2013 04:33 PM

You don't want any spaces, like this;

Code:

append="resume=/dev/sda1"
don't forget to run 'lilo' after any changes.

zasavage 02-25-2013 04:38 PM

This is my lilo.conf

I agree with Bazzaah that you must remove the leading space
I use append="quit fastboot resume=/dev/sda3"

# Linux bootable partition config begins
image = /boot/vmlinuz-generic-3.7.1
initrd = /boot/initrd.gz
root = /dev/sda1
label = Slackware
read-only
append="quit fastboot resume=/dev/sda3"
# Linux bootable partition config ends

Regards
lawrence

daf1kpp 02-25-2013 04:53 PM

Quote:

Originally Posted by Bazzaah (Post 4899586)
You don't want any spaces, like this;

Code:

append="resume=/dev/sda1"
don't forget to run 'lilo' after any changes.

What do you mean by "run 'lilo' after any changes" ? Do you mean to restart linux first to let lilo gain new configuration and then do hibernate ?


Thank you and @zasavage for anwsering my question.

Bazzaah 02-25-2013 05:01 PM

Quote:

Originally Posted by daf1kpp (Post 4899600)
What do you mean by "run 'lilo' after any changes" ? Do you mean to restart linux first to let lilo gain new configuration and then do hibernate ?


Thank you and @zasavage for anwsering my question.

Sorry, I should have been a bit clearer. What I mean is that you need to run the command lilo as root so that lilo accepts the changes that you've made in lilo.conf.

Hope that helps you get the problem sorted!

TobiSGD 02-25-2013 05:02 PM

Quote:

Originally Posted by daf1kpp (Post 4899600)
What do you mean by "run 'lilo' after any changes" ? Do you mean to restart linux first to let lilo gain new configuration and then do hibernate ?

Any time you make a change to /etc/lilo.conf you have to run the command
Code:

lilo
as root afterwards to make the bootloader aware of the changes. After you have done that hibernate the system and wake it up again, it should work now, since I assume that not running lilo was the problem here.

yenn 02-25-2013 06:29 PM

Quote:

Originally Posted by Bazzaah (Post 4899586)
You don't want any spaces, like this;

Code:

append="resume=/dev/sda1"

Thanks for noticing. I wrote that article on SlackDocs, but never tried 'simple' hibernating (I use full disk encryption with LVM) and I wasn't sure if the resume line is correct. Updating article right now.

gabytf 02-25-2013 08:20 PM

I have been trying to hibernate, this time works.
Thank you.

Edit: But i find that i am having problem if i put to "Sleep", it could't wake my monitor from sleep!!! what's the remedy?

zasavage 02-26-2013 03:36 PM

@gabytf

I also had a similar problem with suspend to disk working but sleep not !

I had to update my bios , and everything is ok now
I would be interested to know the motherboard you have ?

regards

Lawrence

gabytf 02-26-2013 07:46 PM

@ zasavage

i am with :

CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
Display: NVIDIA(R) GeForce(R) GT 640
Monitor: DELL IN2030M 20"W HD Monitor with LED

Thanks!

daf1kpp 02-28-2013 02:38 PM

Quote:

Originally Posted by yenn (Post 4899657)
Thanks for noticing. I wrote that article on SlackDocs, but never tried 'simple' hibernating (I use full disk encryption with LVM) and I wasn't sure if the resume line is correct. Updating article right now.

Is disk encryption and LVM connected ? By LVM you mean that you use extended partition, not primary, right ?

I want to use true crypt encryption too, how about LILO in this case ?

yenn 03-01-2013 06:48 AM

Quote:

Originally Posted by daf1kpp (Post 4901869)
Is disk encryption and LVM connected ? By LVM you mean that you use extended partition, not primary, right ?

No, they are independent.

Linux LVM stands for Logical Volume Manager, don't confuse it with disk partitions. In LVM you use physical partition, it doesn't matter if primary or logical, as container in which you can create as many Logical Volumes (LV) as you want (and partition can store). Think of them as dynamic partitions, which can be created, resized, deleted, moved from one LVM container to another on the fly without touching partition table.

For example: If you are running out of space on home LV, just expand it and you can continue working in virtually no time. In case of physical partitions, you would have to shutdown OS, recreate/modify entire partition table and hope that nothing broke, data remained intact, etc.

Of course you can just encrypt you physical partitions, but basic idea behind full disk encryption is to hide as many information as possible. If you have several encrypted partitions, anyone can guest your system layout (and therefore it's purpose) just by looking at partition table and sizes of these partitions. With LVM only visible information is that you have one small partition (for /boot) and rest of disk encrypted on second partition.

Sure, one would guess that since there is linux kernel on first partition, you probably have linux OS on the second partition, but who really knows? There could be anything.

If you are interested in this setup, read README_CRYPT.TXT - especially part Combining LUKS and LVM.

Quote:

Originally Posted by daf1kpp (Post 4901869)
I want to use true crypt encryption too, how about LILO in this case ?

Do you mean TrueCrypt, disk encryption software, or full disk encryption with linux tools? If the first I can't help you, because I never tried TrueCrypt and I suggest to start another thread. If the second, I would point you to SlackDocs http://docs.slackware.com/howtos:sla...in:hibernation. If anything is not clear or something is missing, feel free to ask.


All times are GMT -5. The time now is 03:56 PM.