Bug#945404: grub2-common: '/boot/grub/.background_cache.png' is not created on LUKS encrypted system
Steve McIntyre
steve at einval.com
Sat Nov 21 18:16:17 GMT 2020
Control: tags -1 +patch
On Wed, Aug 12, 2020 at 12:53:46PM +0200, Gábor Gombás wrote:
>Package: grub2-common
>Version: 2.04-9
>Followup-For: Bug #945404
>
>The reason is lack of LUKS2 support. Specifically, in
>grub-core/osdep/devmapper/getroot.c, grub_util_get_dm_abstraction() has:
>
> if (strncmp (uuid, "CRYPT-LUKS1-", 12) == 0)
> {
> grub_free (uuid);
> return GRUB_DEV_ABSTRACTION_LUKS;
> }
>
>That will not match LUKS2-encrypted volumes, so grub-probe thinks the
>filesystem will be readable.
>
>Although grub upstream has some LUKS2 support now (see
>https://savannah.gnu.org/bugs/?55093), that does not seem to cover this
>part of the code yet.
ACK, you've worked out the cause of the problem here. I have a system
that shows exactly the same issue here.
Looking at the wider picture, at boot grub will not be able to read
the background graphic on lots of systems where the user has an
unencrypted /boot and so has has not configured grub to unencrypt
anything. This is the default setup for encrypted systems created
using debian-installer, so it's going to be quite common. (It's how I
found this!)
To be honest, I'm thinking we should just change the Debian theme
setup here to *always* copy the background image to
/boot/grub/.background_cache.png and use it from there. Not all users
need it, but it makes the logic simpler and more consistent here. It's
only a single graphic that's copied into /boot, after all...
@Colin: thoughts?
Patch attached for review.
--
Steve McIntyre, Cambridge, UK. steve at einval.com
"Managing a volunteer open source project is a lot like herding
kittens, except the kittens randomly appear and disappear because they
have day jobs." -- Matt Mackall
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bgimage.diff
Type: text/x-diff
Size: 1280 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-grub-devel/attachments/20201121/1377c3da/attachment.diff>
More information about the Pkg-grub-devel
mailing list