Ask Your Question
0

Syntax error in grub.cfg

asked 2013-04-14 05:39:24 -0500

Froggy gravatar image

updated 2013-04-14 06:09:23 -0500

After a bunch of kernel updates I wanted to get rid of the old boot entries in the grub menu following the procedure under the fedora's grub wiki. I never edited any of the grub files manually, so this should not be a problem. Thing is that I got an error message during generating grub.cfg using grub2-mkconfig. It goes like this:

Generating grub.cfg ...
Found theme: /boot/grub2/themes/system/theme.txt
Found linux image: /boot/vmlinuz-3.8.6-203.fc18.i686
Found initrd image: /boot/initramfs-3.8.6-203.fc18.i686.img
Found linux image: /boot/vmlinuz-3.8.5-201.fc18.i686
Found initrd image: /boot/initramfs-3.8.5-201.fc18.i686.img
Found linux image: /boot/vmlinuz-3.8.4-202.fc18.i686
Found initrd image: /boot/initramfs-3.8.4-202.fc18.i686.img
Found Microsoft Windows XP Professional - magyar on /dev/sdb1
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 170
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 /boot/grub2/grub.cfg.new file attached.done

Line 170 seems to be a submenu with no relevant contents, but I'm no expert to see if there is something wrong there. This is the part starting with line 170:

submenu "tboot 1.7.0" {
}
### END /etc/grub.d/20_linux_tboot ###
...

Any ideas out there how to tackle this? Maybe reinstall grub with grub2-install?

edit retag flag offensive close merge delete

Comments

That page has nothing about removing old entries. Can you please update the description with what you changed exactly? Reinstalling the grub package and then running sudo grub2-install /dev/sda; sudo grub2-mkconfig -o /boot/grub2/grub.cfg doesn't fix it?

FranciscoD_ gravatar imageFranciscoD_ ( 2013-04-14 07:58:48 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-04-14 08:39:42 -0500

Froggy gravatar image

updated 2013-04-14 08:42:05 -0500

Okay, I got a bad habit to keep Windows as the default entry, this is why I'm keep using the commands under the respective section of the linked wiki page, because this removes old entries too... The only thing I did was yum update and grub2-mkconfig -o /boot/grub2/grub.cfg.

edit flag offensive delete link more

Comments

So, yum update and grub2-mkconfig... fixed it? (This is marked as the answer to this question)

FranciscoD_ gravatar imageFranciscoD_ ( 2013-04-14 22:33:17 -0500 )edit

Sorry for the late answer, I was away from my home for a good while. grub2-mkconfig was generating the updated grub.cfg, I copied the output into my first post. So running grub2-mkconfig... did not fix the problem, instead it is the one complaining about the syntax error.

Froggy gravatar imageFroggy ( 2013-04-20 05:11:03 -0500 )edit

I found the solution in a bug report: install a tboot fix.https://bugzilla.redhat.com/show_bug.cgi?id=929384

Froggy gravatar imageFroggy ( 2013-04-27 02:17:26 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-04-14 05:39:24 -0500

Seen: 1,909 times

Last updated: Apr 14 '13