Windows bootloader in grub

Hi all. Installed next to garuda windows 11 on the same ssd. The grub boot does not show the windows bootloader. To start it, you have to manually switch the boot in bios. Then the download is only from windows. I want to add a bootloader to grub.
I checked with the os-prober program, this line is displayed
/dev/sda3@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
Next I do the command sudo update-grub
getting it

Generating grub configuration file ...
Found theme: /usr/share/grub/themes/garuda-dr460nized/theme.txt
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-zen-fallback.img
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-zen-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/sda3@/EFI/Microsoft/Boot/bootmgfw.efi
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/sda3@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
Detecting snapshots ...
Found snapshot: 2023-03-23 19:08:14 | @/.snapshots/350/snapshot | post | os-prober os-prober-btrfs            |
Found snapshot: 2023-03-23 19:08:12 | @/.snapshots/349/snapshot | pre  | pacman -S os-prober                  |
Found snapshot: 2023-03-23 18:55:23 | @/.snapshots/348/snapshot | post | garuda-boot-options grub-customizer grub-garuda |
Found snapshot: 2023-03-23 18:55:19 | @/.snapshots/347/snapshot | pre  | pacman --sync -- community/grub-customizer      |
Found 4 snapshot(s)
Unmount /tmp/grub-btrfs.iOXknfTSBk .. Success
Found memtest86+ image: /boot/memtest86+/memtest.bin
Found memtest86+ image: /boot/memtest86+/memtest.bin
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 307
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.

Where to dig further? I can't find line 307

Search in forum or for /etc/default/grub.

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
GRUB_DISABLE_OS_PROBER=false

BTW, garuda-inxi???

2 Likes

Файл /etc/default/grub содержит строку GRUB_DISABLE_OS_PROBER=false.
Если я сделаю это истинным или прокомментирую, оно появится

Generating grub configuration file ...
Found theme: /usr/share/grub/themes/garuda-dr460nized/theme.txt
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot: intel-ucode.img initramfs-linux-zen-fallback.img
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot: intel-ucode.img initramfs-linux-zen-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.

If you don’t find line 307 in /etc/default/grub, check in /boot/grub/grub.cfg.

4 Likes

Yes, or it looks like the problematic line may be in /boot/grub/grub.cfg.new:

Paste your /etc/default/grub into the thread so we can take a look, as well the output of ls /etc/grub.d/.

Also, as mentioned, garuda-inxi is missing.

4 Likes

Indeed, line 307 is in the file boot/grub/grub.cfg.new
with content

#if [ ${grub_platform} == "efi" ]; then
#	menuentry "Firmware Setup (UEFI)" --class recovery {
#		fwsetup
#	}
#fi

Run garuda-inxi

System:
Kernel: 6.2.5-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=5370ef87-f873-4437-b9f6-5dd6a6200a48 rw rootflags=subvol=@
quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
loglevel=3 ibt=off
Desktop: KDE Plasma v: 5.27.2 tk: Qt v: 5.15.8 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: ASUSTeK product: N56VZ v: 1.0
serial: <superuser required>
Mobo: ASUSTeK model: N56VZ v: 1.0 serial: <superuser required>
UEFI: American Megatrends v: N56VZ.211 date: 08/21/2012
Battery:
ID-1: BAT0 charge: 28.2 Wh (100.0%) condition: 28.2/48.4 Wh (58.2%)
volts: 12.4 min: 11.1 model: ASUSTeK N56--52 type: Li-ion serial: N/A
status: full
CPU:
Info: model: Intel Core i7-3610QM bits: 64 type: MT MCP arch: Ivy Bridge
gen: core 3 level: v2 built: 2012-15 process: Intel 22nm family: 6
model-id: 0x3A (58) stepping: 9 microcode: 0x21
Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
L3: 6 MiB desc: 1x6 MiB
Speed (MHz): avg: 1514 high: 3269 min/max: 1200/3300 scaling:
driver: intel_cpufreq governor: schedutil cores: 1: 3269 2: 1607 3: 1200
4: 1200 5: 1200 6: 1200 7: 1240 8: 1200 bogomips: 36716
Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Graphics:
Device-1: Intel 3rd Gen Core processor Graphics vendor: ASUSTeK N56VZ
driver: i915 v: kernel arch: Gen-7 process: Intel 22nm built: 2012-13 ports:
active: LVDS-1 empty: VGA-1 bus-ID: 00:02.0 chip-ID: 8086:0166
class-ID: 0300
Device-2: NVIDIA GK107M [GeForce GT 650M] vendor: ASUSTeK N56VZ
driver: nouveau v: kernel non-free: series: 470.xx+
status: legacy-active (EOL~2023/24) arch: Kepler code: GKxxx
process: TSMC 28nm built: 2012-18 pcie: gen: 1 speed: 2.5 GT/s lanes: 16
link-max: gen: 3 speed: 8 GT/s ports: active: none empty: HDMI-A-1
bus-ID: 01:00.0 chip-ID: 10de:0fd1 class-ID: 0300 temp: 51.0 C
Device-3: Sunplus Innovation Asus Webcam type: USB driver: uvcvideo
bus-ID: 2-1.3:4 chip-ID: 1bcf:2883 class-ID: 0e02
Display: x11 server: X.Org v: 21.1.7 with: Xwayland v: 22.1.8
compositor: kwin_x11 driver: X: loaded: modesetting,nouveau
alternate: fbdev,intel,nv,vesa dri: crocus,nouveau gpu: i915
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")
Monitor-1: LVDS-1 model: Seiko Epson 0x314c built: 2011 res: 1920x1080
hz: 60 dpi: 142 gamma: 1.2 size: 344x194mm (13.54x7.64") diag: 395mm (15.5")
ratio: 16:9 modes: 1920x1080
API: OpenGL v: 4.2 Mesa 22.3.6 renderer: Mesa Intel HD Graphics 4000 (IVB
GT2) direct-render: Yes
Audio:
Device-1: Intel 7 Series/C216 Family High Definition Audio
vendor: ASUSTeK N56VZ driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
chip-ID: 8086:1e20 class-ID: 0403
Device-2: NVIDIA GK107 HDMI Audio driver: snd_hda_intel v: kernel pcie:
gen: 1 speed: 2.5 GT/s lanes: 16 link-max: gen: 3 speed: 8 GT/s
bus-ID: 01:00.1 chip-ID: 10de:0e1b class-ID: 0403
Sound API: ALSA v: k6.2.5-zen1-1-zen running: yes
Sound Server-1: PulseAudio v: 16.1 running: no
Sound Server-2: PipeWire v: 0.3.67 running: yes
Network:
Device-1: Qualcomm Atheros AR9485 Wireless Network Adapter vendor: AzureWave
driver: ath9k v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
bus-ID: 03:00.0 chip-ID: 168c:0032 class-ID: 0280
IF: wlp3s0 state: up mac: <filter>
Device-2: Qualcomm Atheros AR8161 Gigabit Ethernet vendor: ASUSTeK N56VZ
driver: alx v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000
bus-ID: 04:00.0 chip-ID: 1969:1091 class-ID: 0200
IF: enp4s0 state: down mac: <filter>
Bluetooth:
Device-1: IMC Networks Atheros AR3012 Bluetooth 4.0 Adapter type: USB
driver: btusb v: 0.8 bus-ID: 2-1.1:3 chip-ID: 13d3:3362 class-ID: e001
serial: <filter>
Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
Local Storage: total: 961.41 GiB used: 107.08 GiB (11.1%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 250GB
size: 232.89 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
type: SSD serial: <filter> rev: 3B6Q scheme: GPT
ID-2: /dev/sdb maj-min: 8:16 vendor: Hitachi model: HTS547575A9E384
size: 698.64 GiB block-size: physical: 4096 B logical: 512 B speed: 3.0 Gb/s
type: HDD rpm: 5400 serial: <filter> rev: A60A scheme: GPT
ID-3: /dev/sdc maj-min: 8:32 type: USB model: Multiple Card Reader
size: 29.89 GiB block-size: physical: 512 B logical: 512 B type: N/A
serial: <filter> rev: 1.00
SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
ID-1: / raw-size: 175.95 GiB size: 175.95 GiB (100.00%)
used: 107.05 GiB (60.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%)
used: 29.8 MiB (31.0%) fs: vfat dev: /dev/sda3 maj-min: 8:3
ID-3: /home raw-size: 175.95 GiB size: 175.95 GiB (100.00%)
used: 107.05 GiB (60.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-4: /var/log raw-size: 175.95 GiB size: 175.95 GiB (100.00%)
used: 107.05 GiB (60.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-5: /var/tmp raw-size: 175.95 GiB size: 175.95 GiB (100.00%)
used: 107.05 GiB (60.8%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 15.51 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 62.0 C mobo: N/A gpu: nouveau temp: 51.0 C
Fan Speeds (RPM): cpu: 2500
Info:
Processes: 300 Uptime: 1h 30m wakeups: 1 Memory: 15.51 GiB
used: 4.86 GiB (31.3%) Init: systemd v: 253 default: graphical
tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: pm: pacman
pkgs: 1518 libs: 452 tools: octopi,pamac,paru pm: rpm pkgs: 0 pm: flatpak
pkgs: 0 Shell: fish v: 3.6.0 default: Bash v: 5.1.16 running-in: konsole
inxi: 3.3.25
Garuda (2.6.15-1):
System install date:     2022-12-07
Last full system update: 2023-03-23
Is partially upgraded:   No
Relevant software:       snapper NetworkManager mkinitcpio
Windows dual boot:       Probably (Run as root to verify)
Failed units:

/etc/default/grub

# GRUB boot loader configuration

GRUB_DEFAULT="0"
GRUB_TIMEOUT="5"
GRUB_DISTRIBUTOR="Garuda"
GRUB_CMDLINE_LINUX_DEFAULT="quiet quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3 ibt=off # Modified by garuda-migrations: ibt=off"
GRUB_CMDLINE_LINUX=""

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

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK="y"

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE="menu"

# 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-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
GRUB_THEME="/usr/share/grub/themes/garuda-dr460nized/theme.txt"

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

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU="y"

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
# GRUB_DISABLE_OS_PROBER="false"

ls /etc/grub.d/

Those proxifiedScripts come from grub-customizer by any chance?

Latest Update to Grub has an error with grub-mkconfig (when using grub-customizer) - Applications - EndeavourOS

4 Likes

I ran grub-customizer , tried to add a download. But then he deleted all the records

That. Don’t. Now you know.

2 Likes

Then, I think the options are:

  1. Remove any configuration files and folders in /etc/grub.d/ (should be the files/folders dated 23-Mar 18:56 and 18:59) and try sudo update-grub
  2. Restore a snapshot from before you installed GRUB customizer (around 23-Mar 18:59, I see)

Edit: Before 1. of course, remove grub-customizer:

sudo pacman -Rns grub-customizer
2 Likes

After running the command, I see this

Generating grub configuration file ...
Script `/boot/grub/grub.cfg.new' contains no commands and will do nothing
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.

Deleted folders and files in the folder /etc/grub.d/ as a result, it was deleted completely

Sorry, what was deleted completely?
Maybe delete also this /boot/grub/grub.cfg.new.
And if nothing else works, consider option 2…

1 Like

Try sudo pacman -S grub to restore the default scripts in /etc/grub.d/.
I think that should work. Failing that, snapshot?

4 Likes

I didn't delete all the files on purpose. Deleted 1 and all were gone. I think they were dependent. The system boots normally, everything works

Super. It worked. I see the windows bootloader. Indeed, there was a problem. Garuda recovery tab missing (snapshots)

After command
sudo update-grup

Generating grub configuration file ...
Found theme: /usr/share/grub/themes/garuda-dr460nized/theme.txt
Found linux image: /boot/vmlinuz-linux-zen
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-zen-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/sda3@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done
fish❯ pacman -Qo /etc/grub.d/*
/etc/grub.d/00_header is owned by grub 2:2.06.r456.g65bc45963-1
/etc/grub.d/10_linux is owned by grub 2:2.06.r456.g65bc45963-1
/etc/grub.d/20_linux_xen is owned by grub 2:2.06.r456.g65bc45963-1
/etc/grub.d/30_os-prober is owned by grub 2:2.06.r456.g65bc45963-1
/etc/grub.d/30_uefi-firmware is owned by grub 2:2.06.r456.g65bc45963-1
/etc/grub.d/35_fwupd is owned by fwupd 1.8.12-1
/etc/grub.d/40_custom is owned by grub 2:2.06.r456.g65bc45963-1
/etc/grub.d/41_custom is owned by grub 2:2.06.r456.g65bc45963-1
/etc/grub.d/41_snapshots-btrfs is owned by grub-btrfs 4.12-2
/etc/grub.d/60_memtest86+ is owned by memtest86+ 6.10-1
/etc/grub.d/61_custom_leave_options is owned by garuda-common-settings 2.6.15-1
/etc/grub.d/README is owned by grub 2:2.06.r456.g65bc45963-1

Looks like other packages may need reinstalling:
fwupd grub-btrfs memtest86+ garuda-common-settings

1 Like