Bug#507501: grub-common: silent fail when devices.map is wrong (patch)

Adrian Bridgett adrian at smop.co.uk
Mon Dec 1 22:09:57 UTC 2008


Package: grub
Version: 0.97-47
Severity: minor

Severity set to minor since it's an unusual configuration and I've
just apt-get upgraded to lenny.

Basically update-grub fails (silently) so adding/removing kernels also
fails.

There are a few problems here:

a) Silent failure
ripley:/boot/grub# update-grub 
Searching for GRUB installation directory ... found: /boot/grub
ripley:/boot/grub# echo $?
1
It should really warn here!  grub-probe has stderr sent to /dev/null :-(

b) The reason it is failing is since this box was upgraded a while ago
but grub wasn't updated - and so /boot/grub/device.map is outdated.
It would be nice if it caught this error and suggested a fix. Even
better if it tried the fix.

The attached patch does both of these things.  NB: I didn't keep the
original file so the two original redirection lines might have
whitespace differences.

This may also help with #499176.

Adrian
-- 
Email: adrian at smop.co.uk  -*-  GPG key available on public key servers
Debian GNU/Linux - the maintainable distribution   -*-  www.debian.org





More information about the Pkg-grub-devel mailing list