hibernate grub bug

If none of the more specific forums is the right place to ask

hibernate grub bug

Postby rpm13 » 2010-10-02 06:12

In my other thread I asked about a problem with hibernate.

Well evidently the problem is that grub.cfg is not setup correctly

If I change the line
Code: Select all
linux   /vmlinuz-2.6.32-5-686 root=UUID=cfd49341-b938-4fe5-94f0-b37233b0f854  ro quiet


to

Code: Select all
linux   /vmlinuz-2.6.32-5-686 root=UUID=cfd49341-b938-4fe5-94f0-b37233b0f854 resume=/dev/sda12 ro


ie add resume and remove quiet then hibernate works. So its not a hibernate/hardware problem but a grub setup problem.

Is this not a bug? How to report it?

My problem is that the next time the kernel is updated this will get knocked off.
rpm13
 
Posts: 79
Joined: 2007-05-08 17:15

Re: hibernate grub bug

Postby pabs3 » 2010-10-09 07:03

If you are using initramfs-tools (most people will be) to generate your initrd then you probably need to add/edit this file:

Code: Select all
/etc/initramfs-tools/conf.d/resume


Normally when initramfs-tools is installed it will generate this file itself.

On my system the contents look like this:

Code: Select all
RESUME=/dev/mapper/chianamo-swap


I'm using full-disk encryption and LVM. I imagine you are not using those, so you probably want something like this:

Code: Select all
RESUME=/dev/sda12


If your swap device has a label, you probably want something like this instead:

Code: Select all
RESUME=LABEL=myswap


If your swap device has a UUID, you probably want something like this:

Code: Select all
RESUME=UUID=3c7059e0-d373-11df-bd3b-0800200c9a66


You can find these labels and UUIDs by looking in /dev/disk/by-label/ and /dev/disk/by-uuid. The advantage of using labels or UUIDs is that they do not change when adding/removing disks to/from your system. Of course if you move to a new disk with a new filesystem on it, then you will need to reconfigure the file.

Once you have updated your resume device, then you will need to run the following as root:

Code: Select all
update-initramfs -k all -u
User avatar
pabs3
Debian Developer
Debian Developer
 
Posts: 13
Joined: 2008-01-03 15:15
Location: Australia

Re: hibernate grub bug

Postby rpm13 » 2010-10-09 09:43

pabs3 wrote:If you are using initramfs-tools (most people will be) to generate your initrd then you probably need to add/edit this file:

Code: Select all
/etc/initramfs-tools/conf.d/resume


Normally when initramfs-tools is installed it will generate this file itself.
:
:
...so you probably want something like this:

Code: Select all
RESUME=/dev/sda12



Hey Thanks Paul - thats a load of info!

Well! My file has /dev/hda12 (not sda)
So this is a bug of something when upgrading from hd-s to sd-s -- initramfs? grub?

How do I find out what?
rpm13
 
Posts: 79
Joined: 2007-05-08 17:15

Re: hibernate grub bug

Postby pabs3 » 2010-10-09 10:19

I couldn't remember which package was responsible for changing from hda to sda in various files. I remembered that one of the files it updates was /etc/fstab. By searching for fstab in /var/lib/dpkg/info/ I found that linux-base is the package responsible for this and /var/lib/dpkg/info/linux-base.postinst is the script that updates all the different files. I viewed the file and found that it does update the resume file. It is a very long script in a language I do not understand so I wasn't able to figure out the issue, but perhaps you can file a bug about this if it is not fixed after upgrading to the latest version of the package.
bye, pabs
User avatar
pabs3
Debian Developer
Debian Developer
 
Posts: 13
Joined: 2008-01-03 15:15
Location: Australia

Re: hibernate grub bug

Postby rpm13 » 2010-10-09 15:50

pabs3 wrote:I couldn't remember which package was responsible for changing from hda to sda in various files. I remembered that one of the files it updates was /etc/fstab. By searching for fstab in /var/lib/dpkg/info/ I found that linux-base is the package responsible for this and /var/lib/dpkg/info/linux-base.postinst is the script that updates all the different files. I viewed the file and found that it does update the resume file. It is a very long script in a language I do not understand so I wasn't able to figure out the issue, but perhaps you can file a bug about this if it is not fixed after upgrading to the latest version of the package.


Done! My first bug-report -- hope its not buggy!
rpm13
 
Posts: 79
Joined: 2007-05-08 17:15

Re: hibernate grub bug

Postby llivv » 2010-10-09 17:08

@ pabs3 thanks for the hints !!!

@ rpm13
I see your now running kernel 2.6.32-5-686 ( uname -r ) and I have read both this post and the previous post linked in your OP above as well as the bug report....

What kernel were you using before you upgraded?

If you can still boot to the old kernel you might want to try
booting up using that older kernel
change the setting in /etc/initramfs-tools/conf.d/resume resume=/dev/hda12
purge the new kernel aptitude purge linux-image-2.6.32-5-686
reboot and reinstall the new kernel
and double check if /etc/initramfs-tools/conf.d/resume resume=/dev/hda12 changed to /dev/sda12

The kernel team is working very diligently to add as much functionality to 2.6.32-5 series for the squeeze release....
Coincidentally, a few months ago a group requested the kernel boot message regrading resume be removed stating IIRC - it was confusing and/or non-productive... and they got their wish....
in the kitchen with Julia ....
[...]
Get on the D bus to B Can ....
[...]
User avatar
llivv
 
Posts: 5444
Joined: 2007-02-14 18:10
Location: morrison hotel

Re: hibernate grub bug

Postby julian516 » 2010-10-09 20:03

My thanks to everyone for a post that helped me! I learned a good bit I did not know. Very much appreciated.
julian516
 
Posts: 294
Joined: 2010-03-18 20:10
Location: Loveland, CO

Re: hibernate grub bug

Postby rpm13 » 2010-10-10 01:52

llivv wrote:What kernel were you using before you upgraded?

If you can still boot to the old kernel you might want to try
booting up using that older kernel
change the setting in /etc/initramfs-tools/conf.d/resume resume=/dev/hda12
purge the new kernel aptitude purge linux-image-2.6.32-5-686
reboot and reinstall the new kernel
and double check if /etc/initramfs-tools/conf.d/resume resume=/dev/hda12 changed to /dev/sda12


I dont have the old kernel... Sorry! Actually I never used hibernate before.
I just happened to click that by mistake recently and discovered it did not work -- thought I'd dig in and find out. So I dont know from when its not working

The kernel team is working very diligently to add as much functionality to 2.6.32-5 series for the squeeze release....
Coincidentally, a few months ago a group requested the kernel boot message regrading resume be removed stating IIRC - it was confusing and/or non-productive... and they got their wish....


As t tends to infinity linux tends to windows I suppose :lol:
rpm13
 
Posts: 79
Joined: 2007-05-08 17:15


Return to General Questions

Who is online

Users browsing this forum: golinux, Randicus and 11 guests

fashionable