AW: Handle errors when booting

2024-01-29 Thread Mathias Radtke
Hi > At grub prompt (grub>) print output of > > search -f /efi/microsoft/boot/bootmgfw.efi > echo $grub_platform There is      if [ "$grub_platform" = "efi" ]; then before the mentioned code segment to only allow this search on EFI devices Regards Mathias

Re: Handle errors when booting

2024-01-29 Thread Goh Lip
On 29/01/2024 19:14, Mathias Radtke wrote: Hi, I currently have a little headache with an issue. I have a device that gets the following part of grub.cfg     search --no-floppy --file --set=bootable_efi /EFI/MICROSOFT/BOOT/BOOTMGFW.EFI     if [ -n "${bootable_efi}" ]; then        

Re: Handle errors when booting

2024-01-29 Thread Andrei Borzenkov
On Mon, Jan 29, 2024 at 2:57 PM Mathias Radtke 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

AW: Handle errors when booting

2024-01-29 Thread Mathias Radtke
Hi Upstream efi/chainloader.c does not have 733 lines nor does it care about $root at all. You are probably using vendor patched grub, in which case you better direct this question to your vendor support channels. The code source is 

AW: Handle errors when booting

2024-01-29 Thread Mathias Radtke
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? Like if in my

Re: Handle errors when booting

2024-01-29 Thread Andrei Borzenkov
On Mon, Jan 29, 2024 at 2:15 PM Mathias Radtke wrote: > > Hi, > > I currently have a little headache with an issue. > I have a device that gets the following part of grub.cfg > > > search --no-floppy --file --set=bootable_efi > /EFI/MICROSOFT/BOOT/BOOTMGFW.EFI > > if [ -n

Handle errors when booting

2024-01-29 Thread Mathias Radtke
Hi, I currently have a little headache with an issue. I have a device that gets the following part of grub.cfg     search --no-floppy --file --set=bootable_efi /EFI/MICROSOFT/BOOT/BOOTMGFW.EFI     if [ -n "${bootable_efi}" ]; then         menuentry "Local Disk" --class unknown {