Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
os-prober creating duplicate entry for main linux system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Tae_kyon
n00b
n00b


Joined: 19 Apr 2006
Posts: 71

PostPosted: Sat Jun 16, 2018 7:33 pm    Post subject: os-prober creating duplicate entry for main linux system Reply with quote

I have a dual-boot desktop, Gentoo on one disk, Windows 10 on the other.

For some reason, since I have grub-2.0.2-r1, when I do:

Code:

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


I get three menu entries:

/boot/vmlinuz-4.17.1-gentoo
Windows 10 on /dev/sda1
Gentoo/Linux on /dev/sdb4

The problem is that "/boot/vmlinuz-4.17.1-gentoo" and "Gentoo/Linux on /dev/sdb4" are the exact same OS. I only have ONE linux system installed.
I have also disabled recovery menu entries by uncommenting:

Code:
GRUB_DISABLE_RECOVERY=true


in /etc/default/grub

Looks like os-prober is adding the second linux entry, regardless of the fact that it already exists.

I'm sure this did not happen previously ... any hints?
_________________
We shall not cease from exploration. And the end of all our exploring
will be to arrive where we started and know the place for the first time


Last edited by Tae_kyon on Sat Jun 16, 2018 7:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
Tae_kyon
n00b
n00b


Joined: 19 Apr 2006
Posts: 71

PostPosted: Sat Jun 16, 2018 7:50 pm    Post subject: Solved Reply with quote

Solved this by adding:

Code:
GRUB_OS_PROBER_SKIP_LIST="6e42c86f-ee7d-4022-bc9b-56428da1808f@/dev/sdb4"


to /etc/default/grub
_________________
We shall not cease from exploration. And the end of all our exploring
will be to arrive where we started and know the place for the first time
Back to top
View user's profile Send private message
popetto
n00b
n00b


Joined: 13 Aug 2019
Posts: 27
Location: Italy

PostPosted: Tue Apr 07, 2020 8:23 am    Post subject: Re: Solved Reply with quote

Tae_kyon wrote:
Solved this by adding:

Code:
GRUB_OS_PROBER_SKIP_LIST="6e42c86f-ee7d-4022-bc9b-56428da1808f@/dev/sdb4"


to /etc/default/grub


Sorry, what is that code before @/dev/sdb4? I guess it is UUID but I'm not sure. Thanks
Back to top
View user's profile Send private message
smartding
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2021
Posts: 129

PostPosted: Wed Feb 17, 2021 10:46 am    Post subject: Reply with quote

Is there any update to this issue?

I noticed today that I have this issue too.

But I don't think I had this before, not sure if this due to a upgrade of the kernel, grub or os-prober

if I run "sudo os-prober", it outputs the following:

Code:
/dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
/dev/nvme0n1p6:Gentoo/Linux:Gentoo:linux


The gentoo on nvme0n1p6 is already detected by grub-mkconfig and is the first entry in my grub menu.

my grub.cfg looks like this:

Code:

 
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5' {
        load_video
        if [ "x$grub_platform" = xefi ]; then
                set gfxpayload=keep
        fi
        insmod gzio
        insmod part_gpt
        insmod ext2
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
        else
          search --no-floppy --fs-uuid --set=root 30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
        fi
        echo    'Loading Linux 5.10.16-gentoo ...'
        linux   /boot/vmlinuz-5.10.16-gentoo root=/dev/nvme0n1p6 ro net.ifnames=0
        echo    'Loading initial ramdisk ...'
        initrd  /boot/intel-uc.img
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5' {
        menuentry 'Gentoo GNU/Linux, with Linux 5.10.16-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.16-gentoo-advanced-30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5' {
                load_video
                if [ "x$grub_platform" = xefi ]; then
                        set gfxpayload=keep
                fi
                insmod gzio
                insmod part_gpt
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
                else
                  search --no-floppy --fs-uuid --set=root 30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
                fi
                echo    'Loading Linux 5.10.16-gentoo ...'
                linux   /boot/vmlinuz-5.10.16-gentoo root=/dev/nvme0n1p6 ro net.ifnames=0
                echo    'Loading initial ramdisk ...'
                initrd  /boot/intel-uc.img
        }
        menuentry 'Gentoo GNU/Linux, with Linux 5.10.16-gentoo (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.10.16-gentoo-recovery-30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5' {
                load_video
                if [ "x$grub_platform" = xefi ]; then
                        set gfxpayload=keep
                fi
                insmod gzio
                insmod part_gpt
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
                else
                  search --no-floppy --fs-uuid --set=root 30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
                fi
                echo    'Loading Linux 5.10.16-gentoo ...'
                linux   /boot/vmlinuz-5.10.16-gentoo root=/dev/nvme0n1p6 ro single net.ifnames=0
                echo    'Loading initial ramdisk ...'
                initrd  /boot/intel-uc.img
        }
}
 
### END /etc/grub.d/10_linux ###
 
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
 
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-76F8-EF2A' {
        insmod part_gpt
        insmod fat
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  76F8-EF2A
        else
          search --no-floppy --fs-uuid --set=root 76F8-EF2A
        fi
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
menuentry 'Gentoo/Linux (on /dev/nvme0n1p6)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5' {
        insmod part_gpt
        insmod ext2
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
        else
          search --no-floppy --fs-uuid --set=root 30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
        fi
        linux /boot/vmlinuz-5.10.16-gentoo root=/dev/nvme0n1p6 ro net.ifnames=0
        initrd /boot/intel-uc.img
}
submenu 'Advanced options for Gentoo/Linux (on /dev/nvme0n1p6)' $menuentry_id_option 'osprober-gnulinux-advanced-30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5' {
        menuentry 'Gentoo GNU/Linux (on /dev/nvme0n1p6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-5.10.16-gentoo--30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5' {
                insmod part_gpt
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
                else
                  search --no-floppy --fs-uuid --set=root 30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
                fi
                linux /boot/vmlinuz-5.10.16-gentoo root=/dev/nvme0n1p6 ro net.ifnames=0
                initrd /boot/intel-uc.img
        }
        menuentry 'Gentoo GNU/Linux, with Linux 5.10.16-gentoo (on /dev/nvme0n1p6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-5.10.16-gentoo--30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5' {
                insmod part_gpt
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
                else
                  search --no-floppy --fs-uuid --set=root 30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
                fi
                linux /boot/vmlinuz-5.10.16-gentoo root=/dev/nvme0n1p6 ro net.ifnames=0
                initrd /boot/intel-uc.img
        }
        menuentry 'Gentoo GNU/Linux, with Linux 5.10.16-gentoo (recovery mode) (on /dev/nvme0n1p6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-5.10.16-gentoo-root=/dev/nvme0n1p6 ro single net.ifnames=0-30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5' {
                insmod part_gpt
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
                else
                  search --no-floppy --fs-uuid --set=root 30d7cd1f-c12e-4c53-8dc3-5b0917d7dba5
                fi
                linux /boot/vmlinuz-5.10.16-gentoo root=/dev/nvme0n1p6 ro single net.ifnames=0
                initrd /boot/intel-uc.img
        }
}
 
### END /etc/grub.d/30_os-prober ###
Back to top
View user's profile Send private message
Romanticio
Tux's lil' helper
Tux's lil' helper


Joined: 07 Feb 2021
Posts: 76

PostPosted: Thu Feb 18, 2021 12:11 am    Post subject: Reply with quote

Quote:
/dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi

Most EFI computers with Windows installed default to booting Windows, to boot Linux you most often are required to access the EFI boot menu and select Linux from there. If this is your setup, you don't need OS-Prober. If you want to boot to Windows, you hit the power button and nothing else, just wait. If you want to boot to Linux you hit the appropriate key to get the menu. Why do you need Windows to appear in grub menu?, it's much easier to just hit the power button and wait for the Windows desktop to appear. Remove OS-Prober and all that will appear in the menu is all that is needed to appear in the menu, your single Linux installation.
With multiple Linux that all use Grub, OS-Prober is only required to be installed in one OS. However in this scenario, every time an OS updates grub due to kernel update or such, you will need to update grub in the OS with OS-Prober to include the changes in other OS menus.
Back to top
View user's profile Send private message
smartding
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jan 2021
Posts: 129

PostPosted: Thu Feb 18, 2021 2:50 am    Post subject: Reply with quote

Romanticio wrote:
Quote:
/dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi

Most EFI computers with Windows installed default to booting Windows, to boot Linux you most often are required to access the EFI boot menu and select Linux from there. If this is your setup, you don't need OS-Prober. If you want to boot to Windows, you hit the power button and nothing else, just wait. If you want to boot to Linux you hit the appropriate key to get the menu. Why do you need Windows to appear in grub menu?, it's much easier to just hit the power button and wait for the Windows desktop to appear. Remove OS-Prober and all that will appear in the menu is all that is needed to appear in the menu, your single Linux installation.
With multiple Linux that all use Grub, OS-Prober is only required to be installed in one OS. However in this scenario, every time an OS updates grub due to kernel update or such, you will need to update grub in the OS with OS-Prober to include the changes in other OS menus.


I use grub and os-prober because the handbook says:
Quote:
Using efibootmgr is really for those who desire to take a minimalist approach to booting their system, using GRUB2 is easier for the majority of users
, and I'm one of the majority users :)
Back to top
View user's profile Send private message
ebray187
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2005
Posts: 118
Location: Al otro lado de la pantalla

PostPosted: Sat Jun 26, 2021 5:16 pm    Post subject: Re: Solved Reply with quote

Tae_kyon wrote:
Solved this by adding:

Code:
GRUB_OS_PROBER_SKIP_LIST="6e42c86f-ee7d-4022-bc9b-56428da1808f@/dev/sdb4"


to /etc/default/grub


Thanks!
_________________
# emerge -C world >> 9/8
A flower?!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum