Bug#543376: grub-pc: Conflicts between versions of Grub2

Felix Zielcke fzielcke at z-51.de
Mon Aug 24 15:54:54 UTC 2009


Am Montag, den 24.08.2009, 11:23 -0400 schrieb Stefan Monnier:
> Package: grub-pc
> Version: 1.96+20090808-1
> Severity: normal
> 
> Aptitude just failed to install grub-pc because of a conflict:
> 
>    Removing grub-efi-amd64 ...
>    Processing triggers for man-db ...
>    Selecting previously deselected package grub-pc.
>    (Reading database ... 271556 files and directories currently installed.)
>    Unpacking grub-pc (from .../grub-pc_1.96+20090808-1_i386.deb) ...
>    Processing triggers for man-db ...
>    Setting up grub-pc (1.96+20090808-1) ...
>    ucfr: Attempt from package grub-pc  to take /etc/default/grub away from package grub-efi-amd64
>    ucfr: Aborting.
>    dpkg: error processing grub-pc (--configure):
>     subprocess installed post-installation script returned error exit status 4
>    Errors were encountered while processing:
>     grub-pc
>    E: Sub-process /usr/bin/dpkg returned an error code (1)
>    A package failed to install.  Trying to recover:
>    Setting up grub-pc (1.96+20090808-1) ...
>    ucfr: Attempt from package grub-pc  to take /etc/default/grub away from package grub-efi-amd64
>    ucfr: Aborting.
>    dpkg: error processing grub-pc (--configure):
>     subprocess installed post-installation script returned error exit status 4
>    Errors were encountered while processing:
>     grub-pc

When I added ucf support I wasn't sure if it would be a good idea to
always use --force.
But I think it would be safe to assume that /etc/default/grub will be
only shipped in a grub2 package and not anywhere else.

> On some machines, booting can be done with via grub-efi and via grub-pc.
> BTW, I really wish that the different Grubs were not marked as conflicting.
> After all, when we upgrade from Grub1 to Grub2, the normal Debian procedure
> leaves you with Grub1 active while its corresponding package is uninstalled,
> which is rather odd.
> A better option would be to let users install both `grub-pc' and
> `grub-legacy' at the same time.  AFAICT, the only realy conflict is in
> update-grub and install-grub, but they're fairly easy to resolve:
> update-grub should run both update-grub1 and update-grub2, while the
> second should choose either of the two based on availability (and/or
> based on some argument).

We would need to rename grub-install to grub2-install or something like
that.
And from what should we choose which to run if user just invokes
grub-install /dev/sda?
I doubt there is any very safe way to decide this if both packages are
installed.
I don't want to get any bug reports about people who have both packages
installed and don't know that running grub-install could be the one from
grub-legacy or the one from grub2.
I'm not sure it would be a good idea to rename grub-install in grub2
always to grub2-install like fedora does or gentoo on the fly in case
grub-legacy is installed.
Then we would need to make clear that it has been now renamed to not get
any bug reports about it.
NEWS.Debian doestn't get read that often.
And we need to find a new place for the grub2 version of
grub-set-default else we have same problem as below, same installed file
in 2 packages.

> Of course, the same holds for grub-efi (I often use an install of Debian
> on a USB stick, which I use both on PCs and on Macs, whereas PCs boot via
> grub-pc whereas Macs need grub-efi): I need to have both grub-pc and
> grub-efi installed at the same time.
> 

grub-mkimage isn't the same in -efi and -pc so in one of it, we'd need
to rename it.
And I'm not sure dpkg likes it that some installed files belong to 2
packages instead of 1.


-- 
Felix Zielcke
Proud Debian Maintainer






More information about the Pkg-grub-devel mailing list