Duplicate boot entries in Grub

Hello, I'm having some problems with duplicate entries.

garuda-inxi
System:
Kernel: 5.17.7-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=e138e3b5-1773-48b5-a56c-3a032b23b70a rw [email protected]
splash rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3 quiet
Desktop: KDE Plasma v: 5.24.5 tk: Qt v: 5.15.4 info: latte-dock
wm: kwin_x11 vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop System: Micro-Star product: MS-7B51 v: 1.0
serial: <superuser required>
Mobo: Micro-Star model: MPG Z390 GAMING PLUS (MS-7B51) v: 1.0
serial: <superuser required> UEFI: American Megatrends v: 1.C0
date: 10/10/2020
Battery:
Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard
serial: <filter> charge: 55% (should be ignored) rechargeable: yes
status: discharging
CPU:
Info: model: Intel Core i5-9600K bits: 64 type: MCP arch: Coffee Lake
family: 6 model-id: 0x9E (158) stepping: 0xD (13) microcode: 0xF0
Topology: cpus: 1x cores: 6 smt: <unsupported> cache: L1: 384 KiB
desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB L3: 9 MiB
desc: 1x9 MiB
Speed (MHz): avg: 4470 high: 4591 min/max: 800/4600 scaling:
driver: intel_pstate governor: performance cores: 1: 4502 2: 4226 3: 4500
4: 4591 5: 4499 6: 4505 bogomips: 44398
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 mitigation: TSX disabled
Type: tsx_async_abort mitigation: TSX disabled
Graphics:
Device-1: NVIDIA TU117 [GeForce GTX 1650] vendor: Gigabyte driver: nvidia
v: 515.43.04 alternate: nouveau,nvidia_drm pcie: gen: 3 speed: 8 GT/s
lanes: 16 bus-ID: 01:00.0 chip-ID: 10de:1f82 class-ID: 0300
Device-2: Realtek EKACOM-K20E type: USB driver: snd-usb-audio,uvcvideo
bus-ID: 1-3:2 chip-ID: 0bda:5696 class-ID: 0102 serial: <filter>
Display: x11 server: X.Org v: 21.1.3 with: Xwayland v: 22.1.1
compositor: kwin_x11 driver: X: loaded: nvidia unloaded: modesetting
alternate: fbdev,nouveau,nv,vesa gpu: nvidia display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 93 s-size: 524x292mm (20.63x11.50")
s-diag: 600mm (23.62")
Monitor-1: HDMI-0 res: 1920x1080 hz: 60 dpi: 94
size: 521x293mm (20.51x11.54") diag: 598mm (23.53") modes: N/A
OpenGL: renderer: NVIDIA GeForce GTX 1650/PCIe/SSE2
v: 4.6.0 NVIDIA 515.43.04 direct render: Yes
Audio:
Device-1: Intel Cannon Lake PCH cAVS vendor: Micro-Star MSI
driver: snd_hda_intel v: kernel
alternate: snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3
chip-ID: 8086:a348 class-ID: 0403
Device-2: NVIDIA vendor: Gigabyte driver: snd_hda_intel v: kernel pcie:
gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:10fa
class-ID: 0403
Device-3: Realtek EKACOM-K20E type: USB driver: snd-usb-audio,uvcvideo
bus-ID: 1-3:2 chip-ID: 0bda:5696 class-ID: 0102 serial: <filter>
Sound Server-1: ALSA v: k5.17.7-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.51 running: yes
Network:
Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel
bus-ID: 00:14.3 chip-ID: 8086:a370 class-ID: 0280
IF: wlo1 state: up mac: <filter>
Device-2: Intel Ethernet I219-V vendor: Micro-Star MSI driver: e1000e
v: kernel port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15bc class-ID: 0200
IF: eno2 state: up speed: 100 Mbps duplex: full mac: <filter>
Bluetooth:
Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB
driver: btusb v: 0.8 bus-ID: 1-14:5 chip-ID: 8087:0aaa class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 0 state: down
bt-service: enabled,running rfk-block: hardware: no software: yes
address: <filter>
Drives:
Local Storage: total: 7.06 TiB used: 1001.08 GiB (13.9%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:6 vendor: Western Digital
model: WDS500G2B0C-00PXH0 size: 465.76 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 211210WD temp: 37.9 C scheme: GPT
ID-2: /dev/nvme1n1 maj-min: 259:9 vendor: KingSpec model: NE-256
size: 238.47 GiB block-size: physical: 512 B logical: 512 B
speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: T1106A0
temp: 42.9 C scheme: GPT
ID-3: /dev/nvme2n1 maj-min: 259:0 vendor: Western Digital
model: WDS100T3X0C-00SJG0 size: 931.51 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 111110WD temp: 37.9 C scheme: GPT
ID-4: /dev/sda maj-min: 8:0 vendor: Western Digital
model: WDS100T2B0A-00SM50 size: 931.51 GiB block-size: physical: 512 B
logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 00WD
scheme: GPT
ID-5: /dev/sdb maj-min: 8:16 vendor: Western Digital
model: WD30EFRX-68EUZN0 size: 2.73 TiB block-size: physical: 4096 B
logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
rev: 0A82 scheme: GPT
ID-6: /dev/sdc maj-min: 8:32 vendor: Western Digital
model: WD20PURZ-85GU6Y0 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: 465.46 GiB size: 465.46 GiB (100.00%)
used: 263.56 GiB (56.6%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:8
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 2.8 MiB (0.9%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:7
ID-3: /home raw-size: 465.46 GiB size: 465.46 GiB (100.00%)
used: 263.56 GiB (56.6%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:8
ID-4: /var/log raw-size: 465.46 GiB size: 465.46 GiB (100.00%)
used: 263.56 GiB (56.6%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:8
ID-5: /var/tmp raw-size: 465.46 GiB size: 465.46 GiB (100.00%)
used: 263.56 GiB (56.6%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:8
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 31.29 GiB used: 1.8 MiB (0.0%)
priority: 100 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 27.8 C pch: 64.0 C mobo: N/A gpu: nvidia
temp: 53 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
Processes: 308 Uptime: 12m wakeups: 2 Memory: 31.29 GiB
used: 3.34 GiB (10.7%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 12.1.0 clang: 13.0.1 Packages: pacman: 1917 lib: 527 Shell: fish
v: 3.4.1 default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.15
Garuda (2.6.3-2):
System install date:     2022-04-03
Last full system update: 2022-05-16
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       Probably (Run as root to verify)
Snapshots:               Snapper (maybe)
Failed units:

I have a quad boot system, and on my grub screen I have 2 entries for each option.

I read the forum post here about multiple entries. I tried this solution linked from a Gentoo forum, by adding OS-prober exclusions to the etc/ default /grub for each drive asides from the Garuda boot drive, ran update-grub, rebooted and it didn't make a difference. I noticed during the update-grub process that it found all of my 4 OS's 4 times each it seemed during the probing.

I tried rEFIned for a test, and it just looked gash - about 7 penguin Icons, a dull grey screen, a windows icon, and 3 Ubuntu Icons (I don't have Ubuntu installed anywhere) and also 3 sets of keys which didn't seem to do much and a helpful Info screen which told me not a great deal, so I think that's out of the question.

Does anyone have any suggestions?

If you could post the output of

bat /boot/grub/grub.cfg

we could probably see what generates the entries.

I am assuming the OSes don't write into the same grub.cfg. If they do, I personnaly cannot help much. :frowning:

You have to set up rEFInd the way you like it.

Regarding the many icons, rEFInd will identify pretty much anything that looks bootable and set up an icon for it in case that is the method you want to choose. You just have to identify the ones you actually want, then hit the "delete" key on the others and it takes them off the menu (it doesn't actually delete anything, it just removes it from the menu).

As for the grey screen, most rEFInd enthusiasts will install a theme. A bunch of ideas are here: The rEFInd Boot Manager: Theming rEFInd

There are tons of other ones available on GitHub. Personally I'm partial to the "regular" theme: GitHub - bobafetthotmail/refind-theme-regular

2 Likes
[bat error]: '/etc/boot/grub/grub.cfg': No such file or directory (os error 2)

That does look nice - is there a manual online I can find how to use it?

Sorry I made a typo, it's /boot/grub/grub.cfg. loll But I think Bluehish's way is a better guess for now as you use reFIND.

Sorry, please ignore, I see you included manuals.

The answer to this question is "yes", although I'm not sure if you mean rEFInd or the Regular theme.

The Regular theme doesn't have much instruction needed: just install according to the GitHub page and it will ask you when you set it up what you want (dark or light theme, large or small icons).

Bear in mind, you will still get Tux icons for an OS that doesn't have a .png in /boot/efi/EFI/refind/icons. You can add in a .png and name it os_nameofdistro.png where "nameofdistro" matches the grub distributor (for Garuda, name the file os_garuda.png).

If you mean is there a manual for rEFInd, the website is a massive and complex resource that covers all kinds of subjects related to rEFInd, and also bootloaders in general: The rEFInd Boot Manager

3 Likes

When I am dealing with more than 2 OS, I usually disable autodetection, which is disabling os-prober for GRUB and disabling scanning of internal partitions for rEFInd, then I add my own boot entries.
For rEFInd, I add a few entries like

  • Boot the default kernel and initramfs (if the distro has fixed kernel/initramfs names)
  • Boot to singleuser mode, boot the previous kernel, boot the regular kernel etc.
  • Load the GRUB of the distro

For GRUB

  • Load that distro's GRUB configuration with configfile command
  • Boot the default kernel/initramfs
1 Like

I've been able to find a refind.config-sample file, but no refind.config file. Are they the same?

There isn't one set up--if you want to use one, you can make it.

In most cases you do not even need to make a refind.conf--it depends on what you want to boot. If you want to use rEFInd as your boot loader and just boot from EFI stubs or whatever, you may need one.

Open up the -sample file and find a boot stanza similar to the OS you want to boot to, then delete the "disabled" line and add in whatever the details are for what you need to boot. When you exit the file, delete the "-sample" and viola--you have your refind.conf.

Getting the boot stanza correct is very tricky--I fumbled with it quite a bit setting up my first one. Read through the documentation on the website, and also the Arch Wiki page here to help get it right.

For my Garuda installations, I prefer to let rEFInd boot to grub--that way you can easily restore a snapshot or change to a different kernel if you like. I typically disable OS-prober as well to tidy up the grub menu (it's not needed if you are using rEFInd anyway). If you are booting to a bootloader (grub, or something else), you do not need to make a boot stanza in refind.conf.

2 Likes

For more than one Garuda OS I use the simple /boot/grub/custom.cfg :smiley:
Tutorials in web, search for gohlip or Chrysostomus

menuentry "Garuda Linux i3wm auf nvme0n1p2" {
   insmod btrfs
   search --no-floppy --fs-uuid --set=root 35075ddb-bcf7-47aa-a43a-e759a082af57
   configfile /@/boot/grub/grub.cfg
   }
menuentry "Garuda Linux KDE auf sdb2" {
   insmod btrfs
   search --no-floppy --fs-uuid --set=root 95b9d929-b8bc-4eab-b19c-6026a70aa6b9
   configfile /@/boot/grub/grub.cfg
   }
menuentry "Garuda Cinnamon Live ISO"{
   insmod btrfs
   set dri="nonfree"
   set lang="de_DE"
   set keytable="de"
   set timezone="Europe/Berlin"
   set isofile="/@/live/garuda-cinnamon-linux-zen-220517.iso"
   search --no-floppy -f --set=root $isofile
   probe -u $root --set=abc
   set pqr="/@/dev/disk/by-uuid/$abc"
   loopback loop $isofile
   linux  (loop)/boot/vmlinuz-x86_64 img_dev=$pqr img_loop=$isofile driver=$dri tz=$timezone lang=$lang keytable=$keytable copytoram
   initrd (loop)/boot/amd_ucode.img (loop)/boot/initramfs-x86_64.img
   }
menuentry "Garuda i3wm Live ISO"  {
    insmod btrfs
    set isofile="/@/live/garuda-i3-linux-zen-220510.iso"
    set dri="nonfree"
    set lang="de_DE"
    set keytable="de"
    set timezone="Europe/Berlin"
    search --no-floppy -f --set=root $isofile
    probe -u $root --set=abc
    set pqr="/dev/disk/by-uuid/$abc"
    loopback loop $isofile
    linux  (loop)/boot/vmlinuz-x86_64  img_dev=$pqr img_loop=$isofile driver=$dri tz=$timezone lang=$lang keytable=$keytable copytoram
    initrd  (loop)/boot/amd_ucode.img (loop)/boot/initramfs-x86_64.img
   }

# /etc/default/grub
# GRUB_DISABLE_OS_PROBER=true

https://wiki.archlinux.org/title/GRUB#Boot_menu_entry_examples

4 Likes

Refind is clearly a very good piece of software, with a manual that has not been written well ..after about 2 days of scrawling through various forums, making changes and testing themes, I still have an Ubuntu symbol for mint after trying tune2fs and sgdisk. I have not found a clear answer on how I modify the positions of order in the refind menu, and do not know what to modify in order to get rid of redundant icons or duplicates within the menu.

Is there a way of just modifying the garuda grub to ignoring the duplicates? I think it would be easier this way.

Woohooo...managed to do it - don't know why I just didn't try modifying the grub config to begin with - now I just have a UEFI boot duplicate.

A roller coaster of emotions, for what was quite frankly a trivial issue....at least I picked up some things along the way.

What file did you modify?
If it's /boot/grub/grub.cfg, that one is a no-go as it will reset next time you run grub-update.

1 Like

Yes, grub.cfg was the one I changed.
Nevermind, it takes a minute to make the change when it reverts back.
TBH, It's taken me 500 times that to get nowhere with rEFInd.
Maybe on the 500th time I have to do it, I'll give rEFInd another go.

If you have installed many distros but didn't clean up their bootloader files (usually reside in /boot/efi/EFI/ distro-name/grubx64.efi) rEFInd may be showing them as Tux icons.

2 Likes