Bug#550473: grub-pc: don't ask permission to replace grub.cfg, when upgrading

Felix Zielcke fzielcke at z-51.de
Sat Oct 10 12:54:05 UTC 2009


Am Samstag, den 10.10.2009, 14:25 +0200 schrieb Felix Zielcke:
> forcemerge 538743 550473
> thanks
> 
> Am Samstag, den 10.10.2009, 14:55 +0300 schrieb yauhen barushka:
> 
> > Bug report:
> > 
> > When upgrading with `apt-get upgrade' script `grub-install' is runned, which replaces
> > `/boot/grub/grub.cfg' file without asking for user permission to do it (as most of packages
> > will do when attemping to replace user config file).
> 
> It's update-grub (actually grub-mkconfig) not grub-install which
> replaces it.
> 
> Maybe you missed the big warning at the top of the generated grub.cfg
> that you should not modify it directly?
> 
> User config files belong in /etc according to Debian Policy and also FHS
> and must preserve user changes.
> I think because of this some distros have a /etc/grub.conf symlink
> to /boot/grub/menu.lst
> GRUB Legacy's configuration for update-grub was just weird and violated
> this, so it got replaced with a more cleaner version.

Oh I forgot to mention you have to edit /etc/grub.d/*
and /etc/default/grub now, but that's also noted in the top of grub.cfg
dpkg/ucf take care to preserve your changes.
You can also rename the files in /etc/grub.d if you don't like the
order, but I'm not sure if dpkg would then tell anything at all if we
change the files in the package or if it silently accepts it that you
don't want to have that file (from it's perspective, it can't know that
you renamed it.) and so you would never got an updated version.

-- 
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer






More information about the Pkg-grub-devel mailing list