tags 501306 + patch thanks Hello,
here's the patch that I announced sooner. I tested here by changing device.map to not reference my /boot and / partitions. Running udpdate-grub still works but it displays one line more saying that device.map got regenerated. I don't think that find_device() needs any change. If you want me to upload this as NMU, please say so, otherwise I'll let you handle it. Cheers, -- Raphaël Hertzog Le best-seller français mis à jour pour Debian Etch : http://www.ouaza.com/livre/admin-debian/
diff -u grub-0.97/debian/update-grub grub-0.97/debian/update-grub --- grub-0.97/debian/update-grub +++ grub-0.97/debian/update-grub @@ -152,7 +152,11 @@ if ! test -e ${device_map} ; then echo quit | grub --batch --no-floppy --device-map=${device_map} > /dev/null fi - GRUB_LEGACY_0_BASED_PARTITIONS=1 grub-probe --device-map=${device_map} -t drive -d "$1" 2> /dev/null + GRUB_LEGACY_0_BASED_PARTITIONS=1 grub-probe --device-map=${device_map} -t drive -d "$1" 2> /dev/null || { + echo "Can't find drive for $1, will regenerate ${device_map} and try again." >&2 + grub-mkdevicemap --device-map=${device_map} --no-floppy >/dev/null 2>&1 || true + GRUB_LEGACY_0_BASED_PARTITIONS=1 grub-probe --device-map=${device_map} -t drive -d "$1" + } } # Usage: convert_default os_device diff -u grub-0.97/debian/changelog grub-0.97/debian/changelog --- grub-0.97/debian/changelog +++ grub-0.97/debian/changelog @@ -1,3 +1,13 @@ +grub (0.97-47.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Regenerate /boot/grub/device.map if update-grub is about to fail due to a + grub-probe failure that is likely caused by an invalid device.map. Do not + hide the error on the second try to let a chance to the user to diagnose + the real problem. Closes: #501306 + + -- Raphael Hertzog <[EMAIL PROTECTED]> Tue, 28 Oct 2008 11:23:27 +0100 + grub (0.97-47) unstable; urgency=high * update-grub: Send grub-probe stderr output to /dev/null. (Closes: #495909)