update-grub fails on kernel install or remove
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gksu (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
grub (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: grub
I have my shell configured with "set -o noclobber", which I think causes the failure during kernel installation. Please see log snippet at the end.
This happened during update to Gutsy, and in a subsequent kernel removal. I redid the kernel install from a clean root shell (without the noclobber), and it worked fine.
From apt log:
update-initramfs: Generating /boot/initrd.
63.5%
Running postinst hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
/usr/sbin/
User postinst hook script [/sbin/update-grub] exited with value 1
dpkg: error processing linux-image-
This one can be easily fixed, on line 383 replace
cat > "$newtemplate" <<EOF
with
cat >| "$newtemplate" <<EOF
There may be more instances of this problem though (trying to redirect to an existing file).