[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Grub.cfg help request
From: |
Andrei Borzenkov |
Subject: |
Re: Grub.cfg help request |
Date: |
Sun, 5 Mar 2023 08:56:38 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 |
On 05.03.2023 00:26, shelly16@posteo.de wrote:
hello
I've been trying to write a grub.cfg that does what I want, without
having to patch the source code but I don't think it's doable.
Can you advise ?
here is the synopsis:
if shift not pressed
There is no generic way to do it. As extreme example - with serial
terminal there is simply no way to query SHIFT (or any other modifier)
state. On UEFI support for querying modifiers state was added relatively
recently and as far as I can tell it is still incomplete and may not
work. Other platforms may have similar limitations.
try
find a luks2 partition named foobar on the sata bus
mount it (ask for the passphrase)
load mygrub.cfg from this partition
boot the default boot option
endtry
endif
display a password protected menu
This all is fairly normal grub.cfg code.
- boot seabios
- boot tianocore
I am not sure I understand it; if you are in grub, you are already past
the BIOS, so what "boot BIOS" means exactly?
- grub command line
Not sure if there is any command to do it. Usually grub switches to
command line when you press ESC in menu.
do you see something not doable by a grub.cfg ?