Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #265386 > unrolled thread

Re: Possibly broken Grub or initrd after updates on Testing

Started byRichard Rosner <richard@rosner-online.de>
First post2024-01-01 11:50 +0100
Last post2024-01-07 21:00 +0100
Articles 20 on this page of 33 — 9 participants

Back to article view | Back to linux.debian.user

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Possibly broken Grub or initrd after updates on Testing Richard Rosner <richard@rosner-online.de> - 2024-01-01 11:50 +0100
    Re: Possibly broken Grub or initrd after updates on Testing Michael Kjörling <2695bd53d63c@ewoof.net> - 2024-01-01 12:00 +0100
      Re: Possibly broken Grub or initrd after updates on Testing Richard Rosner <richard@rosner-online.de> - 2024-01-01 13:00 +0100
        Re: Possibly broken Grub or initrd after updates on Testing Richard Rosner <richard@rosner-online.de> - 2024-01-01 17:40 +0100
          Re: Possibly broken Grub or initrd after updates on Testing David Wright <deblis@lionunicorn.co.uk> - 2024-01-01 17:50 +0100
            Re: Possibly broken Grub or initrd after updates on Testing Richard Rosner <richard@rosner-online.de> - 2024-01-01 18:00 +0100
              Re: Possibly broken Grub or initrd after updates on Testing David Wright <deblis@lionunicorn.co.uk> - 2024-01-01 18:20 +0100
                Re: Possibly broken Grub or initrd after updates on Testing Richard Rosner <richard@rosner-online.de> - 2024-01-01 19:10 +0100
                  Re: Possibly broken Grub or initrd after updates on Testing David Wright <deblis@lionunicorn.co.uk> - 2024-01-01 20:40 +0100
                    Re: Possibly broken Grub or initrd after updates on Testing Richard Rosner <richard@rosner-online.de> - 2024-01-01 21:30 +0100
                      Re: Possibly broken Grub or initrd after updates on Testing Richard Rosner <richard@rosner-online.de> - 2024-01-01 21:50 +0100
                        Replace Grub with rEFInd [WAS Possibly broken Grub or initrd after  updates on Testing] Richard Rosner <richard@rosner-online.de> - 2024-01-03 20:30 +0100
                          Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd  after updates on Testing] Eddie <eddie.seymour@gmail.com> - 2024-01-03 21:10 +0100
                            Re: Possibly broken Grub or initrd after updates on Testing Richard Rosner <richard@rosner-online.de> - 2024-01-03 22:10 +0100
                              Re: Possibly broken Grub or initrd after updates on Testing David Wright <deblis@lionunicorn.co.uk> - 2024-01-04 19:10 +0100
                                Re: Possibly broken Grub or initrd after updates on Testing Richard Rosner <richard@rosner-online.de> - 2024-01-04 20:00 +0100
                                  Re: Possibly broken Grub or initrd after updates on Testing David Wright <deblis@lionunicorn.co.uk> - 2024-01-07 18:10 +0100
                                    Re: Possibly broken Grub or initrd after updates on Testing Richard Rosner <richard@rosner-online.de> - 2024-01-07 19:00 +0100
                                  Re: Possibly broken Grub or initrd after updates on Testing Richard Rosner <richard@rosner-online.de> - 2024-01-07 19:00 +0100
                          Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd  after updates on Testing] Jeffrey Walton <noloader@gmail.com> - 2024-01-04 02:20 +0100
                            Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd  after updates on Testing] Richard Rosner <richard@rosner-online.de> - 2024-01-04 08:50 +0100
                              Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd  after updates on Testing] Pocket <pocket@columbus.rr.com> - 2024-01-04 12:00 +0100
                              Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd  after updates on Testing] Jeffrey Walton <noloader@gmail.com> - 2024-01-04 12:00 +0100
                                Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd after updates on Testing] Richard Rosner <richard@rosner-online.de> - 2024-01-04 13:10 +0100
                            Re: Possibly broken Grub or initrd after updates on Testing Richard Rosner <richard@rosner-online.de> - 2024-01-04 08:50 +0100
                          Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd  after updates on Testing] Timothy M Butterworth <timothy.m.butterworth@gmail.com> - 2024-01-04 08:20 +0100
                          Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd  after updates on Testing] Joel Roth <joelz@pobox.com> - 2024-01-04 09:40 +0100
                            Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd  after updates on Testing] Richard Rosner <richard@rosner-online.de> - 2024-01-04 12:00 +0100
                              Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd  after updates on Testing] Richard Rosner <richard@rosner-online.de> - 2024-01-04 18:20 +0100
                                Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd  after updates on Testing] Joel Roth <joelz@pobox.com> - 2024-01-04 19:00 +0100
                                  Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd  after updates on Testing] Jeffrey Walton <noloader@gmail.com> - 2024-01-05 00:40 +0100
                          Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd  after updates on Testing] songbird <songbird@anthive.com> - 2024-01-07 20:50 +0100
                            Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd  after updates on Testing] Richard Rosner <richard@rosner-online.de> - 2024-01-07 21:00 +0100

Page 1 of 2  [1] 2  Next page →


#265386 — Re: Possibly broken Grub or initrd after updates on Testing

FromRichard Rosner <richard@rosner-online.de>
Date2024-01-01 11:50 +0100
SubjectRe: Possibly broken Grub or initrd after updates on Testing
Message-ID<HRo1P-1UO-13@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

I'm not sure what you meant with "rescue mode", but I've reinstalled grub anyways. The log of it doesn't look good though. Quite a bunch of errors. The result also is the same.

https://pastes.io/nvmlsxghlm


> On Jan 1, 2024, at 11:03, Michael Kjörling <2695bd53d63c@ewoof.net> wrote:
> 
> On 1 Jan 2024 09:16 +0100, from richard@rosner-online.de (Richard Rosner):
>> could you please check if you received either of my two tries to get
>> this answer through the mailing list?
> 
> I did not. Maybe they are held for moderation due to size?
> 
> Next time, you can check for yourself at either
> https://lists.debian.org/debian-user/recent or at
> https://lists.debian.org/debian-user/ under the "archives" heading.
> There's also a search there. If a message is not in the archive after
> one or two archive refreshes, it probably didn't make it through the
> list for whatever reason there may be.
> 
> --
> Michael Kjörling                     🔗 https://michael.kjorling.se
> “Remember when, on the Internet, nobody cared that you were a dog?”
> 

[toc] | [next] | [standalone]


#265387

FromMichael Kjörling <2695bd53d63c@ewoof.net>
Date2024-01-01 12:00 +0100
Message-ID<HRobv-1YJ-9@gated-at.bofh.it>
In reply to#265386
On 1 Jan 2024 11:46 +0100, from richard@rosner-online.de (Richard Rosner):
> I'm not sure what you meant with "rescue mode", but I've reinstalled
> grub anyways. The log of it doesn't look good though. Quite a bunch
> of errors. The result also is the same.

Please review the posts in the thread starting on Dec 21 2023 14:25:26
UTC, https://lists.debian.org/msgid-search/254ebb90-9a49-4b5a-b1d6-e41b51d8aa7d@columbus.rr.com

-- 
Michael Kjörling                     🔗 https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”

[toc] | [prev] | [next] | [standalone]


#265389

FromRichard Rosner <richard@rosner-online.de>
Date2024-01-01 13:00 +0100
Message-ID<HRp7z-2Cx-5@gated-at.bofh.it>
In reply to#265387
I do not see an answer to my questions.

> On Jan 1, 2024, at 11:52, Michael Kjörling <2695bd53d63c@ewoof.net> wrote:
> 
> On 1 Jan 2024 11:46 +0100, from richard@rosner-online.de (Richard Rosner):
>> I'm not sure what you meant with "rescue mode", but I've reinstalled
>> grub anyways. The log of it doesn't look good though. Quite a bunch
>> of errors. The result also is the same.
> 
> Please review the posts in the thread starting on Dec 21 2023 14:25:26
> UTC, https://lists.debian.org/msgid-search/254ebb90-9a49-4b5a-b1d6-e41b51d8aa7d@columbus.rr.com
> 
> --
> Michael Kjörling                     🔗 https://michael.kjorling.se
> “Remember when, on the Internet, nobody cared that you were a dog?”
> 

[toc] | [prev] | [next] | [standalone]


#265396

FromRichard Rosner <richard@rosner-online.de>
Date2024-01-01 17:40 +0100
Message-ID<HRtux-5h4-1@gated-at.bofh.it>
In reply to#265389

[Multipart message — attachments visible in raw view] — view raw

So, I found a way to manually mount luks partition in Grub and boot from it.

What I did to get there:
set root=(hd0,gpt2)
cryptomount -a

This gave me the unencrypted version of the root partition as (crypto1)

set root=(crypto1)
linux /vmlinuz root=/dev/mapper/luks-UUID
initrd /initrd.img
boot

The problem only is to get the UUID format right. When you're asked to enter the decryption key in a normal boot, it's shown, but without any dashes. But the format must be the same eg Disks shows it. But sure if a Grub tool can show that, but worst case you'll be booted into a initrd BusyBox terminal where you can just look inside /dev/mapper and see the true path that needs to be entered.

Question is, how do I repair the boot process so I don't have to boot by hand every time?


On January 1, 2024 12:52:40 PM GMT+01:00, Richard Rosner <richard@rosner-online.de> wrote:
>I do not see an answer to my questions.

[toc] | [prev] | [next] | [standalone]


#265399

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2024-01-01 17:50 +0100
Message-ID<HRtEd-5kk-1@gated-at.bofh.it>
In reply to#265396
On Mon 01 Jan 2024 at 17:37:44 (+0100), Richard Rosner wrote:
> So, I found a way to manually mount luks partition in Grub and boot from it.
> 
> What I did to get there:
> set root=(hd0,gpt2)
> cryptomount -a
> 
> This gave me the unencrypted version of the root partition as (crypto1)
> 
> set root=(crypto1)
> linux /vmlinuz root=/dev/mapper/luks-UUID
> initrd /initrd.img
> boot
> 
> The problem only is to get the UUID format right. When you're asked to enter the decryption key in a normal boot, it's shown, but without any dashes. But the format must be the same eg Disks shows it. But sure if a Grub tool can show that, but worst case you'll be booted into a initrd BusyBox terminal where you can just look inside /dev/mapper and see the true path that needs to be entered.
> 
> Question is, how do I repair the boot process so I don't have to boot by hand every time?

Like this?

  └─sda6                                          8:6    0 406.2G  0 part  
    └─luks-f3fbb9ba-a556-406c-b276-555e3e8577bc 254:1    0 406.2G  0 crypt /home

That's groups of 8 4 4 4 12.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#265401

FromRichard Rosner <richard@rosner-online.de>
Date2024-01-01 18:00 +0100
Message-ID<HRtNT-5nz-7@gated-at.bofh.it>
In reply to#265399
Yes, exactly. Is there a way to show that from inside Grub? Lsblk and blkid aren't available there?

On January 1, 2024 5:43:12 PM GMT+01:00, David Wright <deblis@lionunicorn.co.uk> wrote:

>Like this?
>
>  └─sda6                                          8:6    0 406.2G  0 part  
>    └─luks-f3fbb9ba-a556-406c-b276-555e3e8577bc 254:1    0 406.2G  0 crypt /home
>
>That's groups of 8 4 4 4 12.
>
>Cheers,
>David.
>

[toc] | [prev] | [next] | [standalone]


#265402

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2024-01-01 18:20 +0100
Message-ID<HRu7f-5Ml-3@gated-at.bofh.it>
In reply to#265401
On Mon 01 Jan 2024 at 17:55:29 (+0100), Richard Rosner wrote:
> On January 1, 2024 5:43:12 PM GMT+01:00, David Wright <deblis@lionunicorn.co.uk> wrote:
> 
> >Like this?
> >
> >  └─sda6                                          8:6    0 406.2G  0 part  
> >    └─luks-f3fbb9ba-a556-406c-b276-555e3e8577bc 254:1    0 406.2G  0 crypt /home
> >
> >That's groups of 8 4 4 4 12.
> 
> Yes, exactly. Is there a way to show that from inside Grub? Lsblk and blkid aren't available there?

I thought you could boot by hand. Then all the UUIDs are available
to you in lsblk, the /dev/disk/ symlinks, etc. I would then transcribe
them into a 40_custom paragraph in grub.cfg so you can boot easily.
Then I would work on getting Grub to write its grub.cfg correctly.
In the meantime, 40_custom would stay put.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#265403

FromRichard Rosner <richard@rosner-online.de>
Date2024-01-01 19:10 +0100
Message-ID<HRuTD-6gR-3@gated-at.bofh.it>
In reply to#265402
I can boot by hand, but since this is all archived anyways and it's 
uneccessarily difficult to find some sort of guide how to even do this, 
it might as well be a documentation for users having such troubles in 
the future.

Also, besides the way that I have no clue how it would have to look like 
to set up a paragraph in the grub.cfg, I simply don't see anything wrong 
with it anyways. So I can't even look at the grub settings files 
grub.cfg is being generated from to check where the error lies.

This is the current content of the grub.cfg: https://pastes.io/bwsmqtkxa4

The UUID of the first partition containing the EFI stuff is 3647-0C47, 
the root partition has d602e92a-af2b-4c44-86db-4ea155fafd08 (LUKS1 with 
ext4 as it seems - why does Debian still not default to creating LUKS2 
by default anyways after 5 years?) and the swap partition has 
b33971d1-3407-4d81-a9c2-74c69064aebe (also LUKS1).

For me it looks like the grub.cfg has everything it needs to work.

On 01.01.24 18:13, David Wright wrote:
> On Mon 01 Jan 2024 at 17:55:29 (+0100), Richard Rosner wrote:
>> On January 1, 2024 5:43:12 PM GMT+01:00, David Wright <deblis@lionunicorn.co.uk> wrote:
>>
>>> Like this?
>>>
>>>   └─sda6                                          8:6    0 406.2G  0 part
>>>     └─luks-f3fbb9ba-a556-406c-b276-555e3e8577bc 254:1    0 406.2G  0 crypt /home
>>>
>>> That's groups of 8 4 4 4 12.
>> Yes, exactly. Is there a way to show that from inside Grub? Lsblk and blkid aren't available there?
> I thought you could boot by hand. Then all the UUIDs are available
> to you in lsblk, the /dev/disk/ symlinks, etc. I would then transcribe
> them into a 40_custom paragraph in grub.cfg so you can boot easily.
> Then I would work on getting Grub to write its grub.cfg correctly.
> In the meantime, 40_custom would stay put.
>
> Cheers,
> David.
>

[toc] | [prev] | [next] | [standalone]


#265406

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2024-01-01 20:40 +0100
Message-ID<HRwiJ-6Yy-7@gated-at.bofh.it>
In reply to#265403
On Mon 01 Jan 2024 at 19:04:20 (+0100), Richard Rosner wrote:
> On 01.01.24 18:13, David Wright wrote:
> > On Mon 01 Jan 2024 at 17:55:29 (+0100), Richard Rosner wrote:
> > > On January 1, 2024 5:43:12 PM GMT+01:00, David Wright wrote:
> > > 
> > > > Like this?
> > > > 
> > > >   └─sda6                                          8:6    0 406.2G  0 part
> > > >     └─luks-f3fbb9ba-a556-406c-b276-555e3e8577bc 254:1    0 406.2G  0 crypt /home
> > > > 
> > > > That's groups of 8 4 4 4 12.
> > > Yes, exactly. Is there a way to show that from inside Grub? Lsblk and blkid aren't available there?
> > I thought you could boot by hand. Then all the UUIDs are available
> > to you in lsblk, the /dev/disk/ symlinks, etc. I would then transcribe
> > them into a 40_custom paragraph in grub.cfg so you can boot easily.
> > Then I would work on getting Grub to write its grub.cfg correctly.
> > In the meantime, 40_custom would stay put.
> > 
> I can boot by hand, but since this is all archived anyways and it's
> uneccessarily difficult to find some sort of guide how to even do
> this, it might as well be a documentation for users having such
> troubles in the future.
> 
> Also, besides the way that I have no clue how it would have to look
> like to set up a paragraph in the grub.cfg, I simply don't see
> anything wrong with it anyways. So I can't even look at the grub
> settings files grub.cfg is being generated from to check where the
> error lies.

You append the commands that you used to boot manually with into
/etc/grub.d/40_custom, observing the comments there, and also into
grub.cfg itself at the appropriate place (near the bottom). The
former is so that Grub includes it in any new grub.cfg that you
create.

> This is the current content of the grub.cfg: https://pastes.io/bwsmqtkxa4
> 
> The UUID of the first partition containing the EFI stuff is 3647-0C47,
> the root partition has d602e92a-af2b-4c44-86db-4ea155fafd08 (LUKS1
> with ext4 as it seems - why does Debian still not default to creating
> LUKS2 by default anyways after 5 years?) and the swap partition has
> b33971d1-3407-4d81-a9c2-74c69064aebe (also LUKS1).

Because it could lock people out of their preexisting LUKS partitions.

> For me it looks like the grub.cfg has everything it needs to work.

Why do your linux lines have two root= strings?

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#265407

FromRichard Rosner <richard@rosner-online.de>
Date2024-01-01 21:30 +0100
Message-ID<HRx57-7tq-1@gated-at.bofh.it>
In reply to#265406
On 01.01.24 20:30, David Wright wrote:
> On Mon 01 Jan 2024 at 19:04:20 (+0100), Richard Rosner wrote:
>> On 01.01.24 18:13, David Wright wrote:
>> I can boot by hand, but since this is all archived anyways and it's
>> uneccessarily difficult to find some sort of guide how to even do
>> this, it might as well be a documentation for users having such
>> troubles in the future.
>>
>> Also, besides the way that I have no clue how it would have to look
>> like to set up a paragraph in the grub.cfg, I simply don't see
>> anything wrong with it anyways. So I can't even look at the grub
>> settings files grub.cfg is being generated from to check where the
>> error lies.
> You append the commands that you used to boot manually with into
> /etc/grub.d/40_custom, observing the comments there, and also into
> grub.cfg itself at the appropriate place (near the bottom). The
> former is so that Grub includes it in any new grub.cfg that you
> create.
Good to know.
>
>> This is the current content of the grub.cfg: https://pastes.io/bwsmqtkxa4
>>
>> The UUID of the first partition containing the EFI stuff is 3647-0C47,
>> the root partition has d602e92a-af2b-4c44-86db-4ea155fafd08 (LUKS1
>> with ext4 as it seems - why does Debian still not default to creating
>> LUKS2 by default anyways after 5 years?) and the swap partition has
>> b33971d1-3407-4d81-a9c2-74c69064aebe (also LUKS1).
> Because it could lock people out of their preexisting LUKS partitions.
I meant when you use the automated installer and wipe the whole disk 
anyways. There wouldn't be any preexisting LUKS partitions left that 
could be broken. Or can there not be LUKS1 and LUKS2 at the same time in 
the event that e.g. the device with the system on is LUKS2 and another 
device just containing data was LUKS1?
>
>> For me it looks like the grub.cfg has everything it needs to work.
> Why do your linux lines have two root= strings?
>
No idea. I never really touched anything related to grub, besides the 
earlier mentioned tries to get some logs. Also, since it looks like 
there is no grub rescue mode installed (at least it's not being entered 
when it should) I did remove the comment in front of 
GRUB_DISABLE_RECOVER and set it to "false", just in case that for some 
reason it would default to true, thus not installing grub rescue. 
There's only one root in the /etc/default/grub.

[toc] | [prev] | [next] | [standalone]


#265408

FromRichard Rosner <richard@rosner-online.de>
Date2024-01-01 21:50 +0100
Message-ID<HRxot-7Cz-5@gated-at.bofh.it>
In reply to#265407

[Multipart message — attachments visible in raw view] — view raw

On 01.01.24 21:20, Richard Rosner wrote:
>
> On 01.01.24 20:30, David Wright wrote:
>> On Mon 01 Jan 2024 at 19:04:20 (+0100), Richard Rosner wrote:
>>> On 01.01.24 18:13, David Wright wrote:
>>> I can boot by hand, but since this is all archived anyways and it's
>>> uneccessarily difficult to find some sort of guide how to even do
>>> this, it might as well be a documentation for users having such
>>> troubles in the future.
>>>
>>> Also, besides the way that I have no clue how it would have to look
>>> like to set up a paragraph in the grub.cfg, I simply don't see
>>> anything wrong with it anyways. So I can't even look at the grub
>>> settings files grub.cfg is being generated from to check where the
>>> error lies.
>> You append the commands that you used to boot manually with into
>> /etc/grub.d/40_custom, observing the comments there, and also into
>> grub.cfg itself at the appropriate place (near the bottom). The
>> former is so that Grub includes it in any new grub.cfg that you
>> create.
> Good to know.
Edit:, never mind. Tried that, it still booted straight to the UEFI BIOS 
menu after entering my password. At this point, I'm seriously 
considering slapping rEFInd on it and pray that it picks up on 
everything automatically and fix the situation. But so should Grub have, 
besides the fact that I can't even be entirely sure Grub is to blame and 
not something else.

[toc] | [prev] | [next] | [standalone]


#265449 — Replace Grub with rEFInd [WAS Possibly broken Grub or initrd after updates on Testing]

FromRichard Rosner <richard@rosner-online.de>
Date2024-01-03 20:30 +0100
SubjectReplace Grub with rEFInd [WAS Possibly broken Grub or initrd after updates on Testing]
Message-ID<HSf69-z8U-5@gated-at.bofh.it>
In reply to#265408

[Multipart message — attachments visible in raw view] — view raw

So, since for whatever reason Grub seems to be broken beyond repair, I 
today tried to just replace it with rEFInd. Installation succeeded 
without any trouble. But when I start my system, rEFInd just asks me if 
I want to boot with fwupd or with the still very broken Grub. Am I 
missing something? Is rEFInd really just something to select between 
different OSs (and not just different distributions like Grub can very 
well do) and then gives the rest over to their bootloaders or am I 
missing something so rEFInd will take over all of Grubs jobs?

On 01.01.24 21:45, Richard Rosner wrote:
>
>
> On 01.01.24 21:20, Richard Rosner wrote:
>>
>> On 01.01.24 20:30, David Wright wrote:
>>> On Mon 01 Jan 2024 at 19:04:20 (+0100), Richard Rosner wrote:
>>>> On 01.01.24 18:13, David Wright wrote:
>>>> I can boot by hand, but since this is all archived anyways and it's
>>>> uneccessarily difficult to find some sort of guide how to even do
>>>> this, it might as well be a documentation for users having such
>>>> troubles in the future.
>>>>
>>>> Also, besides the way that I have no clue how it would have to look
>>>> like to set up a paragraph in the grub.cfg, I simply don't see
>>>> anything wrong with it anyways. So I can't even look at the grub
>>>> settings files grub.cfg is being generated from to check where the
>>>> error lies.
>>> You append the commands that you used to boot manually with into
>>> /etc/grub.d/40_custom, observing the comments there, and also into
>>> grub.cfg itself at the appropriate place (near the bottom). The
>>> former is so that Grub includes it in any new grub.cfg that you
>>> create.
>> Good to know.
> Edit:, never mind. Tried that, it still booted straight to the UEFI 
> BIOS menu after entering my password. At this point, I'm seriously 
> considering slapping rEFInd on it and pray that it picks up on 
> everything automatically and fix the situation. But so should Grub 
> have, besides the fact that I can't even be entirely sure Grub is to 
> blame and not something else.

[toc] | [prev] | [next] | [standalone]


#265450 — Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd after updates on Testing]

FromEddie <eddie.seymour@gmail.com>
Date2024-01-03 21:10 +0100
SubjectRe: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd after updates on Testing]
Message-ID<HSfIR-zFq-1@gated-at.bofh.it>
In reply to#265449
I have had very good results using "Boot-Repair" software to recover 
Grub difficulties.

Eddie

On 1/3/24 14:23, Richard Rosner wrote:
> So, since for whatever reason Grub seems to be broken beyond repair, I 
> today tried to just replace it with rEFInd. Installation succeeded 
> without any trouble. But when I start my system, rEFInd just asks me if 
> I want to boot with fwupd or with the still very broken Grub. Am I 
> missing something? Is rEFInd really just something to select between 
> different OSs (and not just different distributions like Grub can very 
> well do) and then gives the rest over to their bootloaders or am I 
> missing something so rEFInd will take over all of Grubs jobs?
> 

[toc] | [prev] | [next] | [standalone]


#265452

FromRichard Rosner <richard@rosner-online.de>
Date2024-01-03 22:10 +0100
Message-ID<HSgEW-AgL-27@gated-at.bofh.it>
In reply to#265450

[Multipart message — attachments visible in raw view] — view raw

Thanks, this actually did the job. I don't know what it was, but my 
guess is it was the step "purge Grub before reinstalling it".


PS: rewrote to the old subject, as this is clearly an answer to the 
original problem, as it doesn't have anything to do with replacing Grub 
all together.

On 03.01.24 21:04, Eddie wrote:
> I have had very good results using "Boot-Repair" software to recover 
> Grub difficulties.
>
> Eddie
>
> On 1/3/24 14:23, Richard Rosner wrote:
>> So, since for whatever reason Grub seems to be broken beyond repair, 
>> I today tried to just replace it with rEFInd. Installation succeeded 
>> without any trouble. But when I start my system, rEFInd just asks me 
>> if I want to boot with fwupd or with the still very broken Grub. Am I 
>> missing something? Is rEFInd really just something to select between 
>> different OSs (and not just different distributions like Grub can 
>> very well do) and then gives the rest over to their bootloaders or am 
>> I missing something so rEFInd will take over all of Grubs jobs?
>>
>

[toc] | [prev] | [next] | [standalone]


#265515

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2024-01-04 19:10 +0100
Message-ID<HSAkh-NwW-1@gated-at.bofh.it>
In reply to#265452
On Wed 03 Jan 2024 at 22:00:20 (+0100), Richard Rosner wrote:
> On 03.01.24 21:04, Eddie wrote:
> > On 1/3/24 14:23, Richard Rosner wrote:
> > > So, since for whatever reason Grub seems to be broken beyond
> > > repair, I today tried to just replace it with rEFInd.
> > > Installation succeeded without any trouble. But when I start
> > > my system, rEFInd just asks me if I want to boot with fwupd or
> > > with the still very broken Grub. Am I missing something? Is
> > > rEFInd really just something to select between different OSs
> > > (and not just different distributions like Grub can very well
> > > do) and then gives the rest over to their bootloaders or am I
> > > missing something so rEFInd will take over all of Grubs jobs?
> > 
> > I have had very good results using "Boot-Repair" software to
> > recover Grub difficulties.
> > 
> Thanks, this actually did the job. I don't know what it was, but my
> guess is it was the step "purge Grub before reinstalling it".
> 
> 
> PS: rewrote to the old subject, as this is clearly an answer to the
> original problem, as it doesn't have anything to do with replacing
> Grub all together.

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?

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#265516

FromRichard Rosner <richard@rosner-online.de>
Date2024-01-04 20:00 +0100
Message-ID<HSB6F-NMa-1@gated-at.bofh.it>
In reply to#265515

[Multipart message — attachments visible in raw view] — view raw

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?
>
> Cheers,
> David.
>
Let's hope the mailing list let's this go through.


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.


#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
   set have_grubenv=true
   load_env
fi
if [ "${next_entry}" ] ; then
    set default="${next_entry}"
    set next_entry=
    save_env next_entry
    set boot_once=true
else
    set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
   menuentry_id_option="--id"
else
   menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
   set saved_entry="${prev_saved_entry}"
   save_env saved_entry
   set prev_saved_entry=
   save_env prev_saved_entry
   set boot_once=true
fi

function savedefault {
   if [ -z "${boot_once}" ]; then
     saved_entry="${chosen}"
     save_env saved_entry
   fi
}
function load_video {
   if [ x$feature_all_video_module = xy ]; then
     insmod all_video
   else
     insmod efi_gop
     insmod efi_uga
     insmod ieee1275_fb
     insmod vbe
     insmod vga
     insmod video_bochs
     insmod video_cirrus
   fi
}

if loadfont unicode ; then
   set gfxmode=auto
   load_video
   insmod gfxterm
   set locale_dir=$prefix/locale
   set lang=en_US
   insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
   set timeout=30
else
   if [ x$feature_timeout_style = xy ] ; then
     set timeout_style=menu
     set timeout=5
   # Fallback normal timeout code in case the timeout_style feature is
   # unavailable.
   else
     set timeout=5
   fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_gpt
insmod cryptodisk
insmod luks2
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
set root='cryptouuid/<root-partition-UUID>'
if [ x$feature_platform_search_hint = xy ]; then
   search --no-floppy --fs-uuid --set=root 
--hint='cryptouuid/<root-partition-UUID>' <root-partition-UUID2>
else
   search --no-floppy --fs-uuid --set=root <root-partition-UUID2>
fi
insmod png
if background_image /boot/grub/.background_cache.png; then
   set color_normal=white/black
   set color_highlight=black/white
else
   set menu_color_normal=cyan/blue
   set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
     set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class 
gnu --class os $menuentry_id_option 
'gnulinux-simple-<root-partition-UUID2>' {
     load_video
     insmod gzio
     if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
     insmod part_gpt
     insmod cryptodisk
     insmod luks2
     insmod gcry_rijndael
     insmod gcry_rijndael
     insmod gcry_sha256
     insmod ext2
     set root='cryptouuid/<root-partition-UUID>'
     if [ x$feature_platform_search_hint = xy ]; then
       search --no-floppy --fs-uuid --set=root 
--hint='cryptouuid/<root-partition-UUID>' <root-partition-UUID2>
     else
       search --no-floppy --fs-uuid --set=root <root-partition-UUID2>
     fi
     echo    'Loading Linux 6.5.0-5-amd64 ...'
     linux    /boot/vmlinuz-6.5.0-5-amd64 
root=UUID=<root-partition-UUID2> ro  quiet
     echo    'Loading initial ramdisk ...'
     initrd    /boot/initrd.img-6.5.0-5-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 
'gnulinux-advanced-<root-partition-UUID2>' {
     menuentry 'Debian GNU/Linux, with Linux 6.5.0-5-amd64' --class 
debian --class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-6.5.0-5-amd64-advanced-<root-partition-UUID2>' {
         load_video
         insmod gzio
         if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
         insmod part_gpt
         insmod cryptodisk
         insmod luks2
         insmod gcry_rijndael
         insmod gcry_rijndael
         insmod gcry_sha256
         insmod ext2
         set root='cryptouuid/<root-partition-UUID>'
         if [ x$feature_platform_search_hint = xy ]; then
           search --no-floppy --fs-uuid --set=root 
--hint='cryptouuid/<root-partition-UUID>' <root-partition-UUID2>
         else
           search --no-floppy --fs-uuid --set=root <root-partition-UUID2>
         fi
         echo    'Loading Linux 6.5.0-5-amd64 ...'
         linux    /boot/vmlinuz-6.5.0-5-amd64 
root=UUID=<root-partition-UUID2> ro  quiet
         echo    'Loading initial ramdisk ...'
         initrd    /boot/initrd.img-6.5.0-5-amd64
     }
     menuentry 'Debian GNU/Linux, with Linux 6.5.0-5-amd64 (recovery 
mode)' --class debian --class gnu-linux --class gnu --class os 
$menuentry_id_option 
'gnulinux-6.5.0-5-amd64-recovery-<root-partition-UUID2>' {
         load_video
         insmod gzio
         if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
         insmod part_gpt
         insmod cryptodisk
         insmod luks2
         insmod gcry_rijndael
         insmod gcry_rijndael
         insmod gcry_sha256
         insmod ext2
         set root='cryptouuid/<root-partition-UUID>'
         if [ x$feature_platform_search_hint = xy ]; then
           search --no-floppy --fs-uuid --set=root 
--hint='cryptouuid/<root-partition-UUID>' <root-partition-UUID2>
         else
           search --no-floppy --fs-uuid --set=root <root-partition-UUID2>
         fi
         echo    'Loading Linux 6.5.0-5-amd64 ...'
         linux    /boot/vmlinuz-6.5.0-5-amd64 
root=UUID=<root-partition-UUID2> ro single
         echo    'Loading initial ramdisk ...'
         initrd    /boot/initrd.img-6.5.0-5-amd64
     }
     menuentry 'Debian GNU/Linux, with Linux 6.5.0-4-amd64' --class 
debian --class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-6.5.0-4-amd64-advanced-<root-partition-UUID2>' {
         load_video
         insmod gzio
         if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
         insmod part_gpt
         insmod cryptodisk
         insmod luks2
         insmod gcry_rijndael
         insmod gcry_rijndael
         insmod gcry_sha256
         insmod ext2
         set root='cryptouuid/<root-partition-UUID>'
         if [ x$feature_platform_search_hint = xy ]; then
           search --no-floppy --fs-uuid --set=root 
--hint='cryptouuid/<root-partition-UUID>' <root-partition-UUID2>
         else
           search --no-floppy --fs-uuid --set=root <root-partition-UUID2>
         fi
         echo    'Loading Linux 6.5.0-4-amd64 ...'
         linux    /boot/vmlinuz-6.5.0-4-amd64 
root=UUID=<root-partition-UUID2> ro  quiet
         echo    'Loading initial ramdisk ...'
         initrd    /boot/initrd.img-6.5.0-4-amd64
     }
     menuentry 'Debian GNU/Linux, with Linux 6.5.0-4-amd64 (recovery 
mode)' --class debian --class gnu-linux --class gnu --class os 
$menuentry_id_option 
'gnulinux-6.5.0-4-amd64-recovery-<root-partition-UUID2>' {
         load_video
         insmod gzio
         if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
         insmod part_gpt
         insmod cryptodisk
         insmod luks2
         insmod gcry_rijndael
         insmod gcry_rijndael
         insmod gcry_sha256
         insmod ext2
         set root='cryptouuid/<root-partition-UUID>'
         if [ x$feature_platform_search_hint = xy ]; then
           search --no-floppy --fs-uuid --set=root 
--hint='cryptouuid/<root-partition-UUID>' <root-partition-UUID2>
         else
           search --no-floppy --fs-uuid --set=root <root-partition-UUID2>
         fi
         echo    'Loading Linux 6.5.0-4-amd64 ...'
         linux    /boot/vmlinuz-6.5.0-4-amd64 
root=UUID=<root-partition-UUID2> ro single
         echo    'Loading initial ramdisk ...'
         initrd    /boot/initrd.img-6.5.0-4-amd64
     }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
     fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
   source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
   source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

[toc] | [prev] | [next] | [standalone]


#265612

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2024-01-07 18:10 +0100
Message-ID<HTEOR-1uec-9@gated-at.bofh.it>
In reply to#265516
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.

[toc] | [prev] | [next] | [standalone]


#265615

FromRichard Rosner <richard@rosner-online.de>
Date2024-01-07 19:00 +0100
Message-ID<HTFBf-1uun-7@gated-at.bofh.it>
In reply to#265612

[Multipart message — attachments visible in raw view] — view raw

On 07.01.24 18:07, David Wright wrote:
> 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.)

There was always only one prompt for the passphrase when boot was 
working on its own. Only if you had to manually decrypt all partitions, 
you'd need to enter it for every encrypted partition there is — probably 
because you don't necessarily need to have the same password for 
everything. There might be an option to have it reuse the key, but I 
have yet to find that.

Also, that the cryptomount lines are missing must be why Grub was still 
a bit unreliable. I'll write my current grub.cfg in a separate message, 
as they are back now after some experiments with rEFInd, systemd-boot 
and trying to get resume from hibernation to work reliably.

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

Well, that bunch of text is necessary, since grub has to communicate the 
location of the root and the swap partitions to the kernel, so of course 
they are automatically included in the default/grub. The last one there 
is just a little fix for better handling very old Synaptic touchpads in 
Wayland.

In my current grub.cfg the multiple root= entries in one line seem to be 
gone, but there are still multiple single in the recovery parts.

> 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.
Just shows how hopelessly outdated Grub is and that it sorely needs a 
replacement — and a better experience in replacing it. Grub 2.12 was 
just released in December. On the other hand, LUKS was originally 
released in 2004, LUKS2 followed in 2018 and became the default with 
cryptsetup 2.1.0 in early 2019 — though Debian seems to ignore that, 
since the installer still by default creates LUKS1 volumes. Also, by 
default, LUKS2 uses Argon2 key derivation function — unsupported even by 
Grub 2.12. All this in a time when smartphones have been encrypted for 
years by default, so have MacBooks and even Windows is slowing making it 
a default. Not to mention the fact that Linux distributions are offering 
encryption in their installers for many years now, with a few even 
making it a default, like Pop.

[toc] | [prev] | [next] | [standalone]


#265616

FromRichard Rosner <richard@rosner-online.de>
Date2024-01-07 19:00 +0100
Message-ID<HTFBf-1uun-9@gated-at.bofh.it>
In reply to#265516

[Multipart message — attachments visible in raw view] — view raw

On 04.01.24 19:49, 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?
>>
>> Cheers,
>> David.
>>
> Let's hope the mailing list let's this go through.
>
It did, but since it seems to have been malformed yet again, let's try 
again.
>
> Keep in mind, this is based on the assumption that your whole / 
> partition is LUKS encrypted (in my case now LUKS2). "root partition 
> UUID1" 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.
>
Adding to that, "root partition UUID1.1" is basically the same as  
UUID1.1, just without dashes. So it's the same format as Grub shows for 
the ususal bootup password prompt. Let's hope this time this is the 
right one.

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
   set have_grubenv=true
   load_env
fi
if [ "${next_entry}" ] ; then
    set default="${next_entry}"
    set next_entry=
    save_env next_entry
    set boot_once=true
else
    set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
   menuentry_id_option="--id"
else
   menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
   set saved_entry="${prev_saved_entry}"
   save_env saved_entry
   set prev_saved_entry=
   save_env prev_saved_entry
   set boot_once=true
fi

function savedefault {
   if [ -z "${boot_once}" ]; then
     saved_entry="${chosen}"
     save_env saved_entry
   fi
}
function load_video {
   if [ x$feature_all_video_module = xy ]; then
     insmod all_video
   else
     insmod efi_gop
     insmod efi_uga
     insmod ieee1275_fb
     insmod vbe
     insmod vga
     insmod video_bochs
     insmod video_cirrus
   fi
}

if [ x$feature_default_font_path = xy ] ; then
    font=unicode
else
insmod part_gpt
insmod cryptodisk
insmod luks2
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u <root partition UUID1>
set root='cryptouuid/<root partition UUID1.1>'
if [ x$feature_platform_search_hint = xy ]; then
   search --no-floppy --fs-uuid --set=root --hint='cryptouuid/<root 
partition UUID1.1>'  <root partition UUID2>
else
   search --no-floppy --fs-uuid --set=root <root partition UUID2>
fi
     font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
   set gfxmode=auto
   load_video
   insmod gfxterm
   set locale_dir=$prefix/locale
   set lang=en_US
   insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
   set timeout=30
else
   if [ x$feature_timeout_style = xy ] ; then
     set timeout_style=menu
     set timeout=5
   # Fallback normal timeout code in case the timeout_style feature is
   # unavailable.
   else
     set timeout=5
   fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_gpt
insmod cryptodisk
insmod luks2
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u <root partition UUID1>
set root='cryptouuid/<root partition UUID1.1>'
if [ x$feature_platform_search_hint = xy ]; then
   search --no-floppy --fs-uuid --set=root --hint='cryptouuid/<root 
partition UUID1.1>'  <root partition UUID2>
else
   search --no-floppy --fs-uuid --set=root <root partition UUID2>
fi
insmod png
if background_image 
/usr/share/desktop-base/emerald-theme/grub/grub-4x3.png; then
   set color_normal=white/black
   set color_highlight=black/white
else
   set menu_color_normal=cyan/blue
   set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
     set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class 
gnu --class os $menuentry_id_option 'gnulinux-simple-<root partition 
UUID2>' {
     load_video
     insmod gzio
     if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
     insmod part_gpt
     insmod cryptodisk
     insmod luks2
     insmod gcry_rijndael
     insmod gcry_rijndael
     insmod gcry_sha256
     insmod ext2
     cryptomount -u <root partition UUID1>
     set root='cryptouuid/<root partition UUID1.1>'
     if [ x$feature_platform_search_hint = xy ]; then
       search --no-floppy --fs-uuid --set=root --hint='cryptouuid/<root 
partition UUID1.1>'  <root partition UUID2>
     else
       search --no-floppy --fs-uuid --set=root <root partition UUID2>
     fi
     echo    'Loading Linux 6.5.0-5-amd64 ...'
     linux    /boot/vmlinuz-6.5.0-5-amd64 root=UUID=<root partition 
UUID2> ro  quiet root=/dev/mapper/luks-<root partition UUID1> splash 
resume=/dev/mapper/luks-<swap partition UUID1>
     echo    'Loading initial ramdisk ...'
     initrd    /boot/initrd.img-6.5.0-5-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 
'gnulinux-advanced-<root partition UUID2>' {
     menuentry 'Debian GNU/Linux, with Linux 6.5.0-5-amd64' --class 
debian --class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-6.5.0-5-amd64-advanced-<root partition UUID2>' {
         load_video
         insmod gzio
         if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
         insmod part_gpt
         insmod cryptodisk
         insmod luks2
         insmod gcry_rijndael
         insmod gcry_rijndael
         insmod gcry_sha256
         insmod ext2
         cryptomount -u <root partition UUID1>
         set root='cryptouuid/<root partition UUID1.1>'
         if [ x$feature_platform_search_hint = xy ]; then
           search --no-floppy --fs-uuid --set=root 
--hint='cryptouuid/<root partition UUID1.1>'  <root partition UUID2>
         else
           search --no-floppy --fs-uuid --set=root <root partition UUID2>
         fi
         echo    'Loading Linux 6.5.0-5-amd64 ...'
         linux    /boot/vmlinuz-6.5.0-5-amd64 root=UUID=<root partition 
UUID2> ro  quiet root=/dev/mapper/luks-<root partition UUID1> splash 
resume=/dev/mapper/luks-<swap partition UUID1>
         echo    'Loading initial ramdisk ...'
         initrd    /boot/initrd.img-6.5.0-5-amd64
     }
     menuentry 'Debian GNU/Linux, with Linux 6.5.0-5-amd64 (recovery 
mode)' --class debian --class gnu-linux --class gnu --class os 
$menuentry_id_option 'gnulinux-6.5.0-5-amd64-recovery-<root partition 
UUID2>' {
         load_video
         insmod gzio
         if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
         insmod part_gpt
         insmod cryptodisk
         insmod luks2
         insmod gcry_rijndael
         insmod gcry_rijndael
         insmod gcry_sha256
         insmod ext2
         cryptomount -u <root partition UUID1>
         set root='cryptouuid/<root partition UUID1.1>'
         if [ x$feature_platform_search_hint = xy ]; then
           search --no-floppy --fs-uuid --set=root 
--hint='cryptouuid/<root partition UUID1.1>'  <root partition UUID2>
         else
           search --no-floppy --fs-uuid --set=root <root partition UUID2>
         fi
         echo    'Loading Linux 6.5.0-5-amd64 ...'
         linux    /boot/vmlinuz-6.5.0-5-amd64 root=UUID=<root partition 
UUID2> ro single single dis_ucode_ldr
         echo    'Loading initial ramdisk ...'
         initrd    /boot/initrd.img-6.5.0-5-amd64
     }
     menuentry 'Debian GNU/Linux, with Linux 6.5.0-4-amd64' --class 
debian --class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-6.5.0-4-amd64-advanced-<root partition UUID2>' {
         load_video
         insmod gzio
         if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
         insmod part_gpt
         insmod cryptodisk
         insmod luks2
         insmod gcry_rijndael
         insmod gcry_rijndael
         insmod gcry_sha256
         insmod ext2
         cryptomount -u <root partition UUID1>
         set root='cryptouuid/<root partition UUID1.1>'
         if [ x$feature_platform_search_hint = xy ]; then
           search --no-floppy --fs-uuid --set=root 
--hint='cryptouuid/<root partition UUID1.1>'  <root partition UUID2>
         else
           search --no-floppy --fs-uuid --set=root <root partition UUID2>
         fi
         echo    'Loading Linux 6.5.0-4-amd64 ...'
         linux    /boot/vmlinuz-6.5.0-4-amd64 root=UUID=<root partition 
UUID2> ro  quiet root=/dev/mapper/luks-<root partition UUID1> splash 
resume=/dev/mapper/luks-<swap partition UUID1>
         echo    'Loading initial ramdisk ...'
         initrd    /boot/initrd.img-6.5.0-4-amd64
     }
     menuentry 'Debian GNU/Linux, with Linux 6.5.0-4-amd64 (recovery 
mode)' --class debian --class gnu-linux --class gnu --class os 
$menuentry_id_option 'gnulinux-6.5.0-4-amd64-recovery-<root partition 
UUID2>' {
         load_video
         insmod gzio
         if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
         insmod part_gpt
         insmod cryptodisk
         insmod luks2
         insmod gcry_rijndael
         insmod gcry_rijndael
         insmod gcry_sha256
         insmod ext2
         cryptomount -u <root partition UUID1>
         set root='cryptouuid/<root partition UUID1.1>'
         if [ x$feature_platform_search_hint = xy ]; then
           search --no-floppy --fs-uuid --set=root 
--hint='cryptouuid/<root partition UUID1.1>'  <root partition UUID2>
         else
           search --no-floppy --fs-uuid --set=root <root partition UUID2>
         fi
         echo    'Loading Linux 6.5.0-4-amd64 ...'
         linux    /boot/vmlinuz-6.5.0-4-amd64 root=UUID=<root partition 
UUID2> ro single single dis_ucode_ldr
         echo    'Loading initial ramdisk ...'
         initrd    /boot/initrd.img-6.5.0-4-amd64
     }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/25_bli ###
if [ "$grub_platform" = "efi" ]; then
   insmod bli
fi
### END /etc/grub.d/25_bli ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
if [ "$grub_platform" = "efi" ]; then
     fwsetup --is-supported
     if [ "$?" = 0 ]; then
         menuentry 'UEFI Firmware Settings' $menuentry_id_option 
'uefi-firmware' {
             fwsetup
         }
     fi
fi
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
   source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
   source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

[toc] | [prev] | [next] | [standalone]


#265479 — Re: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd after updates on Testing]

FromJeffrey Walton <noloader@gmail.com>
Date2024-01-04 02:20 +0100
SubjectRe: Replace Grub with rEFInd [WAS Possibly broken Grub or initrd after updates on Testing]
Message-ID<HSkyS-CB7-3@gated-at.bofh.it>
In reply to#265449
On Wed, Jan 3, 2024 at 2:24 PM Richard Rosner <richard@rosner-online.de> wrote:
>
> So, since for whatever reason Grub seems to be broken beyond repair,

I seriously doubt this is the case. I'm guessing the problem lies elsewhere.

> I today tried to just replace it with rEFInd. Installation succeeded without any trouble. But when I start my system, rEFInd just asks me if I want to boot with fwupd or with the still very broken Grub. Am I missing something? Is rEFInd really just something to select between different OSs (and not just different distributions like Grub can very well do) and then gives the rest over to their bootloaders or am I missing something so rEFInd will take over all of Grubs jobs?

The rEFInd website is at <https://www.rodsbooks.com/refind/>. I'm
guessing you have not taken time to read about it based on your
questions.

Jeff

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.debian.user


csiph-web