[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Possibly broken Grub or initrd after updates on Testing



On Thu 04 Jan 2024 at 19:49:43 (+0100), Richard Rosner wrote:
> On 04.01.24 19:02, David Wright wrote:
> > Could you post the new grub.cfg file, so that people running testing,
> > and following along the thread later, can see how boot-repair fixed it?
> 
> Keep in mind, this is based on the assumption that your whole /
> partition is LUKS encrypted (in my case now LUKS2).
> "root-partition-UUID" is the UUID that's shown in Disks or on the Grub
> screen for the decryption password prompt. Now, I can't say for sure
> what "root-partition-UUID2" is, but that's what seems to be symlinked
> to /dev/dm-0 and with blkid, one of the entries will look like this:
> 
> /dev/mapper/luks-<root-partition-UUID>: UUID="<root-partition-UUID2>"
> BLOCK_SIZE="4096" TYPE="ext4"
> 
> So maybe it's just some kind of virtual UUID for the decrypted root
> partition.

(I would have thought that you'd know encrypted filesystems have UUIDs.)

I compared your new grub.cfg with mine (suitably decimated and edited)
and the significant differences are very few; extra modules are loaded:
cryptodisk, luks2, gcry_rijndael, gcry_rijndael and gcry_sha256.
My    set root='hd0,gpt5' is replaced by
  set root='cryptouuid/<root-partition-UUID>'
and my
  --hint-bios=hd0,gpt5 --hint-efi=hd0,gpt5 --hint-bar emetal=ahci0,gpt5
is replaced by
  hint='cryptouuid/<root-partition-UUID>'

Unlike the first version of grub.cfg that you pasted earlier:

  cryptomount -u <LUKS1 partition's UUID>
  set root='cryptouuid/<LUKS1 partition's UUID>

there's no cryptomount in your new one. I'm guessing that means that
the LUKS2 partition has been decrypted by Grub before grub.cfg is
commanded. Do you now get just the one prompt for the passphrase
when you boot? (I'm not very familiar with how far encrypted
/boot has progressed.)

The other difference in the earlier, pasted grub.cfg is that its
linux line was extremely long, and looked as though a large amount
of text had been added from GRUB_CMDLINE_LINUX_DEFAULT and/or
GRUB_CMDLINE_LINUX, perhaps set in /etc/default/grub?
I commented previously on the multiple root= parameters, and have
also noticed that the recovery mode lines had "single" duplicated.
I presume all that configuration stuff has gone away now.

I passed over a couple of other, minor differences that probably don't
affect things, like the pasted grub.cfg allowing for decrypting / to
get at fonts in /usr/share/grub/, and the similar code (extra relative
to mine) in 05_debian_theme for prettyfying the main Grub screen.

I somehow doubt whether all this will be any help, as you're working
well beyond my experience, and somewhere near the cutting edge of Grub.

Cheers,
David.


Reply to: