[Bug 1981378] [NEW] grub-netboot.cfg does not load $prefix/$platform/grub.cfg
Michael Hudson-Doyle
1981378 at bugs.launchpad.net
Mon Jul 11 22:17:55 UTC 2022
Public bug reported:
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.
** Affects: grub2 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1981378
Title:
grub-netboot.cfg does not load $prefix/$platform/grub.cfg
Status in grub2 package in Ubuntu:
New
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 manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1981378/+subscriptions
More information about the foundations-bugs
mailing list