GRUB problem and how to solve it

Hello. Help needed!

I almost changed the configuration (from Intel to AMD) and therefore, from a bootable Manjaro flash, I did a Grub repair. Everything went OK, but I didn’t notice that the system gave me a GRUB error during the repair (and even like this), which I don’t know how it happened and even less know how to fix it
Namely, the Grub repair did the job and restored my boot menu to its previous state (win 11 pro, Manjaro KDE, in that order) and it all works, however, I updated the Kernel to KDE and then updated GRUB which is on KDE disk, however, GRUB booting from the KDE disk does not register any changes but always throws the following error during repair:

~ > sudo update-grub
[sudo] password for neogeo: 
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-6.9-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-6.9-x86_64.img
Found initrd fallback image: /boot/initramfs-6.9-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Manjaro Linux (24.0.8) on /dev/sda3
Found linux image: /boot/vmlinuz-6.9-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-6.9-x86_64.img
Found initrd fallback image: /boot/initramfs-6.9-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Manjaro Linux (24.0.8) on /dev/sda3
Found linux image: /boot/vmlinuz-6.9-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-6.9-x86_64.img
Found initrd fallback image: /boot/initramfs-6.9-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Manjaro Linux (24.0.8) on /dev/sda3
Adding boot menu entry for UEFI Firmware Settings ...
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Manjaro Linux (24.0.8) on /dev/sda3
Adding boot menu entry for UEFI Firmware Settings ...
Root filesystem isn't btrfs
If you think an error has occurred, please file a bug report at "https://github.com/Antynea/grub-btrfs"
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 241
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.
~ > _

Can HELP me to return this GRUB on the KDE disk to “normal”/initial correct state and register all changes on disks/partitions as before (i have not any BTRFS jobs before and after and have no more XFCE installation)?!

Thanks in advance!

Check the contents of these files for syntax errors:

  • /etc/default/grub
  • /etc/grub.d/*

The syntax should be VAR=value pairs, or comments starting with a hash / # character.

For example:

# GRUB boot loader configuration

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor resume=UUID=9c73e731-a0a2-40cf-a875-feb92ff30bed udev.log_priority=3"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
# [...SNIP...]
1 Like

Its helpfull to post your system information with:

inxi --admin --verbosity=5 --filter --no-host --width

Post your Grub file output also, could help us.

Here it is:

~ > inxi --admin --verbosity=5 --filter --no-host --width
System:
  Kernel: 6.9.12-3-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.9-x86_64
    root=UUID=568f4508-193f-4942-80b0-5a10516304fc rw quiet splash
    udev.log_priority=3
  Desktop: KDE Plasma v: 6.0.5 tk: Qt v: N/A info: frameworks v: 6.5.0
    wm: kwin_x11 tools: xscreensaver,xscreensaver-systemd vt: 2 dm: SDDM
    Distro: Manjaro base: Arch Linux
Machine:
  Type: Desktop Mobo: ASRock model: B450M Pro4 R2.0
    serial: <superuser required> uuid: <superuser required>
    UEFI: American Megatrends v: P10.20 date: 07/03/2024
Memory:
  System RAM: total: 16 GiB available: 13.52 GiB used: 2.79 GiB (20.6%)
  Message: For most reliable report, use superuser + dmidecode.
  Array-1: capacity: 128 GiB slots: 4 modules: 2 EC: None
    max-module-size: 32 GiB note: est.
  Device-1: Channel-A DIMM 0 type: no module installed
  Device-2: Channel-A DIMM 1 type: DDR4 detail: synchronous unbuffered
    (unregistered) size: 8 GiB speed: 3200 MT/s volts: note: check curr: 1
    min: 1 max: 1 width (bits): data: 64 total: 64 manufacturer: Corsair
    part-no: CMK16GX4M2E3200C16 serial: N/A
  Device-3: Channel-B DIMM 0 type: no module installed
  Device-4: Channel-B DIMM 1 type: DDR4 detail: synchronous unbuffered
    (unregistered) size: 8 GiB speed: 3200 MT/s volts: note: check curr: 1
    min: 1 max: 1 width (bits): data: 64 total: 64 manufacturer: Corsair
    part-no: CMK16GX4M2E3200C16 serial: N/A
CPU:
  Info: model: AMD Ryzen 5 5500GT with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 3 gen: 3 level: v3 note: check built: 2021-22
    process: TSMC n7 (7nm) family: 0x19 (25) model-id: 0x50 (80) stepping: 0
    microcode: 0xA50000F
  Topology: cpus: 1x dies: 1 clusters: 1 cores: 6 threads: 12 tpc: 2
    smt: enabled cache: L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 3 MiB
    desc: 6x512 KiB L3: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 400 min/max: 400/4457 scaling: driver: amd-pstate-epp
    governor: powersave cores: 1: 400 2: 400 3: 400 4: 400 5: 400 6: 400 7: 400
    8: 400 9: 400 10: 400 11: 400 12: 400 bogomips: 86269
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow mitigation: Safe RET
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines; IBPB: conditional; IBRS_FW;
    STIBP: always-on; RSB filling; PBRSB-eIBRS: Not affected; BHI: Not
    affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Cezanne [Radeon Vega Series /
    Radeon Mobile Series] driver: amdgpu v: kernel arch: GCN-5 code: Vega
    process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s ports: active: DP-1
    empty: HDMI-A-1,HDMI-A-2 bus-ID: 07:00.0 chip-ID: 1002:1638 class-ID: 0300
    temp: 29.0 C
  Display: x11 server: X.Org v: 21.1.13 with: Xwayland v: 24.1.2
    compositor: kwin_x11 driver: X: loaded: amdgpu unloaded: modesetting
    alternate: fbdev,vesa dri: radeonsi gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93") monitors: <missing: xrandr>
  Monitor-1: DP-1 model: Samsung SyncMaster serial: <filter> built: 2010
    res: 1920x1080 dpi: 102 gamma: 1.2 size: 477x268mm (18.78x10.55")
    diag: 547mm (21.5") ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
    device: 1 drv: swrast gbm: drv: kms_swrast surfaceless: drv: radeonsi x11:
    drv: radeonsi inactive: wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.1.6-arch1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon Graphics (radeonsi renoir
    LLVM 18.1.8 DRM 3.57 6.9.12-3-MANJARO) device-ID: 1002:1638
    memory: 1.95 GiB unified: no
  API: Vulkan v: 1.3.279 layers: N/A device: 0 type: integrated-gpu name: AMD
    Radeon Graphics (RADV RENOIR) driver: mesa radv v: 24.1.6-arch1.1
    device-ID: 1002:1638 surfaces: xcb,xlib
Audio:
  Device-1: Advanced Micro Devices [AMD/ATI] Renoir Radeon High Definition
    Audio driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s bus-ID: 07:00.1 chip-ID: 1002:1637
    class-ID: 0403
  Device-2: Advanced Micro Devices [AMD] Family 17h/19h HD Audio
    vendor: ASRock driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s
    lanes: 16 link-max: gen: 4 speed: 16 GT/s bus-ID: 07:00.6
    chip-ID: 1022:15e3 class-ID: 0403
  API: ALSA v: k6.9.12-3-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.2.3 status: off with: pipewire-media-session
    status: active tools: pw-cli
  Server-3: PulseAudio v: 17.0 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: ASRock driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: f000 bus-ID: 04:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp4s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Info: services: NetworkManager,systemd-timesyncd
Drives:
  Local Storage: total: 1.38 TiB used: 49.51 GiB (3.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Gigabyte model: GP-GSM2NE3512GNTD
    size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: EDFMB0.5 temp: 19.9 C
    scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Geil model: R3 256GB size: 238.47 GiB
    block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s tech: SSD
    serial: <filter> fw-rev: 8A0 scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 vendor: Western Digital
    model: WD7500LPCX-60HWST0 size: 698.64 GiB block-size: physical: 4096 B
    logical: 512 B speed: 6.0 Gb/s tech: HDD rpm: 5400 serial: <filter>
    fw-rev: 1A01 scheme: MBR
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 238.18 GiB size: 233.38 GiB (97.99%)
    used: 49.48 GiB (21.2%) fs: ext4 dev: /dev/sda2 maj-min: 8:2 label: N/A
    uuid: 568f4508-193f-4942-80b0-5a10516304fc
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 27.1 MiB (9.0%) fs: vfat dev: /dev/sda1 maj-min: 8:1 label: N/A
    uuid: 311C-C048
Swap:
  Alert: No swap data was found.
Sensors:
  System Temperatures: cpu: 32.2 C mobo: N/A gpu: amdgpu temp: 29.0 C
  Fan Speeds (rpm): N/A
Info:
  Processes: 318 Power: uptime: 1h 9m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 5.39 GiB services: org_kde_powerdevil,
    power-profiles-daemon, upowerd Init: systemd v: 256 default: graphical
    tool: systemctl
  Packages: 1579 pm: pacman pkgs: 1565 libs: 382 tools: pamac pm: flatpak
    pkgs: 14 Compilers: clang: 18.1.8 gcc: 14.2.1 Shell: Zsh v: 5.9 default: Bash
    v: 5.2.32 running-in: konsole inxi: 3.3.36
~ >_

but don’t know how to read Grub file or exactly what Grub file?

I have checked out those files and i can’t see any syntax error or who can made it if i don’t touch any of that? :frowning:

Is there something wrong with your configuration?
Do you have extra files in /etc/grub.d ?

These will search and print, and paste, creating a link to share.

  • Contents of your main grub config file
cat /etc/default/grub | curl -F 'file=@-' https://0x0.st
  • Package ownership (or not) of extra scripts/settings
pacman -Qo /etc/grub.d/* 2>&1 | curl -F 'file=@-' https://0x0.st
  • Find and print all those grub files along with their filenames
head -n -0 $(find /etc/grub.d/ -type f | sort) | curl -F 'file=@-' https://0x0.st

If you dont want to use the paste service for whatever reason then you can leave off the last pipe.
( | curl -F 'file=@-' https://0x0.st )

If you have directory /etc/default/grub.d with anything in it then we would also want to see that, though I guess it is not there.

1 Like

Your issue is likely related to this. Grub-Customizer makes changes to configuration files etc. which are hard to reverse unless you are really familiar with what it does.

My suggestion is to remove all traces of it and then reinstall GRUB from scratch.

5 Likes

Yes i have and i use a Grub Customizer and how to remove all of its traces?
I am just a novice Linux user…

Here is a LINK to a Grub contents
Here is a LINK to a Package ownership
And here is a LINK to an all Grub files wut filenames

I did find this which might provide some insight. I’m reading through it now.

1 Like

Your Kernel needs an update.

Switch to LTS Kernel 6.6 or a newer Kernel like 6.10 for example.

4 Likes

I have updated my distro to 6.10 Kernel and have removed old 6.9 but ‘update-grub’ refuses to load new Kernel and give me (now after 6.9 moving) an error of a missing 6.9 Kernel. When i manually edit grub boot parameter with ‘e’ and have a change 6.9 to 6.10 then hit F10 , distro loads like a charm with 6.10Kernel :frowning:

What changes with e(edit)?

Maybe you can open the Terminal in Manjaro again.

sudo nano /etc/default/grub

You can also remove quiet splash there (to get rid of plymouth).

Do your changes again what you did earlier after pressing E, save the file and then:

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

How you did remove 6.9 any logs? Did you do that with manjaro settings manager?

@neogeo
There is also the option to use install-grub Script that may could automatical repair your broken grub, with reinstalling (included newest Grub version) the whole grub instead just repair/update, check this article out if you want:

In short download install-grub and then:

sudo pacman -S grub

Should be enough.

Restart and when you look inside your Grub Menue a new version should show up 2.12-4 that you have the latest Grub Version.

2 Likes

We may also want to see a few other places

ls -1 /{boot,etc/mkinitcpio.d,lib/modules}/ | curl -F 'file=@-' https://0x0.st

So what about these files?
Where are they from?
Do you need them?


Also … did we use grub-customizer? :point_down:

:warning: NEVER USE THIS TRASH :warning:
:face_with_head_bandage: IT WILL BREAK THINGS :face_with_head_bandage:

4 Likes

I think you hopefully learned a valuable lesson: do not just click and install anything you find out there, without understanding what it does. And the more customization you make, the harder it will be to debug and troubleshoot.

If that is of any consolation, i have been there. Managed to completely break Ubuntu 7 in under a week, then i returned to windows for a couple more years, before i tried the transition to linux again. I just was not ready to invest time in learning back then.

To not be completely offtopic: i also see i mix of gpt and mbr disks, which might be a part of the problem. And it seems you have more than one manjaro installs. And i suspect when you update grub you update it on the wrong disk, so it is not updated at all actually, on the disk you boot from.

I post this for reference

Obviously you need to adapt the commands, because you have 3 disks and a mix of mbr and uefi, which does not work together out of the box anyway.

4 Likes

I read all Your advice and did something on my own to solve problem.
I uninstalled a Grub Customizer which deleted all its files, after that I deleted the existing Grub files, uninstalled Grub, reinstalled it and updated it. After that, I restarted the system and everything works as it should and should be.
Thank you all for your selfless help!

P.S. I just don’t understand how such a stupid idea didn’t occur to me at the beginning…
THANKS TO ALL OF YOU!

2 Likes

I was going to suggest the linux69 kernel as being part of the issue, but it seems the latest .ISO still has that? … this really needs to be changed, IMHO.

:wink:

3 Likes

I imagine most behind the scenes are waiting for Plasma 6.1 to be ready (it’s in Testing now); which promises to be a great improvement for Manjaro KDE users.

A newer kernel, along with improvements and fixes for other editions, will probably coincide with the release of the next generally available ISOs.

At least, that’s my guess.

1 Like

I also wait for the next lts kernel, should be 6.11 or 6.12. And that would be the iso to download

1 Like

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