Created attachment 193176 [details] grub2 says "please file a bug report with /mnt/boot/grub.new file attached" Script started on Tue May 8 09:46:18 2018 root@grub2:~ # grub-mkconfig -o /mnt/boot/grub/grub.cfg Generating grub.cfg ... Found kernel of FreeBSD: /boot/kernel/kernel Found kernel module directory: /boot/kernel error: syntax error. error: Incorrect command. error: syntax error. Syntax error at line 67 Syntax errors are detected in generated GRUB config file. Ensure that there are no errors in /etc/default/grub and /etc/grub.d/* files or please file a bug report with /mnt/boot/grub.new file attached.done root@grub2:~ # Script done on Tue May 8 09:51:46 2018 grub2 says "please file a bug report with /mnt/boot/grub.new file attached" and I comply.
tinsmod part_gpt tinsmod ufs2 tif [ x$feature_platform_search_hint = xy ]; then t search --no-floppy --fs-uuid --set=root 5af030d15d17915d telse t search --no-floppy --fs-uuid --set=root 5af030d15d17915d tfi The 't's in the first column here are wrong. It sounds like it's related to bug #229925. grub-mkconfig and helpers use things like sed -e "s/^/\t/" which only really work as intended with gsed.
(In reply to Tobias Kortkamp from comment #1) I don't know that my input is requested/necessary, but your diagnosis is correct and this would have eventually been snared by the work done in PR 229925, though post-mortem if it's really only runtime breakage. For what it's worth, teaching sed these escape sequences is high on my priority list after that exp-run. Forcing this to gsed will likely not be needed for more than 3-6 months.
(In reply to Kyle Evans from comment #2) > I don't know that my input is requested/necessary, but your diagnosis is > correct and this would have eventually been snared by the work done in PR > 229925, though post-mortem if it's really only runtime breakage. Thanks. Additional input to confirm/refute something is always welcomed. :-) > For what it's worth, teaching sed these escape sequences is high on my > priority list after that exp-run. Forcing this to gsed will likely not be > needed for more than 3-6 months. The port is slated for removal in about a month, so I'll try to switch it over to gsed for the remainder of its life.
A commit references this bug: Author: tobik Date: Fri Dec 28 08:22:31 UTC 2018 New revision: 488585 URL: https://svnweb.freebsd.org/changeset/ports/488585 Log: sysutils/grub2: Fix grub-mkconfig Currently grub-mkconfig creates a bogus grub.cfg with lines like tinsmod part_gpt tinsmod ufs2 grub-mkconfig and helpers use sed expressions like "s/^/\t/" or similar to indent grub.cfg with tabs which only really work as intended with gsed at the moment and currently just prefixes lines with a 't'. Switch grub-mkconfig and other scripts over to gsed. help2man calls some scripts at build time, so add gsed as a build dependency too. PR: 228062 Reported by: vas@mpeks.tomsk.su Changes: head/sysutils/grub2/Makefile
(In reply to Tobias Kortkamp from comment #3) > The port is slated for removal in about a month Which port is slated for removal? sysutils/grub2 ? What will it be replaced by?
(In reply to vas from comment #5) > (In reply to Tobias Kortkamp from comment #3) > > The port is slated for removal in about a month > > Which port is slated for removal? sysutils/grub2 ? Yes...