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

Bug#725275: initramfs-tools: hooks/resume problems



Hi.

On Sat, Oct 05, 2013 at 09:27:12AM +0530, Kapil Hari Paranjape wrote:
> 
> On Sat, 05 Oct 2013, Kapil Hari Paranjape wrote:
> > The reason for this bug is a typo in /usr/share/initramfs/hooks/resume.
> 
> Looking into this a bit further, I wondered why this typo should cause a
> problem. After all, the rest of this script generates a
> conf/conf.d/resume file containing what should be the correct resume
> device.
> 
> However, what it generates is an entry like:
> 
> RESUME="UUID=ZyyyyZ-ZZyy-yZZy-yZZy-Zyyy-ZyZy-yyyyyZ"
> 
> This may work fine if the swap device is not on LVM. If it is ...
> 
> The problem is that "scripts/local-top/lvm2" cannot figure out the
> volume group to activate in order to make the device accessible. (Or
> even the fact that this _is_ an LVM device!)
> 
> Some more script-fu is required to check whether the resume device is
> of the form "/dev/dm-xxx" and in that case one needs to find its "name" by
> listing "/dev/mapper/". That name needs to be used in order to get lvm2
> to activate the volume group or logical volume.
> 

Interesting. Thanks for these details.

I've tried and change the "resume device" in /etc/uswsusp.conf, to use a path in the form /dev/mapper/VG-swap, and now have :

# grep -i resume /etc/uswsusp.conf /etc/initramfs-tools/conf.d/resume
/etc/uswsusp.conf:resume device = /dev/mapper/main-swap
/etc/initramfs-tools/conf.d/resume:RESUME=/dev/mapper/main-swap

And guess what ? ... This works, now. Boot proceeds normally, and eventually resumes when I hibernated :-)

So my guess is that uswsusp may need to use the /dev/mapper/VG-swap form (will follow-up to #724275).

Maybe others don't have uswsusp installed, so YMMV.

Hope this helps.

Best regards,
-- 
Olivier BERGER 
http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut Mines-Telecom, Telecom SudParis, Evry (France)


Reply to: