Grub-mkconfig generates wrong lines for other linux os

Hi everyone :smiley:

inxi -Faz
System:
Kernel: 5.15.12-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=6f58aafa-9f36-4ae5-940b-ca0f2c54cd24 rw rootflags=subvol=@
splash rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1 loglevel=3
Desktop: KDE Plasma 5.23.4 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11
vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop System: HP product: HP Z4 G4 Workstation v: N/A
serial: <superuser required> Chassis: type: 3 serial: <superuser required>
Mobo: HP model: 81C5 v: MVB serial: <superuser required> UEFI: HP
v: P62 v02.75 date: 09/28/2021
Battery:
Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 3
serial: <filter> charge: 100% (should be ignored) rechargeable: yes
status: Discharging
CPU:
Info: model: Intel Core i9-10920X bits: 64 type: MT MCP arch: Cascade Lake
family: 6 model-id: 0x55 (85) stepping: 7 microcode: 0x5003103
Topology: cpus: 1x cores: 12 tpc: 2 threads: 24 smt: enabled cache:
L1: 768 KiB desc: d-12x32 KiB; i-12x32 KiB L2: 12 MiB desc: 12x1024 KiB
L3: 19.2 MiB desc: 1x19.2 MiB
Speed (MHz): avg: 2191 high: 4265 min/max: 1200/4800:4600:4700 scaling:
driver: intel_pstate governor: performance cores: 1: 2210 2: 1200 3: 1201
4: 1956 5: 4265 6: 3498 7: 2013 8: 2366 9: 3664 10: 1956 11: 1201
12: 2481 13: 1311 14: 2243 15: 1631 16: 1201 17: 1201 18: 1200 19: 2424
20: 1200 21: 3274 22: 2601 23: 2633 24: 3654 bogomips: 167995
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
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: Enhanced IBRS, IBPB: conditional, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort mitigation: TSX disabled
Graphics:
Device-1: NVIDIA TU102 [GeForce RTX 2080 Ti Rev. A] vendor: PNY
driver: nvidia v: 495.46 alternate: nouveau,nvidia_drm bus-ID: 21:00.0
chip-ID: 10de:1e07 class-ID: 0300
Device-2: Logitech StreamCam type: USB
driver: hid-generic,snd-usb-audio,usbhid,uvcvideo bus-ID: 2-5:2
chip-ID: 046d:0893 class-ID: 0300 serial: <filter>
Display: x11 server: X.Org 1.21.1.2 compositor: kwin_x11 driver:
loaded: nvidia display-ID: :0 screens: 1
Screen-1: 0 s-res: 3840x2160 s-dpi: 162 s-size: 602x341mm (23.7x13.4")
s-diag: 692mm (27.2")
Monitor-1: DP-2 res: 3840x2160 hz: 60 dpi: 163
size: 598x336mm (23.5x13.2") diag: 686mm (27")
Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
Device-1: Intel 200 Series PCH HD Audio vendor: Hewlett-Packard
driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a2f0
class-ID: 0403
Device-2: NVIDIA TU102 High Definition Audio vendor: PNY
driver: snd_hda_intel v: kernel bus-ID: 21:00.1 chip-ID: 10de:10f7
class-ID: 0403
Device-3: Blue Microphones Yeti Stereo Microphone type: USB
driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-13:7 chip-ID: b58e:9e84
class-ID: 0300 serial: <filter>
Device-4: Logitech StreamCam type: USB
driver: hid-generic,snd-usb-audio,usbhid,uvcvideo bus-ID: 2-5:2
chip-ID: 046d:0893 class-ID: 0300 serial: <filter>
Sound Server-1: ALSA v: k5.15.12-zen1-1-zen running: yes
Sound Server-2: JACK v: 1.9.19 running: no
Sound Server-3: PulseAudio v: 15.0 running: yes
Sound Server-4: PipeWire v: 0.3.42 running: yes
Network:
Device-1: Intel Ethernet I219-V vendor: Hewlett-Packard driver: e1000e
v: kernel port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15b8 class-ID: 0200
IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel bus-ID: 07:00.0
chip-ID: 8086:2723 class-ID: 0280
IF: wlp7s0 state: down mac: <filter>
Bluetooth:
Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8
bus-ID: 1-12:6 chip-ID: 8087:0029 class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
RAID:
Hardware-1: Intel C600/X79 series SATA RAID Controller driver: ahci v: 3.0
port: 2020 bus-ID: 00:17.0 chip-ID: 8086:2826 rev: class-ID: 0104
Drives:
Local Storage: total: 2.75 TiB used: 548.89 GiB (19.5%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
model: MZVLB1T0HBLR-000H1 size: 953.87 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: HPS0NEXF temp: 29.9 C scheme: GPT
ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital
model: WD20EZRZ-00Z5HB0 size: 1.82 TiB block-size: physical: 4096 B
logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
rev: 0A80 scheme: GPT
Partition:
ID-1: / raw-size: 68.25 GiB size: 68.25 GiB (100.00%)
used: 51.54 GiB (75.5%) fs: btrfs dev: /dev/nvme0n1p12 maj-min: 259:12
ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%)
used: 135.5 MiB (52.9%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 49.53 GiB size: 49.53 GiB (100.00%)
used: 15.65 GiB (31.6%) fs: btrfs dev: /dev/nvme0n1p11 maj-min: 259:11
ID-4: /var/log raw-size: 68.25 GiB size: 68.25 GiB (100.00%)
used: 51.54 GiB (75.5%) fs: btrfs dev: /dev/nvme0n1p12 maj-min: 259:12
ID-5: /var/tmp raw-size: 68.25 GiB size: 68.25 GiB (100.00%)
used: 51.54 GiB (75.5%) fs: btrfs dev: /dev/nvme0n1p12 maj-min: 259:12
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: partition size: 32.91 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/nvme0n1p9 maj-min: 259:9
ID-2: swap-2 type: zram size: 31.14 GiB used: 256 KiB (0.0%)
priority: 100 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 38.0 C mobo: N/A gpu: nvidia temp: 45 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 32%
Info:
Processes: 504 Uptime: 11m wakeups: 2 Memory: 31.14 GiB
used: 6.41 GiB (20.6%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1557 lib: 353 Shell: fish
v: 3.3.1 running-in: konsole inxi: 3.3.11

there's something wrong with further linux os when running grub-mkconfig
in /boot/grub/grub.cfg the output lines for that os contain an undesired ^ simbol instead of blank space, like this:
initrd /boot/intel-ucode.img^/boot/initramfs-linux.img

found the same in that discussion:
Os-prober-btrfs generating faulty entries

seems like an update took away a snippet of code in /etc/grub.d/30_os-prober; here are actual lines 213 and 214:

        LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
        LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' '`"

line 213 miss the final | tr '^' ' '
inserting it and running again grub-mkconfig, all is right again

on my archlinux installation there's the same line 213, and same problem with os-prober
on manjaro, line 213 is correct

I'm not so expert about the package maintenance chain: which is the right place to notify this?
until patch, changing that line and re-running grub-mkconfig can set things right if anyone found the same problem

Paging @librewish cause he's the package maintainer

2 Likes

Looks like an upstream bug in grub itself? That file is owned by the grub package, and arch doesn't seem to apply any patches to it. It's certainly not a Garuda Linux issue :thinking:

1 Like

Well we could use hook but don't know if it's worth it

1 Like