#543376 make the grub packages non conflicting

Package:
grub-pc
Source:
grub2
Description:
GRand Unified Bootloader, version 2 (PC/BIOS version)
Submitter:
Stefan Monnier
Date:
2014-07-25 05:33:05 UTC
Severity:
wishlist
#543376#5
Date:
2009-08-24 15:23:57 UTC
From:
To:
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

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).

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.


        Stefan

#543376#10
Date:
2009-08-24 15:54:54 UTC
From:
To:
Am Montag, den 24.08.2009, 11:23 -0400 schrieb Stefan Monnier:

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.

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.

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.

#543376#15
Date:
2009-08-24 21:15:44 UTC
From:
To:
Shouldn't it belong to grub-common?

I'd expect:

  grub-install.grub-legacy
  grub-install.grub-pc
  grub-install.grub-efi-ia32
  grub-install.grub-efi-amd64

(and, yes, I use the last 3 boot loaders on my USB Debian system, since
I sometimes boot it from a PC, sometimes from a 32bit Mac, and
sometimes from a 64bit Mac).
didn't specify which to use, signal an error.

Signalling an error sounds very safe to me.

No need to rename it.

Assuming update-grub runs all the versions of update-grub by default,
I'd expect grub-set-default to do the same.

It's probably not the same for efi-ia32 and efi-amd64, either.  Yes,
that calls for a renaming.

No, I don't think it likes it.  But renaming isn't such a big deal and
grub-common can hold the shared files.


        Stefan

#543376#24
Date:
2014-07-25 05:24:13 UTC
From:
To:
I haven't found a good work around for the USB/removable storage debian
boot on both bios and (u)efi based systems. Mac's efi won't (at least the
ones I have access to) boot removable media in bios mode. Being able to
install both uefi and bios grubs on a debian system would be really nice.

Thanks!