Re: GRUB command-line with timeout
On Fri, 2 Jul 2021 at 06:47, David Wright <deblis@lionunicorn.co.uk> wrote:
> On Thu 01 Jul 2021 at 20:39:48 (+0100), Brian wrote:
> > On Thu 01 Jul 2021 at 20:08:40 +0200, Steve Keller wrote:
> > > When booting with GRUB, normally the menu showing several kernel
> > > versions and/or kernel command lines appears to choose from. If no
> > > selection is made within a few seconds (default is 5s IIRC), the
> > > default entry is booted.
> > > I'd prefer to be dropped into the GRUB command line instead of that
> > > menu. But still I'd like to have the timeout after which a default
> > > entry is boot if no command is entered at the prompt.
> > You want GRUB's normal operation but, at the same time, you want GRUB
> > to fail?
> > The use case is interesting. Perhaps you could explain.
> > > Can that be configured in GRUB?
> > Only with great difficulty.
I wonder how you think this might be achieved, because I can't
imagine any way to do this, short of patching and rebuilding grub.
Which is not what I think of as "configured" :)
Because I'd imagine that the timeout is part of the menu-key
handling code, which is unlikely to have anything to do with the
interactive-prompt key handling and parsing code.
> I agree. My (untested) partial solution still requires you to press C
> to get the Grub prompt.
I'm not able to find any means to access the parent grub prompt
that does not require a keypress ("press a key to continue" appears
after various intentional failure experiments).
It is possible to activate a nested grub prompt via a menuentry like:
menuentry "grub prompt" {
normal a_filename_that_does_not_exist
}
Which could automatically activate after a time delay. However that
is the opposite of what the OP wants.
And I can't understand why anybody would want that behaviour
anyway. One would be thinking that they've been dropped into
the interactive-prompt because of a failure, and without any
warning the system actually boots out of there? Ugh.
So, it's a "no" from me :)
Reply to: