help-grub
[Top][All Lists]
Advanced

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

Re: Handle errors when booting


From: Andrei Borzenkov
Subject: Re: Handle errors when booting
Date: Mon, 29 Jan 2024 16:32:44 +0300

On Mon, Jan 29, 2024 at 2:57 PM Mathias Radtke <m.radtke@uib.de> wrote:
>
> Hi
>
>
>
>
> > Is there any way to kind of work around that error and run an "exit" 
> > command if an error occours?
> >
>
> What is the exit code of chainloader command? If it is non-zero, you
> can check for it and do something else instead of boot.
>
> Could you provide an example of such a check?

if chainloader bla-bla-bla ; then
  boot
else
  echo chainloader failed
fi

> Like if in my example the chainloader returns anything that is not zero, then 
> exit from grub.
>
> Thank you



reply via email to

[Prev in Thread] Current Thread [Next in Thread]