You are not logged in.

#1 2013-12-15 08:15:52

ghfujianbin
Member
Registered: 2013-11-10
Posts: 21

[SOLVED]Anyone else having problem with grub-mkconfig?

Today I was trying to add the "udev.log_priority=8" kernel parameter. So I appended it to the /etc/default/grub file first and did sudo grub-mkconfig -o /boot/grub/grub.cfg, then I received error saying I had syntax error...But I'm sure I did not make any mistake when editing.

Error message:
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 165
Syntax errors are detected in generated GRUB config file.
content of the grub.cfg.new file:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt 
insmod lvm 
insmod ext2
set root='lvmid/jv7QdF-jMSr-2P2w-t4Q0-fnn1-f7rD-nVULJ0/LmSLEf-vuf9-Gyii-bwxx-O9f7-zL62-9KYNkV'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvmid/jv7QdF-jMSr-2P2w-t4Q0-fnn1-f7rD-nVULJ0/LmSLEf-vuf9-Gyii-bwxx-O9f7-zL62-9KYNkV'  25ff04f0-714b-4690-bdee-227dd840f0bd
else
  search --no-floppy --fs-uuid --set=root 25ff04f0-714b-4690-bdee-227dd840f0bd
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-25ff04f0-714b-4690-bdee-227dd840f0bd' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt 
	insmod fat
	set root='hd0,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  4CC6-27BF
	else
	  search --no-floppy --fs-uuid --set=root 4CC6-27BF
	fi
	echo	'Loading Linux core repo kernel ...'
	linux	/vmlinuz-linux root=UUID=25ff04f0-714b-4690-bdee-227dd840f0bd rw  quiet radeon.dpm=1
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-25ff04f0-714b-4690-bdee-227dd840f0bd' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt 
	insmod fat
	set root='hd0,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  4CC6-27BF
	else
	  search --no-floppy --fs-uuid --set=root 4CC6-27BF
	fi
	echo	'Loading Linux core repo kernel ...'
	linux	/vmlinuz-linux root=UUID=25ff04f0-714b-4690-bdee-227dd840f0bd rw  quiet radeon.dpm=1
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux-fallback.img
}
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-25ff04f0-714b-4690-bdee-227dd840f0bd' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt 
	insmod fat
	set root='hd0,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  4CC6-27BF
	else
	  search --no-floppy --fs-uuid --set=root 4CC6-27BF
	fi
	echo	'Loading Linux core repo kernel ...'
	linux	/vmlinuz-linux root=UUID=25ff04f0-714b-4690-bdee-227dd840f0bd rw  quiet radeon.dpm=1
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux-fallback.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-25ff04f0-714b-4690-bdee-227dd840f0bd' {

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

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

Last edited by ghfujianbin (2013-12-15 08:34:23)

Offline

#2 2013-12-15 08:17:23

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

Re: [SOLVED]Anyone else having problem with grub-mkconfig?

If you remove the kernel parameter, do you still get the syntax error? If so, search the forums for an answer.

Offline

#3 2013-12-15 08:20:50

dodo3773
Member
Registered: 2011-03-17
Posts: 818

Re: [SOLVED]Anyone else having problem with grub-mkconfig?

This error has been gone over a lot recently on these forums and a bug has already been filed. Please make sure you search the forums / google before posting issues. I am sure a mod is going to come by and close this thread pretty quickly probably but you need to add this to /etc/default/grub "GRUB_DISABLE_SUBMENU=y". If that is the fix then yeah search a lot harder next time. If that isn't please post the error / output so maybe it will be easier for someone to help.

Offline

#4 2013-12-15 08:33:53

ghfujianbin
Member
Registered: 2013-11-10
Posts: 21

Re: [SOLVED]Anyone else having problem with grub-mkconfig?

Yes that fixed the problem, thanks.

Offline

Board footer

Powered by FluxBB