Syntax error al actualizar grub manjaro

Este es el texto del archivo /etc/default/grub .

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter 
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx" 
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper 
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

Ok. Ese fichero es correcto, pero ya voy entendiendo más del error.

El problema parece ser que se genera un archivo de configuración temporal pero antes de pasarlo a definitivo, ha detectado que hay errores en él y por eso muestra ese error.

Así que lo que tienes que mandar es el archivo /boot/grub/grub.cfg.new.
En principio alguno de los scripts que hay en /etc/grub.d/ comete un error o el fichero /etc/default/grub tiene un error. Pero por lo que has mandado, ese último está bien.

Esto también pasa por no leer bien lo que pone el error. Porque el error pone bien claro que hay que mirar ese archivo :smile: :smile:

Pues resulta que ese archivo /boot/grub/grub.cfg.new no aparece en ninguna carpeta.
Lo estuve buscando hace unos días y no lo encontré. Ahora también lo he buscado y no aparece. ¿Será que no se crea cuando debiera crearse o el error consiste en no aparecer cuando se le invoca?

Ok. Curioso. Pues entonces voy volver al plan de ver que pasa cuando se ejecutan los scripts. Es con sudo bash -x grub-mkconfig > grub_debug.txt 2>&1 pero recuerda hacerlo dentro de chroot.

Por cierto, el archivo de /boot/ lo buscas después de hacer chroot, ¿verdad? Es solo por confirmar

Este es el texto del archivo grub_debug.txt . Realizado después de entrar como manjaro-chroot -a.

+ set -e
+ prefix=/usr
+ exec_prefix=/usr
+ datarootdir=/usr/share
+ prefix=/usr
+ exec_prefix=/usr
+ sbindir=/usr/bin
+ bindir=/usr/bin
+ sysconfdir=/etc
+ PACKAGE_NAME=GRUB
+ PACKAGE_VERSION=2.04~manjaro
+ host_os=linux-gnu
+ datadir=/usr/share
+ '[' x = x ']'
+ pkgdatadir=/usr/share/grub
+ export pkgdatadir
+ grub_cfg=
+ grub_mkconfig_dir=/etc/grub.d
++ basename grub-mkconfig
+ self=grub-mkconfig
+ grub_probe=/usr/bin/grub-probe
+ grub_file=/usr/bin/grub-file
+ grub_editenv=/usr/bin/grub-editenv
+ grub_script_check=/usr/bin/grub-script-check
+ export TEXTDOMAIN=grub
+ TEXTDOMAIN=grub
+ export TEXTDOMAINDIR=/usr/share/locale
+ TEXTDOMAINDIR=/usr/share/locale
+ . /usr/share/grub/grub-mkconfig_lib
++ prefix=/usr
++ exec_prefix=/usr
++ datarootdir=/usr/share
++ datadir=/usr/share
++ bindir=/usr/bin
++ sbindir=/usr/bin
++ '[' x/usr/share/grub = x ']'
++ test x/usr/bin/grub-probe = x
++ test x/usr/bin/grub-file = x
++ test x = x
++ grub_mkrelpath=/usr/bin/grub-mkrelpath
++ command -v gettext
++ :
++ grub_tab='	'
+ test 0 -gt 0
+ '[' x0 = x ']'
+ '[' 0 '!=' 0 ']'
+ set /usr/bin/grub-probe dummy
+ test -f /usr/bin/grub-probe
+ :
++ /usr/bin/grub-probe --target=device /
+ GRUB_DEVICE=/dev/sda10
++ /usr/bin/grub-probe --device /dev/sda10 --target=fs_uuid
+ GRUB_DEVICE_UUID=f82701b9-2d4f-4e73-a098-1b4a31139f93
++ /usr/bin/grub-probe --device /dev/sda10 --target=partuuid
+ GRUB_DEVICE_PARTUUID=e06b7215-f472-f947-bb42-d915ad0457b3
++ /usr/bin/grub-probe --target=device /boot
+ GRUB_DEVICE_BOOT=/dev/sda10
++ /usr/bin/grub-probe --device /dev/sda10 --target=fs_uuid
+ GRUB_DEVICE_BOOT_UUID=f82701b9-2d4f-4e73-a098-1b4a31139f93
++ /usr/bin/grub-probe --device /dev/sda10 --target=fs
+ GRUB_FS=ext2
+ '[' xext2 = xunknown ']'
+ '[' x = x ']'
+ GRUB_EARLY_INITRD_LINUX_STOCK='intel-uc.img intel-ucode.img amd-uc.img amd-ucode.img early_ucode.cpio microcode.cpio'
+ test -f /etc/default/grub
+ . /etc/default/grub
++ GRUB_DEFAULT=saved
++ GRUB_TIMEOUT=10
++ GRUB_TIMEOUT_STYLE=hidden
++ GRUB_DISTRIBUTOR=Manjaro
++ GRUB_CMDLINE_LINUX_DEFAULT='quiet apparmor=1 security=apparmor resume=UUID=2673d642-74d8-4073-a4ac-c5f9518fd821 udev.log_priority=3'
++ GRUB_CMDLINE_LINUX=
++ GRUB_SAVEDEFAULT=true
++ GRUB_PRELOAD_MODULES='part_gpt part_msdos'
++ GRUB_TERMINAL_INPUT=console
++ GRUB_GFXMODE=auto
++ GRUB_GFXPAYLOAD_LINUX=keep
++ GRUB_DISABLE_RECOVERY=true
++ export GRUB_COLOR_NORMAL=white/black
++ GRUB_COLOR_NORMAL=white/black
++ export GRUB_COLOR_HIGHLIGHT=light-red/black
++ GRUB_COLOR_HIGHLIGHT=light-red/black
++ GRUB_THEME=/boot/grub/themes/starfield/theme.txt
++ GRUB_DISABLE_OS_PROBER=true
++ GRUB_FONT=/boot/grub/unicode.pf2
+ '[' x = xtrue ']'
+ '[' x '!=' x ']'
+ termoutdefault=0
+ '[' x = x ']'
+ GRUB_TERMINAL_OUTPUT=gfxterm
+ termoutdefault=1
+ for x in ${GRUB_TERMINAL_OUTPUT}
+ case "x${x}" in
+ GRUB_ACTUAL_DEFAULT=saved
+ '[' xsaved = xsaved ']'
++ /usr/bin/grub-editenv - list
++ sed -n '/^saved_entry=/ s,^saved_entry=,,p'
+ GRUB_ACTUAL_DEFAULT=osprober-efi-001A-A00D
+ export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_PARTUUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT GRUB_PRELOAD_MODULES GRUB_ACTUAL_DEFAULT
+ export GRUB_DEFAULT GRUB_HIDDEN_TIMEOUT GRUB_HIDDEN_TIMEOUT_QUIET GRUB_TIMEOUT GRUB_TIMEOUT_STYLE GRUB_DEFAULT_BUTTON GRUB_HIDDEN_TIMEOUT_BUTTON GRUB_TIMEOUT_BUTTON GRUB_TIMEOUT_STYLE_BUTTON GRUB_BUTTON_CMOS_ADDRESS GRUB_BUTTON_CMOS_CLEAN GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_CMDLINE_XEN GRUB_CMDLINE_XEN_DEFAULT GRUB_CMDLINE_LINUX_XEN_REPLACE GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT GRUB_CMDLINE_NETBSD GRUB_CMDLINE_NETBSD_DEFAULT GRUB_CMDLINE_GNUMACH GRUB_EARLY_INITRD_LINUX_CUSTOM GRUB_EARLY_INITRD_LINUX_STOCK GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_UUID GRUB_DISABLE_LINUX_UUID GRUB_DISABLE_LINUX_PARTUUID GRUB_DISABLE_RECOVERY GRUB_VIDEO_BACKEND GRUB_GFXMODE GRUB_BACKGROUND GRUB_THEME GRUB_GFXPAYLOAD_LINUX GRUB_DISABLE_OS_PROBER GRUB_COLOR_NORMAL GRUB_COLOR_HIGHLIGHT GRUB_INIT_TUNE GRUB_SAVEDEFAULT GRUB_ENABLE_CRYPTODISK GRUB_BADRAM GRUB_OS_PROBER_SKIP_LIST GRUB_DISABLE_SUBMENU
+ test x '!=' x
+ gettext 'Generating grub configuration file ...'
Generating grub configuration file ...+ echo

+ cat
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/00_header
+ test -f /etc/grub.d/00_header
+ case "$1" in
+ return 0
+ test -x /etc/grub.d/00_header
+ echo

+ echo '### BEGIN /etc/grub.d/00_header ###'
### BEGIN /etc/grub.d/00_header ###
+ /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="${saved_entry}"
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=white/black
set menu_color_highlight=light-red/black

insmod part_gpt
insmod ext2
set root='hd0,gpt10'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt10' --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10  f82701b9-2d4f-4e73-a098-1b4a31139f93
else
  search --no-floppy --fs-uuid --set=root f82701b9-2d4f-4e73-a098-1b4a31139f93
fi
if loadfont /boot/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_input console
terminal_output gfxterm
Found theme: /boot/grub/themes/starfield/theme.txt
insmod part_gpt
insmod ext2
set root='hd0,gpt10'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt10' --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10  f82701b9-2d4f-4e73-a098-1b4a31139f93
else
  search --no-floppy --fs-uuid --set=root f82701b9-2d4f-4e73-a098-1b4a31139f93
fi
insmod gfxmenu
loadfont ($root)/boot/grub/themes/starfield/dejavu_10.pf2
loadfont ($root)/boot/grub/themes/starfield/dejavu_12.pf2
loadfont ($root)/boot/grub/themes/starfield/dejavu_14.pf2
loadfont ($root)/boot/grub/themes/starfield/dejavu_16.pf2
loadfont ($root)/boot/grub/themes/starfield/dejavu_bold_14.pf2
insmod png
set theme=($root)/boot/grub/themes/starfield/theme.txt
export theme
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=hidden
  set timeout=10
# Fallback hidden-timeout code in case the timeout_style feature is
# unavailable.
elif sleep --interruptible 10 ; then
  set timeout=0
fi
+ echo '### END /etc/grub.d/00_header ###'
### END /etc/grub.d/00_header ###
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/10_linux_proxy
+ test -f /etc/grub.d/10_linux_proxy
+ case "$1" in
+ return 0
+ test -x /etc/grub.d/10_linux_proxy
+ echo

+ echo '### BEGIN /etc/grub.d/10_linux_proxy ###'
### BEGIN /etc/grub.d/10_linux_proxy ###
+ /etc/grub.d/10_linux_proxy
Found linux image: /boot/vmlinuz-5.8-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.8-x86_64.img
Found initrd fallback image: /boot/initramfs-5.8-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.7-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.7-x86_64.img
Found initrd fallback image: /boot/initramfs-5.7-x86_64-fallback.img
submenu "Advanced options for Manjaro Linux"{
menuentry "Manjaro Linux (Kernel: 5.8.1-3-MANJARO x64)" --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.8.1-3-MANJARO x64-advanced-f82701b9-2d4f-4e73-a098-1b4a31139f93' {
	savedefault
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt10'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt10' --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10  f82701b9-2d4f-4e73-a098-1b4a31139f93
		else
		  search --no-floppy --fs-uuid --set=root f82701b9-2d4f-4e73-a098-1b4a31139f93
		fi
		linux	/boot/vmlinuz-5.8-x86_64 root=UUID=f82701b9-2d4f-4e73-a098-1b4a31139f93 rw  quiet apparmor=1 security=apparmor resume=UUID=2673d642-74d8-4073-a4ac-c5f9518fd821 udev.log_priority=3
		initrd	/boot/intel-ucode.img /boot/initramfs-5.8-x86_64.img
}
menuentry "Manjaro Linux (Kernel: 5.8.1-3-MANJARO x64 - fallback initramfs)" --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.8.1-3-MANJARO x64-fallback-f82701b9-2d4f-4e73-a098-1b4a31139f93' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt10'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt10' --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10  f82701b9-2d4f-4e73-a098-1b4a31139f93
		else
		  search --no-floppy --fs-uuid --set=root f82701b9-2d4f-4e73-a098-1b4a31139f93
		fi
		linux	/boot/vmlinuz-5.8-x86_64 root=UUID=f82701b9-2d4f-4e73-a098-1b4a31139f93 rw  quiet apparmor=1 security=apparmor resume=UUID=2673d642-74d8-4073-a4ac-c5f9518fd821 udev.log_priority=3
		initrd	/boot/initramfs-5.8-x86_64-fallback.img
}
menuentry "Manjaro Linux (Kernel: 5.7.15-1-MANJARO x64)" --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.7.15-1-MANJARO x64-advanced-f82701b9-2d4f-4e73-a098-1b4a31139f93' {
	savedefault
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt10'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt10' --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10  f82701b9-2d4f-4e73-a098-1b4a31139f93
		else
		  search --no-floppy --fs-uuid --set=root f82701b9-2d4f-4e73-a098-1b4a31139f93
		fi
		linux	/boot/vmlinuz-5.7-x86_64 root=UUID=f82701b9-2d4f-4e73-a098-1b4a31139f93 rw  quiet apparmor=1 security=apparmor resume=UUID=2673d642-74d8-4073-a4ac-c5f9518fd821 udev.log_priority=3
		initrd	/boot/intel-ucode.img /boot/initramfs-5.7-x86_64.img
}
menuentry "Manjaro Linux (Kernel: 5.7.15-1-MANJARO x64 - fallback initramfs)" --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.7.15-1-MANJARO x64-fallback-f82701b9-2d4f-4e73-a098-1b4a31139f93' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt10'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt10' --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10  f82701b9-2d4f-4e73-a098-1b4a31139f93
		else
		  search --no-floppy --fs-uuid --set=root f82701b9-2d4f-4e73-a098-1b4a31139f93
		fi
		linux	/boot/vmlinuz-5.7-x86_64 root=UUID=f82701b9-2d4f-4e73-a098-1b4a31139f93 rw  quiet apparmor=1 security=apparmor resume=UUID=2673d642-74d8-4073-a4ac-c5f9518fd821 udev.log_priority=3
		initrd	/boot/initramfs-5.7-x86_64-fallback.img
}
}




+ echo '### END /etc/grub.d/10_linux_proxy ###'
### END /etc/grub.d/10_linux_proxy ###
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/20_linux_xen
+ test -f /etc/grub.d/20_linux_xen
+ case "$1" in
+ return 0
+ test -x /etc/grub.d/20_linux_xen
+ echo

+ echo '### BEGIN /etc/grub.d/20_linux_xen ###'
### BEGIN /etc/grub.d/20_linux_xen ###
+ /etc/grub.d/20_linux_xen
+ echo '### END /etc/grub.d/20_linux_xen ###'
### END /etc/grub.d/20_linux_xen ###
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/30_os-prober
+ test -f /etc/grub.d/30_os-prober
+ case "$1" in
+ return 0
+ test -x /etc/grub.d/30_os-prober
+ echo

+ echo '### BEGIN /etc/grub.d/30_os-prober ###'
### BEGIN /etc/grub.d/30_os-prober ###
+ /etc/grub.d/30_os-prober
+ echo '### END /etc/grub.d/30_os-prober ###'
### END /etc/grub.d/30_os-prober ###
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/31_uefi-firmware_proxy
+ test -f /etc/grub.d/31_uefi-firmware_proxy
+ case "$1" in
+ return 0
+ test -x /etc/grub.d/31_uefi-firmware_proxy
+ echo

+ echo '### BEGIN /etc/grub.d/31_uefi-firmware_proxy ###'
### BEGIN /etc/grub.d/31_uefi-firmware_proxy ###
+ /etc/grub.d/31_uefi-firmware_proxy
Adding boot menu entry for UEFI Firmware Settings ...


+ echo '### END /etc/grub.d/31_uefi-firmware_proxy ###'
### END /etc/grub.d/31_uefi-firmware_proxy ###
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/40_custom_proxy
+ test -f /etc/grub.d/40_custom_proxy
+ case "$1" in
+ return 0
+ test -x /etc/grub.d/40_custom_proxy
+ echo

+ echo '### BEGIN /etc/grub.d/40_custom_proxy ###'
### BEGIN /etc/grub.d/40_custom_proxy ###
+ /etc/grub.d/40_custom_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.


menuentry "Manjaro 20" --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f82701b9-2d4f-4e73-a098-1b4a31139f93' {
	savedefault
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt10'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt10' --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10 --hint='hd0,gpt10'  f82701b9-2d4f-4e73-a098-1b4a31139f93
	else
	  search --no-floppy --fs-uuid --set=root f82701b9-2d4f-4e73-a098-1b4a31139f93
	fi
	linux	/boot/vmlinuz-5.6-x86_64 root=UUID=f82701b9-2d4f-4e73-a098-1b4a31139f93 rw  quiet apparmor=1 security=apparmor resume=UUID=2673d642-74d8-4073-a4ac-c5f9518fd821 udev.log_priority=3
	initrd	/boot/intel-ucode.img /boot/initramfs-5.6-x86_64.img
}
menuentry "Windows 10" --class windows --class os $menuentry_id_option 'osprober-efi-001A-A00D' {
	savedefault
	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-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 --hint='hd0,gpt1'  001A-A00D
	else
	  search --no-floppy --fs-uuid --set=root 001A-A00D
	fi
	chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
+ echo '### END /etc/grub.d/40_custom_proxy ###'
### END /etc/grub.d/40_custom_proxy ###
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/41_custom
+ test -f /etc/grub.d/41_custom
+ case "$1" in
+ return 0
+ test -x /etc/grub.d/41_custom
+ echo

+ echo '### BEGIN /etc/grub.d/41_custom ###'
### BEGIN /etc/grub.d/41_custom ###
+ /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
+ echo '### END /etc/grub.d/41_custom ###'
### END /etc/grub.d/41_custom ###
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/42_grub-customizer_menu_color_helper
+ test -f /etc/grub.d/42_grub-customizer_menu_color_helper
+ case "$1" in
+ return 0
+ test -x /etc/grub.d/42_grub-customizer_menu_color_helper
+ echo

+ echo '### BEGIN /etc/grub.d/42_grub-customizer_menu_color_helper ###'
### BEGIN /etc/grub.d/42_grub-customizer_menu_color_helper ###
+ /etc/grub.d/42_grub-customizer_menu_color_helper
+ echo '### END /etc/grub.d/42_grub-customizer_menu_color_helper ###'
### END /etc/grub.d/42_grub-customizer_menu_color_helper ###
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/60_memtest86+_proxy
+ test -f /etc/grub.d/60_memtest86+_proxy
+ case "$1" in
+ return 0
+ test -x /etc/grub.d/60_memtest86+_proxy
+ echo

+ echo '### BEGIN /etc/grub.d/60_memtest86+_proxy ###'
### BEGIN /etc/grub.d/60_memtest86+_proxy ###
+ /etc/grub.d/60_memtest86+_proxy
Found memtest86+ image: /boot/memtest86+/memtest.bin

if [ "${grub_platform}" == "pc" ]; then

fi
+ echo '### END /etc/grub.d/60_memtest86+_proxy ###'
### END /etc/grub.d/60_memtest86+_proxy ###
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/README
+ test -f /etc/grub.d/README
+ case "$1" in
+ return 1
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/backup
+ test -f /etc/grub.d/backup
+ return 1
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/bin
+ test -f /etc/grub.d/bin
+ return 1
+ for i in "${grub_mkconfig_dir}"/*
+ case "$i" in
+ grub_file_is_not_garbage /etc/grub.d/proxifiedScripts
+ test -f /etc/grub.d/proxifiedScripts
+ return 1
+ test x '!=' x
+ gettext done
done+ echo


Por cierto, el archivo /boot/grub/grub.cfg.new lo he buscado como root y desde la terminal. En la carpeta /boot/grub/ solo hay un archivo que lleva por nombre grubenv .

Cuando entras al live usb, usando sudo manjaro-chroot -a como te dijeron (es importante que lo uses, porque sino te dará información del USB, y no del Manjaro instalado en tu PC), al usar mhwd-kernel -li que te dice? Por la imagen parece que quiere cargar el kernel 5.6, pero ya esta fuera de uso.

Siempre que entro con el live USB utilizo sudo manjaro-chroot -a . El resultado de usar mhwd-kernel -li es que tengo el kernel 5.6, pero he intentado instalar otros y todo va bien hasta que hago el update-grub . Ahí es donde da error.

!Ay, cuanto daño ha hecho el grub_customizer! :laughing:

Se ve que lo has usado y te ha hecho algún pequeño desastre por ahí. Por cierto, cuando te pedí el contenido del directorio /etc/grub.d/, me mandaste el del USB, no el de tu sistema Manjaro con chroot. :grinning:

Yo borraría los siguientes ficheros de /etc/grub.d/:

  • 60_memtest+_proxy
  • 42_grub-customizer_menu_color_helper

Y del fichero 40_custom_proxy deberías borrar la entrada relativa a Manjaro que usa el kernel 5.6. Estas son las líneas a borrar de ese archivo:

menuentry "Manjaro 20" --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f82701b9-2d4f-4e73-a098-1b4a31139f93' {
	savedefault
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt10'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt10' --hint-bios=hd0,gpt10 --hint-efi=hd0,gpt10 --hint-baremetal=ahci0,gpt10 --hint='hd0,gpt10'  f82701b9-2d4f-4e73-a098-1b4a31139f93
	else
	  search --no-floppy --fs-uuid --set=root f82701b9-2d4f-4e73-a098-1b4a31139f93
	fi
	linux	/boot/vmlinuz-5.6-x86_64 root=UUID=f82701b9-2d4f-4e73-a098-1b4a31139f93 rw  quiet apparmor=1 security=apparmor resume=UUID=2673d642-74d8-4073-a4ac-c5f9518fd821 udev.log_priority=3
	initrd	/boot/intel-ucode.img /boot/initramfs-5.6-x86_64.img
}

Yo te diría de desinstalar el grub_customizer y arreglar ese directorio. Pero por ahora veamos si esto es suficiente para que update-grub deje de darte errores. Otra cosa es si se soluciona el problema, porque no es normal que /boot/grub/ lo tengas casi vacío.

Ok, rectifico. estos son los ficheros de /etc/grub.d/ :
[manjaro@manjaro grub.d]$ ls
00_header
42_grub-customizer_menu_color_helper
10_linux_proxy
60_memtest86+_proxy
20_linux_xen
30_os-prober
31_uefi-firmware_proxy
40_custom_proxy
README
41_custom

Hay también tres carpetas: bin, backup y proxifiedScript

Precisamente, tuve instalado el Grub Customizer un tiempo, pero ya no lo tengo.

¿Pero te funciona ahora update-grub?

Lo del directorio lo podemos arreglar después

No. Update grub no funciona todavía.

@cfinnberg se me ocurre una idea. He encontrado que la carpeta /mnt/etc/grub.d/backup/boot_grub/ tiene prácticamente los mismos archivos que la carpeta en la ruta /mnt/boot/grub/. ¿Podría recuperar los archivos de la carpeta backup en la carpeta y colocarlos en /mnt/boot/grub/?

Ahora no estoy en mi Linux, pero si no recuerdo mal puedes renombrar la carpeta con mv /etc/grub.d /etc/grub.d.old y luego reinstalar grub con pacman -S grub, eso debería regenerar los ficheros correctos en esa carpeta

Solucionado. Ahora ya con más tranquilidad tengo que recuperar el menú grub, porque que me ha entrado directamente a Manjaro sin darme a elegir entre Windows y Linux. Eso lo haré con Rescatux.

Voy a poner los pasos que realicé. Lo primero fue abrir terminal y con sudo renombrar la carpeta con /etc/grub.d por /etc/grub.d.old.
Luego monté las particiones de Manjaro con sudo manjaro-chroot -a .
A continuación instalo el grub con pacman -S grub y observé que se creó la carpeta /etc/grub.d de nuevo.
Hice un update-grub y vi que ya no me dió error.
Desnonté las particiones con exit.
Apago el PC, enciendo y por fin arranca Manjaro, talcual estaba antes del problema. Solo que no ha pasado por el menú Grub.

He de decir que el Kernel que está en ejecución es el 5.8 porque en días anteriores yo había instalado tanto el 5.7 como el 5.8 intentando reparar el problema. Curiosamente el 5.6 me aparece que no está instalado.

Voy a poner más abajo una copia de la Terminal con los pasos.
Gracias por todo y a todos.

Estos son los pasos. Es una copia de la Terminal:

[manjaro@manjaro ~]$ sudo mv /mnt/etc/grub.d /mnt/etc/grub.d.old
[manjaro@manjaro ~]$ manjaro-chroot -a
==> Detected systems:
 --> 0) ManjaroLinux
==> Select system to mount [0-0] : 
1
==> Mounting (ManjaroLinux) [/dev/sda10]
 --> mount: [/mnt]
mount: /mnt: /dev/sda10 already mounted on /mnt.
 --> mount: [/mnt/boot/efi]
 --> mount: [/mnt/home]
[manjaro /]# sudo pacman -S grub
warning: grub-2.04-11.1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) grub-2.04-11.1

Total Download Size:    9.88 MiB
Total Installed Size:  48.87 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] Y
:: Retrieving packages...
 grub-2.04-11.1-x...     9.9 MiB  1068 KiB/s 00:09 [###################] 100%
(1/1) checking keys in keyring                     [###################] 100%
(1/1) checking package integrity                   [###################] 100%
(1/1) loading package files                        [###################] 100%
(1/1) checking for file conflicts                  [###################] 100%
(1/1) checking available disk space                [###################] 100%
warning: could not get file information for etc/grub.d/
warning: could not get file information for etc/grub.d/00_header
warning: could not get file information for etc/grub.d/10_linux
warning: could not get file information for etc/grub.d/20_linux_xen
warning: could not get file information for etc/grub.d/30_os-prober
warning: could not get file information for etc/grub.d/30_uefi-firmware
warning: could not get file information for etc/grub.d/40_custom
warning: could not get file information for etc/grub.d/41_custom
warning: could not get file information for etc/grub.d/README
:: Processing package changes...
(1/1) reinstalling grub                            [###################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Updating the info directory file...
[manjaro /]# sudo update-grub
Generating grub configuration file ...
Found theme: /boot/grub/themes/starfield/theme.txt
Found linux image: /boot/vmlinuz-5.8-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.8-x86_64.img
Found initrd fallback image: /boot/initramfs-5.8-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.7-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.7-x86_64.img
Found initrd fallback image: /boot/initramfs-5.7-x86_64-fallback.img
Adding boot menu entry for UEFI Firmware Settings ...
done
[manjaro /]# exit
exit
 --> umount: [/mnt/home]
 --> umount: [/mnt/boot/efi]
1 Like

Me alegro. Para solucionar lo de Windows (que se puede mirar aparte por qué no te lo encuentra) añade lo siguiente al final de /etc/grub.d/40_custom:

menuentry "Windows 10" --class windows --class os $menuentry_id_option 'osprober-efi-001A-A00D' {
	savedefault
	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-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 --hint='hd0,gpt1'  001A-A00D
	else
	  search --no-floppy --fs-uuid --set=root 001A-A00D
	fi
	chainloader /efi/Microsoft/Boot/bootmgfw.efi
}

Si consideras que el problema está resuelto, marca el hilo como solucionado

@cfinnberg Esto no me ha funcionado, pero intentaré recuperar el menú del grub de otra forma.

Olvidé decir que hay que hacer un update-grub después.

De acuerdo, aunque creo que lo hice. Lo volveré a intentar más tarde.
Ahora estoy en Windows, entrando por el boot menú (F10, en mi caso).
Gracias.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.