Dear all,
I am writing a grub config file to search boot loader for uEFI for
network booting. This is the content:

menuentry "Local operating system" --id local-disk {
  echo "Trying to boot from local disk..."
  if search --no-floppy --file --set=root /EFI/redhat/grub.efi; then
    chainloader /EFI/redhat/grub.efi +1
  elif search --no-floppy --file --set=root /EFI/Boot/bootx64.efi; then
        chainloader /EFI/Boot/bootx64.efi +1
  else
    echo "No uEFI image was found!"
    sleep 15
  fi
}

However, I'd like to suppress the error messages about search command.
Is any option I can use so that search command won't show error messages
when the file is not found, i.e., I'd like to suppress these error messages:
error: no such device: /EFI/redhat/grub.efi.
error: no such device: /EFI/Boot/bootx64.efi
Thank you very much.

Steven

-- 
Steven Shiau <steven _at_ stevenshiau org>
Public Key Server PGP Key ID: 4096R/163E3FB0
Fingerprint: EB1D D5BF 6F88 820B BCF5  356C 8E94 C9CD 163E 3FB0


_______________________________________________
Help-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-grub

Reply via email to