grub-pc versus grub-efi-amd64
Tom H
tomh0665 at gmail.com
Mon Aug 31 18:57:46 UTC 2020
On Mon, Aug 31, 2020 at 7:02 PM Volker Wysk <post at volker-wysk.de> wrote:
> Am Montag, den 31.08.2020, 14:27 +0200 schrieb Tom H:
>> On Sat, Aug 29, 2020 at 5:31 PM Volker Wysk <post at volker-wysk.de>
>> wrote:
>> I installed 20.10 right after 20.04 was released on an EFI system,
>> and I also have "grub-pc" rather than "grub-efi-amd64" installed.
>
> And this isn't a packaging bug...
I don't think so. I _feel_ that it's more likely to be an apt bug.
Consider the output below of "dpkg -s" for all the grub packages on my
laptop (with only the relevant lines kept).
"grub-efi-amd64-signed" depends on "grub-efi-amd64 | grub-pc", which
is the correct priority to install "grub-efi-amd64".
But
"grub-common" replaces "grub-efi-amd64 (<< 2.00-4)"
"grub-efi-amd64-bin" replaces "grub-efi-amd64 (<< 1.99-1)"
"grub2-common" replaces "grub-efi-amd64 (<< 2.02+dfsg1-7)" and breaks
"grub-efi-amd64 (<< 2.02+dfsg1-7)"
So, even though the Replaces/Breaks versions are below the current
"2.04-1ubuntu28", the resolver must somehow end up preferring
"grub-pc".
Maybe...
# dpkg -s grub-common
Replaces: grub-coreboot (<< 2.00-4), grub-efi (<< 1.99-1),
grub-efi-amd64 (<< 2.00-4), grub-efi-ia32 (<< 2.00-4), grub-efi-ia64
(<< 2.00-4), grub-ieee1275 (<< 2.00-4), grub-linuxbios (<<
1.96+20080831-1), grub-pc (<< 2.00-4), grub-yeeloong (<< 2.00-4),
init-select
Depends: libc6 (>= 2.28), libdevmapper1.02.1 (>= 2:1.02.36),
libefiboot1 (>= 37), libefivar1 (>= 37), libfreetype6 (>= 2.2.1),
libfuse2 (>= 2.8.4-1.4), liblzma5 (>= 5.1.1alpha+20120614), debconf
(>= 0.5) | debconf-2.0, gettext-base, lsb-base (>= 3.0-6)
# dpkg -s grub-efi-amd64-bin
Replaces: grub-common (<= 1.97~beta2-1), grub-efi-amd64 (<< 1.99-1),
grub2 (<< 2.04-1ubuntu28)
Depends: grub-common (= 2.04-1ubuntu28)
# dpkg -s grub-efi-amd64-signed
Depends: grub-efi-amd64-bin (= 2.04-1ubuntu28), grub-efi-amd64 | grub-pc
# dpkg -s grub-pc
Replaces: grub, grub-common (<= 1.97~beta2-1), grub-coreboot,
grub-efi-amd64, grub-efi-ia32, grub-ieee1275, grub-legacy, grub2 (<<
2.04-1ubuntu28)
Depends: debconf (>= 0.5) | debconf-2.0, grub-common (=
2.04-1ubuntu28), grub2-common (= 2.04-1ubuntu28), grub-pc-bin (=
2.04-1ubuntu28), ucf, grub-gfxpayload-lists
Conflicts: grub (<< 0.97-54), grub-coreboot, grub-efi-amd64,
grub-efi-ia32, grub-ieee1275, grub-legacy, grub-xen
# dpkg -s grub-pc-bin
Replaces: grub-common (<= 1.97~beta2-1), grub-pc (<< 1.99-1), grub2
(<< 2.04-1ubuntu28)
Depends: libc6 (>= 2.28), libdevmapper1.02.1 (>= 2:1.02.36),
grub-common (= 2.04-1ubuntu28)
# dpkg -s grub2-common
Replaces: grub, grub-cloud-amd64 (<< 0.0.4), grub-common (<< 1.99-1),
grub-coreboot (<< 2.02+dfsg1-7), grub-doc (<< 0.97-29ubuntu60),
grub-efi-amd64 (<< 2.02+dfsg1-7), grub-efi-arm (<< 2.02+dfsg1-7),
grub-efi-arm64 (<< 2.02+dfsg1-7), grub-efi-ia32 (<< 2.02+dfsg1-7),
grub-efi-ia64 (<< 2.02+dfsg1-7), grub-ieee1275 (<< 2.02+dfsg1-7),
grub-legacy, grub-legacy-doc (<< 0.97-29ubuntu60), grub-pc (<<
2.02+dfsg1-7), grub-uboot (<< 2.02+dfsg1-7), grub-xen (<<
2.02+dfsg1-7), grub-yeeloong (<< 2.02+dfsg1-7)
Depends: grub-common (= 2.04-1ubuntu28), dpkg (>= 1.15.4) |
install-info, libc6 (>= 2.28), libdevmapper1.02.1 (>= 2:1.02.36),
libefiboot1 (>= 37), libefivar1 (>= 37), liblzma5 (>=
5.1.1alpha+20120614)
Breaks: grub (<< 0.97-54), grub-cloud-amd64 (<< 0.0.4), grub-coreboot
(<< 2.02+dfsg1-7), grub-doc (<< 0.97-29ubuntu60), grub-efi-amd64 (<<
2.02+dfsg1-7), grub-efi-arm (<< 2.02+dfsg1-7), grub-efi-arm64 (<<
2.02+dfsg1-7), grub-efi-ia32 (<< 2.02+dfsg1-7), grub-efi-ia64 (<<
2.02+dfsg1-7), grub-ieee1275 (<< 2.02+dfsg1-7), grub-legacy-doc (<<
0.97-29ubuntu60), grub-pc (<< 2.02+dfsg1-7), grub-uboot (<<
2.02+dfsg1-7), grub-xen (<< 2.02+dfsg1-7), grub-yeeloong (<<
2.02+dfsg1-7), shim (<< 13)
Conflicts: grub-legacy
>> The Ubuntu grub2 source package's chopped up into many binary
>> packages.
>>
>> Neither "grub-pc" nor "" have anything really significant for
>> booting
> ^grub-efi-amd64
>> an EFI system.
Thanks for the correction. I wonder what I did :)
> This is the part which I didn't understand. Grub2 is the boot loader,
> so I guessed, because of that article, that handling of UEFI versus
> the old BIOS-based standard was placed in those two packages (grub-pc
> and\ grub-efi-amd64). But, like you said, Grub is split into a LOT
> more packages. There are no less than 46 packages with "grub" in the
> name.
>
> What disturbes me, is that the "update-grub" script is in the
> "grub-pc" package, but not in "grub-efi-amd64". Isn't this script
> needed, for instance, when a new kernel is to be installed?
"update-grub" in "grub-pc" is the legacy "update-grub" script, which
means that it is "update-grub" of grub1. Running grub1's "update-grub"
would update "/boot/grub/menu.lst" in between "BEGIN AUTOMAGIC KERNELS
LIST" and "END DEBIAN AUTOMAGIC KERNELS LIST" lines.
> Obviously it isn't. But why is it split into the two packages?
> Doesn't it matter, which package is installed? If not, why two
> packages?
>
>> localhost /tmp/GRUB $ dpkg -L grub-pc
>> /.
>> /usr
>> /usr/bin
>> /usr/lib
>> /usr/lib/grub-legacy
>> /usr/lib/grub-legacy/update-grub
>> /usr/sbin
>> /usr/sbin/upgrade-from-grub-legacy
>> /usr/share
>> /usr/share/bash-completion
>> /usr/share/bash-completion/completions
>> /usr/share/bug
>> /usr/share/bug/grub-pc
>> /usr/share/bug/grub-pc/presubj
>> /usr/share/bug/grub-pc/script
>> /usr/share/doc
>> /usr/share/man
>> /usr/share/man/man8
>> /usr/share/man/man8/grub-bios-setup.8.gz
>> /usr/bin/grub-ntldr-img
>> /usr/sbin/grub-bios-setup
>> /usr/share/bash-completion/completions/grub-bios-setup
>> /usr/share/doc/grub-pc
>>
>> localhost /tmp/GRUB $ apt download grub-efi-amd64
>>
>> localhost /tmp/GRUB $ dpkg -x grub-efi-amd64_2.04-1ubuntu28_amd64.deb
>> .
>>
>> localhost /tmp/GRUB $ lr
>> .:
>> grub-efi-amd64_2.04-1ubuntu28_amd64.deb usr/
>>
>> ./usr:
>> share/
>>
>> ./usr/share:
>> bug/ doc/
>>
>> ./usr/share/bug:
>> grub-efi-amd64/
>>
>> ./usr/share/bug/grub-efi-amd64:
>> presubj script*
>>
>> ./usr/share/doc:
>> grub-efi-amd64@
>>
>> localhost /tmp/GRUB $ sudo apt install grub-efi-amd64 -s
>
> What does that "-s" argument do? I couldn't find it in the man page.
"-s" == "--simulate"
It shows what the apt/apt-get command would install.
It might not be in "man apt", but it must be in "man apt-get".
>> Reading package lists... Done
>> Building dependency tree
>> Reading state information... Done
>> The following packages will be REMOVED:
>> grub-gfxpayload-lists grub-pc
>> The following NEW packages will be installed:
>> grub-efi-amd64
>> 0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded.
>> Remv grub-gfxpayload-lists [0.7] [grub-pc:amd64 ]
>> Remv grub-pc [2.04-1ubuntu28] [grub-efi-amd64-signed:amd64 ]
>> Inst grub-efi-amd64 (2.04-1ubuntu28 Ubuntu:20.10/groovy [amd64])
>> Conf grub-efi-amd64 (2.04-1ubuntu28 Ubuntu:20.10/groovy [amd64])
>> th localhost /home/th
>>
>> localhost /tmp/GRUB $
>>
>> So if you install "grub-efi-amd64", nothing much'll change.
>
> Thanks!
You're welcome!
More information about the ubuntu-users
mailing list