You are not logged in.

#1 2013-12-06 22:56:45

tumas
Member
Registered: 2012-02-08
Posts: 89

[solved] Grub Update gives Syntax error

The new update of grub brings the following error when running grub-mkconfig:

error: out of memory
error: syntax error
error: Incorrect command
Syntax error in line 164

So i looked for line 164, which is:

### END /etc/grub.d/60_memtest86+ ###

The same line was also present in my older grub config, so i have no idea what is wrong.

I am using btrfs for my whole system, but that shouldnt be the Problem.

What i also noticed: When i force the system to use the grub.cfg.new file, i have now 3 entries to boot, instead of two. Standard, fallback and a new entry called "Arch Linux" which is identical to the standard entry.

Edit: Fixed by adding:

# fix broken grub.cfg gen
GRUB_DISABLE_SUBMENU=y

in the /etc/default/grub file.

Last edited by tumas (2013-12-09 17:17:40)

Offline

#2 2013-12-06 23:01:06

tumas
Member
Registered: 2012-02-08
Posts: 89

Re: [solved] Grub Update gives Syntax error

OK i just found: https://bugs.archlinux.org/task/38041?p … tring=grub

Guess this is going to solve the problem.

Last edited by tumas (2013-12-09 17:16:31)

Offline

#3 2013-12-07 12:45:07

derJupp
Member
Registered: 2013-09-21
Posts: 1

Re: [solved] Grub Update gives Syntax error

thx tumas ,
now grub well done :-)

Offline

#4 2013-12-07 17:42:08

Rob_H
Member
Registered: 2012-06-19
Posts: 60

Re: [solved] Grub Update gives Syntax error

This seems like the kind of thing that should be in the Arch News feed. There was no indication in the pacman log that the grub upgrade was going to break things without this change. :-(

Offline

#5 2013-12-07 18:13:11

Potomac
Member
Registered: 2011-12-25
Posts: 481

Re: [solved] Grub Update gives Syntax error

Today  I did a "pacman -Syu" and grub package was updated :

grub-2.00.5086-1 ---> grub 1:2.00.1282.g5ae5c54-1

so I run 2 scripts in order to reinstall grub and update configs files :

- grub-install --recheck /dev/sdc
output : "Installation finished. No error reported."

then I want to regenerate the grub.cfg file :

grub-mkconfig -o /boot/grub/grub.cfg

and I see errors messages :

Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 194
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/grub/grub.cfg.new file attached.done

so it's seems that grub package has a problem, something is wrong with the file grub-mkconfig

my system: archlinux 64 bits
4 Gb ram

Steps to Reproduce:
- you must have already a grub installation ( package grub-2.00.5086-1 )
- then do a "pacman -Syu" in order to have the last grub package ( grub 1:2.00.1282.g5ae5c54-1 )
- reinstall grub ( grub-install --recheck /dev/sdX )
- regenerate the gruf.cfg file ( grub-mkconfig -o /boot/grub/grub.cfg )
- error messages will be displayed

Offline

#6 2013-12-07 18:15:40

ppsalama
Member
From: Spain
Registered: 2012-01-29
Posts: 83

Re: [solved] Grub Update gives Syntax error

Offline

#7 2013-12-07 18:30:26

Potomac
Member
Registered: 2011-12-25
Posts: 481

Re: [solved] Grub Update gives Syntax error

ok thanks for the link

Offline

#8 2013-12-07 18:58:53

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,712

Re: [solved] Grub Update gives Syntax error

Merged " [Grub] errors during execution of "grub-mkconfig" from grub" with main thread


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#9 2013-12-08 02:40:24

Khanfluence
Member
Registered: 2013-12-08
Posts: 2

Re: [solved] Grub Update gives Syntax error

This is my first time with Arch Linux, and I'm trying to set up a system as follows:

sda - NTFS storage
sdb - Arch/W8 dual (BIOS, not UEFI)
sdc - ext4 storage

I've cut my boot drive into partitions for W8 and Arch (single root partition) and I've installed Arch following the beginner's guide. However, when I attempt to generate grub.cfg I receive this output (link). When I boot, GRUB lists only Linux and selecting it results in the error "kernel must be loaded before booting".

I'm unsure as to what is happening. AFAIK there is no W8 loader on sdc (I wiped the drive) and Windows should not be hibernating (line 8).

Offline

#10 2013-12-08 05:42:21

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,585
Website

Re: [solved] Grub Update gives Syntax error

Offline

#11 2013-12-08 05:49:20

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 27,970
Website

Re: [solved] Grub Update gives Syntax error

Merging...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#12 2013-12-08 19:06:04

Khanfluence
Member
Registered: 2013-12-08
Posts: 2

Re: [solved] Grub Update gives Syntax error

Much appreciated!

Offline

#13 2013-12-09 10:55:08

slowpoke1584
Member
From: Dallas Texas, US
Registered: 2013-12-01
Posts: 33
Website

Re: [solved] Grub Update gives Syntax error

I'm not certain how useful it is to have a thread that has two links that link back to itself without actually providing information on how to fix the problem.


Registered Linux User #565082

Offline

#14 2013-12-09 11:56:08

Jojonintendo
Member
Registered: 2013-12-06
Posts: 56

Re: [solved] Grub Update gives Syntax error

slowpoke1584 wrote:

I'm not certain how useful it is to have a thread that has two links that link back to itself without actually providing information on how to fix the problem.

I don't know what happened to those links, but the fix is simply to add those line at the end of /etc/default/grub:

# Fix broken grub.cfg gen
GRUB_DISABLE_SUBMENU=y

M/B: Asus M5A97 LE R2.0 CPU: AMD FX(tm)-6100 Six-Core Processor GPU: XFX R9 390 DD Black Edition RAM: Kingston HyperX Beast DDR3 1866 2X4GB SSD: Crucial M4 128GB SATA 3
CPU and GPU are watercooled by Ibercool kit.

Offline

#15 2013-12-09 21:08:53

slowpoke1584
Member
From: Dallas Texas, US
Registered: 2013-12-01
Posts: 33
Website

Re: [solved] Grub Update gives Syntax error

Jojonintendo wrote:
slowpoke1584 wrote:

I'm not certain how useful it is to have a thread that has two links that link back to itself without actually providing information on how to fix the problem.

I don't know what happened to those links, but the fix is simply to add those line at the end of /etc/default/grub:

# Fix broken grub.cfg gen
GRUB_DISABLE_SUBMENU=y

Apreciate it. I can't say how many threads I have seen that were about exactly what I was trying to troubleshoot, marked as solved, and no explanation given as to how.


Registered Linux User #565082

Offline

#16 2013-12-09 21:14:09

Jojonintendo
Member
Registered: 2013-12-06
Posts: 56

Re: [solved] Grub Update gives Syntax error

I was lucky I saw it this morning. I'm glad I could "help" somehow wink


M/B: Asus M5A97 LE R2.0 CPU: AMD FX(tm)-6100 Six-Core Processor GPU: XFX R9 390 DD Black Edition RAM: Kingston HyperX Beast DDR3 1866 2X4GB SSD: Crucial M4 128GB SATA 3
CPU and GPU are watercooled by Ibercool kit.

Offline

#17 2013-12-12 00:16:16

dragonshade
Member
Registered: 2013-12-12
Posts: 1

Re: [solved] Grub Update gives Syntax error

Jojonintendo wrote:
slowpoke1584 wrote:

I'm not certain how useful it is to have a thread that has two links that link back to itself without actually providing information on how to fix the problem.

I don't know what happened to those links, but the fix is simply to add those line at the end of /etc/default/grub:

# Fix broken grub.cfg gen
GRUB_DISABLE_SUBMENU=y

Wow , you just saved me a day. *salute*

Offline

#18 2013-12-23 01:06:32

Cloudane
Member
Registered: 2009-05-04
Posts: 8

Re: [solved] Grub Update gives Syntax error

Thanks!

IMO this sort of thing needs fixing if ever arch is to be taken seriously as a distro. The installation guide is out of date and the config file needs to be correct by default.
The networking guide even still says eth0 even though it's been something like enp0s1 for several months...

Last edited by Cloudane (2013-12-23 01:10:33)

Offline

#19 2013-12-23 01:18:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] Grub Update gives Syntax error

The wiki is a community project. It gets updates and expanded when somebody takes time to edit it.
Sadly, few people do.

Offline

#20 2013-12-24 05:50:04

kevin24
Member
Registered: 2013-07-20
Posts: 9

Re: [solved] Grub Update gives Syntax error

Hi,

New to Arch.

Having the same problem as expected. My question is when and how do I update the /etc/default/grub file. Given that I am in the middle of the installation. Sorry to be a bit dim.
Thanks

Offline

#21 2013-12-24 08:30:26

tumas
Member
Registered: 2012-02-08
Posts: 89

Re: [solved] Grub Update gives Syntax error

kevin24 wrote:

Hi,

New to Arch.

Having the same problem as expected. My question is when and how do I update the /etc/default/grub file. Given that I am in the middle of the installation. Sorry to be a bit dim.
Thanks

Hi and welcome wink

It is probably the best to edit the file right after u installed "grub". During the installation of grub the "/etc/default/grub-file" will already be created. After u changed the file, u should run "grub-mkconfig -o /boot/grub/grub.cfg", followed by "grub-install ...."

Last edited by tumas (2013-12-24 08:30:48)

Offline

#22 2013-12-24 09:07:26

kevin24
Member
Registered: 2013-07-20
Posts: 9

Re: [solved] Grub Update gives Syntax error

Hi,

Just so I am absolutely clear.

My install sequence is :-

pacstrap -i /mnt base
pacstrap /mnt grub-bios
genfstab -U -p /mnt >> /mnt/etc/fstab
cat /mnt/etc/fstab 
arch-chroot /mnt

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
BUG FIX

[ADD TO nano /etc/default/grub at the bottom “GRUB_DISABLE_SUBMENU=y”
=================================================================

mkinitcpio -p linux
grub-mkconfig -o /boot/grub/grub.cfg
grub-install /dev/sda
passwd
exit
umount /mnt/home
umount /mnt
systemctl reboot

I tried this but it would not reboot. But the everything seemed to install ok and the FIX cured the error problem.

So I am a l unsure of what I am doing wrong.
Thanks

Offline

#23 2013-12-24 11:08:55

tumas
Member
Registered: 2012-02-08
Posts: 89

Re: [solved] Grub Update gives Syntax error

Well, do u have UEFI or normal BIOS? Depending on that, u probably should add a --target=xxx option for the "grub-install-command". And since this is getting a little bit "Off-Topic" here, u maybe want to create a new thread for ur problem (if it still exists)

Offline

#24 2013-12-27 18:32:36

Garryck
Member
Registered: 2013-12-27
Posts: 1

Re: [solved] Grub Update gives Syntax error

Just wanted to say thanks.. I've just installed my first Arch base tonight, and the first attempt failed because of this bug.  After reading this thread, the second attempt went smoothly!

Offline

#25 2013-12-27 20:06:41

RadioGnome1971
Member
From: At home
Registered: 2013-12-27
Posts: 10

Re: [solved] Grub Update gives Syntax error

Made my day....

Offline

Board footer

Powered by FluxBB