grub-netboot.cfg does not load $prefix/$platform/grub.cfg

Bug #1981378 reported by Michael Hudson-Doyle
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

grub-netboot.cfg (the config that is embedded in grubnetx64.efi / grubnetaa64.efi looks like this:

cat >"$workdir/grub-netboot.cfg" <<EOF
if [ -e \$prefix/$platform/grub.cfg ]; then
 source \$prefix/$platform/grub.cfg
else
 source \$prefix/grub.cfg
fi
EOF

This looks like the intent is to load e.g. grub/x86_64-efi/grub.cfg off your tftp or http server if it exists and if not fall back to grub/grub.cfg. But this doesn't work: -e never returns true for a network path afaict and so grub always tries to load grub/grub.cfg instead.

I first thought that this was expected / by design but on reading the patches we carry to grub I'm not completely sure and maybe this is a bug in grub rather than a pointer that writing the config like this is pointless. But the config definitely doesn't work as expected.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.