Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

hibernate grub bug

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
rpm13
Posts: 93
Joined: 2007-05-08 17:15

hibernate grub bug

#1 Post by rpm13 »

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.

User avatar
pabs3
Posts: 14
Joined: 2008-01-03 15:15
Location: Australia

Re: hibernate grub bug

#2 Post by pabs3 »

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

rpm13
Posts: 93
Joined: 2007-05-08 17:15

Re: hibernate grub bug

#3 Post by rpm13 »

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?

User avatar
pabs3
Posts: 14
Joined: 2008-01-03 15:15
Location: Australia

Re: hibernate grub bug

#4 Post by pabs3 »

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

rpm13
Posts: 93
Joined: 2007-05-08 17:15

Re: hibernate grub bug

#5 Post by rpm13 »

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!

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

#6 Post by llivv »

.
Last edited by llivv on 2019-04-27 15:37, edited 1 time in total.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.

julian516
Posts: 311
Joined: 2010-03-18 20:10
Location: Loveland, CO

Re: hibernate grub bug

#7 Post by julian516 »

My thanks to everyone for a post that helped me! I learned a good bit I did not know. Very much appreciated.

rpm13
Posts: 93
Joined: 2007-05-08 17:15

Re: hibernate grub bug

#8 Post by rpm13 »

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:

Post Reply