You are not logged in.

#1 2023-03-08 00:04:03

ColonLLC
Member
Registered: 2023-03-07
Posts: 4

sudo grub-mkconfig -o /boot/grub/grub.cfg giving errors

hi im kind new to archlinux and sort of stupid
i tried messing around with grub and now when i do sudo grub-mkconfig -o /boot/grub/grub.cfg
i get this error:

error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 234
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.

heres the grub.cfg.new

#
# 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
}

set menu_color_normal=light-green/black
set menu_color_highlight=light-cyan/blue

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod btrfs
set root='hd1,gpt3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt3 --hint-efi=hd1,gpt3 --hint-baremetal=ahci1,gpt3  6f122c25-823e-4136-b496-bedb60694f7f
else
  search --no-floppy --fs-uuid --set=root 6f122c25-823e-4136-b496-bedb60694f7f
fi
    font="/root/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=saved
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_IL
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux_proxy ###




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

### BEGIN /etc/grub.d/40_custom.save_proxy ###
menuentry "Arch Linux" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-6f122c25-823e-4136-b496-bedb60694f7f' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod fat
	set root='hd1,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  6C0A-2CC8
	else
	  search --no-floppy --fs-uuid --set=root 6C0A-2CC8
	fi
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=UUID=6f122c25-823e-4136-b496-bedb60694f7f rw rootflags=subvol=root  loglevel=3 quiet
	echo	'Loading initial ramdisk ...'
	initrd	/intel-ucode.img /initramfs-linux.img
}
menuentry "Windows" --class windows --class os $menuentry_id_option 'osprober-efi-C614-B7CC' {
	insmod part_gpt
	insmod fat
	set root='hd2,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt1 --hint-efi=hd2,gpt1 --hint-baremetal=ahci2,gpt1  C614-B7CC
	else
	  search --no-floppy --fs-uuid --set=root C614-B7CC
	fi
	chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/40_custom.save_proxy ###

### BEGIN /etc/grub.d/41_linux_proxy ###
submenu "Normal Configuration"{
menuentry "Arch Linux" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-6f122c25-823e-4136-b496-bedb60694f7f' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod fat
	set root='hd1,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  6C0A-2CC8
	else
	  search --no-floppy --fs-uuid --set=root 6C0A-2CC8
	fi
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=UUID=6f122c25-823e-4136-b496-bedb60694f7f rw rootflags=subvol=root  loglevel=3 quiet
	echo	'Loading initial ramdisk ...'
	initrd	/intel-ucode.img /initramfs-linux.img
}
menuentry "Windows Boot Manager (on /dev/sdc1)" --class windows --class os $menuentry_id_option 'osprober-efi-C614-B7CC' {
	insmod part_gpt
	insmod fat
	set root='hd2,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt1 --hint-efi=hd2,gpt1 --hint-baremetal=ahci2,gpt1  C614-B7CC
	else
	  search --no-floppy --fs-uuid --set=root C614-B7CC
	fi
	chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
submenu "Advanced options for Arch Linux"{
menuentry "Arch Linux, with Linux linux" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-6f122c25-823e-4136-b496-bedb60694f7f' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod fat
		set root='hd1,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  6C0A-2CC8
		else
		  search --no-floppy --fs-uuid --set=root 6C0A-2CC8
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=6f122c25-823e-4136-b496-bedb60694f7f rw rootflags=subvol=root  loglevel=3 quiet
		echo	'Loading initial ramdisk ...'
		initrd	/intel-ucode.img /initramfs-linux.img
}
menuentry "Arch Linux, with Linux linux (fallback initramfs)" --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-6f122c25-823e-4136-b496-bedb60694f7f' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod fat
		set root='hd1,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  6C0A-2CC8
		else
		  search --no-floppy --fs-uuid --set=root 6C0A-2CC8
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=6f122c25-823e-4136-b496-bedb60694f7f rw rootflags=subvol=root  loglevel=3 quiet
		echo	'Loading initial ramdisk ...'
		initrd	/intel-ucode.img /initramfs-linux-fallback.img
}
}
}
### END /etc/grub.d/41_linux_proxy ###

### BEGIN /etc/grub.d/42_uefi-firmware_proxy ###
menuentry "UEFI Firmware Settings" $menuentry_id_option 'uefi-firmware' {
			fwsetup
}
### END /etc/grub.d/42_uefi-firmware_proxy ###

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

### BEGIN /etc/grub.d/44_os-prober_proxy ###


### END /etc/grub.d/44_os-prober_proxy ###

### BEGIN /etc/grub.d/45_custom.save_proxy ###

# 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/45_custom.save_proxy ###

### BEGIN /etc/grub.d/46_uefi-firmware_proxy ###

if [ "$grub_platform" = "efi" ]; then
	fwsetup --is-supported
	if [ "$?" = 0 ]; then

	fi
fi
### END /etc/grub.d/46_uefi-firmware_proxy ###

### BEGIN /etc/grub.d/47_fwupd ###
### END /etc/grub.d/47_fwupd ###

### BEGIN /etc/grub.d/48_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/48_custom ###

### BEGIN /etc/grub.d/49_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/49_custom ###

### BEGIN /etc/grub.d/50_grub-customizer_menu_color_helper ###
### END /etc/grub.d/50_grub-customizer_menu_color_helper ###

i dont really know what i was thinking if someone can help me fix this it would mean alot especially with the fact that i have an iq of 2

Offline

#2 2023-03-08 02:58:14

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: sudo grub-mkconfig -o /boot/grub/grub.cfg giving errors

grub-customizer isn't compatible with the current grub package. Get rid of it.

Offline

#3 2023-03-09 14:49:48

ColonLLC
Member
Registered: 2023-03-07
Posts: 4

Re: sudo grub-mkconfig -o /boot/grub/grub.cfg giving errors

didnt really fix anything u just told me whatever your doing is wrong although i fixed it myself using grub-customizer

Offline

#4 2023-03-09 15:14:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,255

Re: sudo grub-mkconfig -o /boot/grub/grub.cfg giving errors

No grub-customizer generates config files that are incompatible with the current format grub-mkconfig wants to generate. If you remove grub-customizer grub-mkconfig will not run into these issues anymore. Why are you assuming an attack where there is none?

Offline

Board footer

Powered by FluxBB