GRUB restore problems

Hi, after a Manjaro Update, Grub only shows my Windows 10 installation and memtest.

I booted into a Manjaro live environment from a USB stick and chroted into my local Manjaro installation and tried to follow this (For BIOS systems): Wiki Restore the GRUB Bootloader

When running update-grub I get an error, stating:

error: syntax error.
error: line no: 135
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.

So I get stuck when taking a look at the file, I do not know what is wrong there and don't really get farther searching.
My grub.cfg.new file around line 153 (the line starting with "linux"):

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Manjaro Linux' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option >
        savedefault
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd3,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@1,msdos1' --hint-bios=>
        else
          search --no-floppy --fs-uuid --set=root 4bc57da5-7660-448f-a355-ffaf485f0ee4
        fi
        linux   /boot/vmlinuz-5.4-x86_64 root=UUID=4bc57da5-7660-448f-a355-ffaf485f0ee4 rw  quiet splash>
        initrd  /boot/intel-ucode.img /boot/initramfs-5.4-x86_64.img
}

Any help is appreciated! Thx

you should provide all informations

inxi -Fxxxza
sudo parted -l
sudo efibootmgr -v

Sure, thanks for the effort. Here we go:

[manjaro-gnome /]# inxi -Fxxxza
12System:    12Host manjaro-gnome 12Kernel 5.6.15-1-MANJARO x86_64 12bits 64 12compiler gcc 12v 10.1.0 
           12parameters BOOT_IMAGE=/boot/vmlinuz-x86_64 lang=en_US keytable=ch tz=UTC driver=free 
           nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 misobasedir=manjaro 
           misolabel=MANJARO_GNOME_2003 quiet systemd.show_status=1 apparmor=1 security=apparmor 
           12Desktop Gnome 3.36.4 12wm gnome-shell 12dm N/A 12Distro Manjaro Linux 
12Machine:   12Type Desktop 12Mobo ASUSTeK 12model P7P55D 12v Rev 1.xx 12serial <filter> 
           12BIOS American Megatrends 12v 2101 12date 10/20/2011 

(upower:24): UPower-WARNING **: 10:42:06.815: Cannot connect to upowerd: Could not connect: No such file or directory
12Battery:   12Device-1 hidpp_battery_1 12model Logitech G700 12serial <filter> 12charge Low 
           12status Discharging 

12CPU:       12Topology Quad Core 12model Intel Core i5 750 12bits 64 12type MCP 12arch Nehalem 12family 6 
           12model-id 1E (30) 12stepping 5 12microcode A 12L1 cache 256 KiB 12L2 cache 8192 KiB 
           12L3 cache 8192 KiB 
           12flags lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 12bogomips 21405 
           12Speed 1204 MHz 12min/max 1200/2668 MHz 12boost enabled 12Core speeds (MHz) 121 1204 122 1204 
           123 1204 124 1204 
           12Vulnerabilities 12Type itlb_multihit 12status KVM: Split huge pages 
           12Type l1tf 12mitigation PTE Inversion; VMX: conditional cache flushes, SMT disabled 
           12Type mds 12status Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled 
           12Type meltdown 12mitigation PTI 
           12Type spec_store_bypass 
           12mitigation Speculative Store Bypass disabled via prctl and seccomp 
           12Type spectre_v1 12mitigation usercopy/swapgs barriers and __user pointer sanitization 
           12Type spectre_v2 12mitigation Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: 
           disabled, RSB filling 
           12Type tsx_async_abort 12status Not affected 
12Graphics:  12Device-1 AMD Cape Verde XT [Radeon HD 7770/8760 / R7 250X] 12vendor PC Partner Limited 
           12driver radeon 12v kernel 12bus ID 01:00.0 12chip ID 1002:683d 
           12Device-2 AMD Cape Verde XT [Radeon HD 7770/8760 / R7 250X] 12vendor PC Partner Limited 
           12driver radeon 12v kernel 12bus ID 06:00.0 12chip ID 1002:683d 
           12Display 12server X.org 1.20.8 12driver radeon 12compositor gnome-shell 
           12resolution <xdpyinfo missing> 
           12OpenGL 12renderer AMD VERDE (DRM 2.50.0 5.6.15-1-MANJARO LLVM 10.0.0) 12v 4.5 Mesa 20.1.3 
           12direct render Yes 
12Audio:     12Device-1 Intel 5 Series/3400 Series High Definition Audio 12vendor ASUSTeK 
           12driver snd_hda_intel 12v kernel 12bus ID 00:1b.0 12chip ID 8086:3b56 
           12Device-2 AMD Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series] 
           12vendor PC Partner Limited 12driver snd_hda_intel 12v kernel 12bus ID 01:00.1 
           12chip ID 1002:aab0 
           12Device-3 AMD Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series] 
           12vendor PC Partner Limited 12driver snd_hda_intel 12v kernel 12bus ID 06:00.1 
           12chip ID 1002:aab0 
           12Sound Server ALSA 12v k5.6.15-1-MANJARO 
12Network:   12Device-1 Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
           12vendor ASUSTeK M4A785/P7P55 12driver r8169 12v kernel 12port b800 12bus ID 02:00.0 
           12chip ID 10ec:8168 
           12IF enp2s0 12state up 12speed 1000 Mbps 12duplex full 12mac <filter> 
12Drives:    12Local Storage 12total 1.21 TiB 12used 192.09 GiB (15.5%) 
           12ID-1 /dev/sda 12vendor Western Digital 12model WD5000AAKS-00V1A0 12size 465.76 GiB 12block size 
           12physical 512 B 12logical 512 B 12speed 3.0 Gb/s 12serial <filter> 12rev 1D05 
           12ID-2 /dev/sdb 12vendor Corsair 12model Force GT 12size 55.90 GiB 12block size 12physical 512 B 
           12logical 512 B 12speed 3.0 Gb/s 12serial <filter> 12rev 5.02 
           12ID-3 /dev/sdc 12vendor Western Digital 12model WD5000AAKX-001CA0 12size 465.76 GiB 12block size 
           12physical 512 B 12logical 512 B 12speed 3.0 Gb/s 12serial <filter> 12rev 1H15 
           12ID-4 /dev/sdd 12vendor Samsung 12model SSD 850 EVO 250GB 12size 232.89 GiB 12block size 
           12physical 512 B 12logical 512 B 12speed 3.0 Gb/s 12serial <filter> 12rev 2B6Q 
           12ID-5 /dev/sde 12type USB 12model IS917 innostor 12size 15.00 GiB 12block size 12physical 512 B 
           12logical 512 B 12serial <filter> 12rev 1.00 
12Partition: 12ID-1 / 12raw size 224.08 GiB 12size 219.57 GiB (97.98%) 12used 187.96 GiB (85.6%) 12fs ext4 
           12block size 4096 B 12dev /dev/sdd1 
12Sensors:   12System Temperatures 12cpu 51.0 C 12mobo N/A 
           12Fan Speeds (RPM) N/A 
           12GPU 12device radeon 12temp 34 C 12device radeon 12temp 31 C 
12Info:      12Processes 224 12Uptime 1h 49m 12Memory 7.77 GiB 12used 1.86 GiB (23.9%) 12Init systemd 12v 245 
           12Compilers 12gcc 10.1.0 12clang 10.0.0 12Client Unknown Client: systemd 12inxi 3.0.37 
[manjaro-gnome /]# sudo parted -l
Model: ATA WDC WD5000AAKS-0 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size   File system  Name                  Flags
 1      1049kB  250GB  250GB  ntfs                               msftdata
 2      250GB   500GB  250GB               Basic data partition  msftdata


Model: ATA Corsair Force GT (scsi)
Disk /dev/sdb: 60.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  59.0GB  59.0GB  primary  ntfs         boot
 2      59.0GB  59.5GB  556MB   primary  ntfs         msftres
 3      59.5GB  60.0GB  472MB   primary  ntfs         msftres


Model: ATA WDC WD5000AAKX-0 (scsi)
Disk /dev/sdc: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size   Type     File system  Flags
 1      32.3kB  500GB  500GB  primary


Model: ATA Samsung SSD 850 (scsi)
Disk /dev/sdd: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type     File system     Flags
 1      1049kB  241GB  241GB   primary  ext4            boot
 2      241GB   250GB  9449MB  primary  linux-swap(v1)


Model: IS917 innostor (scsi)
Disk /dev/sde: 16.1GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 2      2773MB  2777MB  4194kB  primary               esp


[manjaro-gnome /]# sudo efibootmgr -v
EFI variables are not supported on this system.

open a terminal and report any errors
exit for quit chroot

sudo manjaro-chroot -a ( type 1 if only one line ) 
cat /etc/fstab ( list UUID here )
lsblk -fs ( check letter X /dev/sdX here , UUID same as /etc/fstab)
grub-install /dev/sdX ( or /dev/nvmeX) --recheck --verbose
grub-mkconfig -o /boot/grub/grub.cfg
update-grub
exit ( quit chroot )

then reboot

Sadly no luck:

[manjaro-gnome /]# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Found linux image: /boot/vmlinuz-4.19-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.19-x86_64.img
Found initrd fallback image: /boot/initramfs-4.19-x86_64-fallback.img
error: invalid volume.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
error: invalid volume.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
error: invalid volume.
grub-probe: error: cannot find a GRUB drive for /dev/sdc2.  Check your device.map.
error: invalid volume.
grub-probe: error: cannot find a GRUB drive for /dev/sdc2.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sde1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sde1.  Check your device.map.
Found Windows 10 on /dev/sdb1
Found memtest86+ image: /boot/memtest86+/memtest.bin
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 135
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.  */


[manjaro-gnome /]# update-grub
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.4-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.4-x86_64.img
Found initrd fallback image: /boot/initramfs-5.4-x86_64-fallback.img
Found linux image: /boot/vmlinuz-4.19-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-4.19-x86_64.img
Found initrd fallback image: /boot/initramfs-4.19-x86_64-fallback.img
error: invalid volume.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
error: invalid volume.
grub-probe: error: cannot find a GRUB drive for /dev/sdc1.  Check your device.map.
error: invalid volume.
grub-probe: error: cannot find a GRUB drive for /dev/sdc2.  Check your device.map.
error: invalid volume.
grub-probe: error: cannot find a GRUB drive for /dev/sdc2.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sde1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sde1.  Check your device.map.
Found Windows 10 on /dev/sdb1
Found memtest86+ image: /boot/memtest86+/memtest.bin
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 135
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.

missing some libraries i think

Try rebuilding your Grub environment and see it it helps.

From within chroot:

mv /etc/default/grub /etc/default/grub.old

mv /etc/grub.d /etc/grub.d.old

rm /boot/grub/grubenv

grub-editenv /boot/grub/grubenv create

pacman -Syu grub

grub-install /dev/sdx --recheck --verbose (replace x with the actual letter of the disk)

update-grub

exit (to quit chroot)

Reboot.

Hope this helps.

1 Like

Thank you @Marte and @stephane, this worked!

(Gotta love this forum, really :slight_smile: )

1 Like

You are welcome! Good to hear you got it working!

:slightly_smiling_face:

1 Like

Forum kindly sponsored by