You are not logged in.

#1 2024-10-17 12:56:12

gucio321
Member
Registered: 2024-10-17
Posts: 17

[SOLVED] multiple grub entries for 1 arch system with the same name

I'm dualbooting arch with fedora with fedora as a grub "leader/manager".
os-prober correctly detects my arch (os-prober output below)

/dev/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
/dev/nvme0n1p9:Arch Linux:Arch:linux

But for some reason it generates 5 grub entries for that 1 system. Whats worse all of them have the same name (I'd expect either 1/2 entries for latest kernel and rescue or N entries for each installe dkenrel with different name each)

imgbb

Last edited by gucio321 (2024-10-18 12:27:07)

Offline

#2 2024-10-17 13:55:02

cryptearth
Member
Registered: 2024-02-03
Posts: 1,021

Re: [SOLVED] multiple grub entries for 1 arch system with the same name

have you had a look inside grub.cfg with a normal text editor to see what these entries actually do?

Online

#3 2024-10-18 06:55:55

gucio321
Member
Registered: 2024-10-17
Posts: 17

Re: [SOLVED] multiple grub entries for 1 arch system with the same name

good idea, ty.
Looks like these are Arch linux instances for my fedora kernels (?) (I didn't check if they are bootable at all yet as I can't reboot right now)
Here is the #os-prober section of my grub.cfg

menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-7800-CC5B' {
        insmod part_gpt
        insmod fat
        search --no-floppy --fs-uuid --set=root 7800-CC5B
        chainloader /efi/Microsoft/Boot/bootmgfw.efi
}
        menuentry 'Arch Linux (on /dev/nvme0n1p9)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--0fc12a00-c35d-48dd-9ac6-e39aa6d3db2e' {
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root 0bd2ff3b-4a82-4eec-b5e8-fa3dd64c1fbb
                linux /vmlinuz-linux root=/dev/nvme0n1p9
                initrd /initramfs-linux.img
        }
        menuentry 'Arch Linux (on /dev/nvme0n1p9)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-6.11.3-200.fc40.x86_64--0fc12a00-c35d-48dd-9ac6-e39aa6d3db2e' {
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root 0bd2ff3b-4a82-4eec-b5e8-fa3dd64c1fbb
                linux /vmlinuz-6.11.3-200.fc40.x86_64 root=/dev/nvme0n1p9
                initrd /initramfs-6.11.3-200.fc40.x86_64.img
        }
        menuentry 'Arch Linux (on /dev/nvme0n1p9)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-6.10.11-200.fc40.x86_64--0fc12a00-c35d-48dd-9ac6-e39aa6d3db2e' {
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root 0bd2ff3b-4a82-4eec-b5e8-fa3dd64c1fbb
                linux /vmlinuz-6.10.11-200.fc40.x86_64 root=/dev/nvme0n1p9
                initrd /initramfs-6.10.11-200.fc40.x86_64.img
        }
        menuentry 'Arch Linux (on /dev/nvme0n1p9)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-6.10.9-200.fc40.x86_64--0fc12a00-c35d-48dd-9ac6-e39aa6d3db2e' {
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root 0bd2ff3b-4a82-4eec-b5e8-fa3dd64c1fbb
                linux /vmlinuz-6.10.9-200.fc40.x86_64 root=/dev/nvme0n1p9
                initrd /initramfs-6.10.9-200.fc40.x86_64.img
        }
        menuentry 'Arch Linux (on /dev/nvme0n1p9)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-0-rescue-f56acf60b5024486a7108914444a8aae--0fc12a00-c35d-48dd-9ac6-e39aa6d3db2e' {
                insmod part_gpt
                insmod ext2
                search --no-floppy --fs-uuid --set=root 0bd2ff3b-4a82-4eec-b5e8-fa3dd64c1fbb
                linux /vmlinuz-0-rescue-f56acf60b5024486a7108914444a8aae root=/dev/nvme0n1p9
                initrd /initramfs-0-rescue-f56acf60b5024486a7108914444a8aae.img
        }

Offline

#4 2024-10-18 09:57:18

cryptearth
Member
Registered: 2024-02-03
Posts: 1,021

Re: [SOLVED] multiple grub entries for 1 arch system with the same name

this looks like messed up fstab: several wrong mountings
all but the first are not arch - so somehow some of your fedora stuff ended up in the /boot of the arch install - likely due to messed up mountings
check fstab of both fedora and arch, correct them, clean /boot (if required boot arch install an reinstall tge kernel) and rerun grub-mkconfig to create clean sections
or: wipe and start all over with one large esp which contains all stuff for windows, fedora and arch
or: use additional xbootldr partitions to split /boot between fedora and arch

tldr: there seems something wrong - but it seems some bad mountings and likely messed up fstab

Online

#5 2024-10-18 12:22:23

gucio321
Member
Registered: 2024-10-17
Posts: 17

Re: [SOLVED] multiple grub entries for 1 arch system with the same name

Oh man! That deffinitly makes sense big_smile
I think I missunderstood this particular step

If the disk from which you want to boot already has an EFI system partition, do not create another one, but use the existing partition instead.

(https://wiki.archlinux.org/title/Installation_guide)
And I ued my existing boot partition for both arch and fedora (which was probably really stupid and potentially could cause destroying everything). Now when I created a separated /boot for my arch the problem was fixed.
I hope noone will do something like that in the future, but here is what I did to clean it up: create new partition, format for ext4, reboot to iso, mount everything as it should be, reinstall kernel from pacstrap, genfstab, arch-chroot and mkinitcpio, regenerate grub from fedora, clean /boot on fedora

Tank you for help!

Last edited by gucio321 (2024-10-18 12:29:50)

Offline

Board footer

Powered by FluxBB