Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #236416 > unrolled thread

Re: grub2 boot menu

Started byGreg Wooledge <greg@wooledge.org>
First post2021-06-24 16:10 +0200
Last post2021-06-25 21:20 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.debian.user

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: grub2 boot menu Greg Wooledge <greg@wooledge.org> - 2021-06-24 16:10 +0200
    Re: grub2 boot menu didier gaumet <didier.gaumet@gmail.com> - 2021-06-24 21:30 +0200
      Re: grub2 boot menu Cindy Sue Causey <butterflybytes@gmail.com> - 2021-06-25 17:50 +0200
        Re: grub2 boot menu didier gaumet <didier.gaumet@gmail.com> - 2021-06-25 21:20 +0200

#236416 — Re: grub2 boot menu

FromGreg Wooledge <greg@wooledge.org>
Date2021-06-24 16:10 +0200
SubjectRe: grub2 boot menu
Message-ID<Ctydk-42p-15@gated-at.bofh.it>
On Thu, Jun 24, 2021 at 02:51:06PM +0100, mick crane wrote:
> I was dual booting but got another PC so I can have windows and debain at
> the same time. Just for tidiness of booting I'd have liked to comment out
> the submenu entry in /boot/grub/grub.cfg for windows just in case I wanted
> to put it back but not allowed.
> Physically removing the windows disk and "grub-mkconfig" and/or
> "update-grub" sorts itself out but is there any way to do this manually as
> used to be the case ?

You want the GRUB menu to skip over Windows?  The easiest way would
probably be to remove the os-prober package, so update-grub never sees
Windows and never includes it in the generated menu.

[toc] | [next] | [standalone]


#236429

Fromdidier gaumet <didier.gaumet@gmail.com>
Date2021-06-24 21:30 +0200
Message-ID<CtDcZ-77b-1@gated-at.bofh.it>
In reply to#236416
Hello, 

Grub can ignore all or only certain OSes that os-prober detects by
setting up the desired behaviour in /etc/default/grub

from the grub info page:
[...]"
'GRUB_DISABLE_OS_PROBER'
     Normally, 'grub-mkconfig' will try to use the external 'os-prober'
     program, if installed, to discover other operating systems
     installed on the same system and generate appropriate menu entries
     for them.  Set this option to 'true' to disable this.

'GRUB_OS_PROBER_SKIP_LIST'
     List of space-separated FS UUIDs of filesystems to be ignored from
     os-prober output.  For efi chainloaders it's <UUID>@<EFI FILE>
"[...]

 :-)

[toc] | [prev] | [next] | [standalone]


#236450

FromCindy Sue Causey <butterflybytes@gmail.com>
Date2021-06-25 17:50 +0200
Message-ID<CtWfD-1XH-5@gated-at.bofh.it>
In reply to#236429
On 6/24/21, didier gaumet <didier.gaumet@gmail.com> wrote:
>
> Hello,
>
> Grub can ignore all or only certain OSes that os-prober detects by
> setting up the desired behaviour in /etc/default/grub
>
> from the grub info page:
> [...]"
> 'GRUB_DISABLE_OS_PROBER'
>      Normally, 'grub-mkconfig' will try to use the external 'os-prober'
>      program, if installed, to discover other operating systems
>      installed on the same system and generate appropriate menu entries
>      for them.  Set this option to 'true' to disable this.
>
> 'GRUB_OS_PROBER_SKIP_LIST'
>      List of space-separated FS UUIDs of filesystems to be ignored from
>      os-prober output.  For efi chainloaders it's <UUID>@<EFI FILE>
> "[...]


This is basically just noise, but, ooohhh, that sounds NICE.... and
HANDY. I'm wondering how many other tricks like that exist that never
see the light of day. In a perfect World, maybe someone with deep
knowledge of those features could approach Debian-Publicity about
submitting e.g. "Hey, Did You Know You Can...." tips that are included
in their newsletters and updates?

Speaking as someone with cognitive issues such that I operate as a
perennial newbie, it would surely help if someone could point GRUB
Users to what that "<EFI FILE>" is referencing.

For now, it just sounds like part of the fancier loading needs that
are occasionally discussed here on Debian-User. My thought process is
that maybe hearing it further described will trigger a fellow lurker's
interest in learning more about how their Debian works right from the
boot beginning.

Cindy :)
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with birdseed *

[toc] | [prev] | [next] | [standalone]


#236462

Fromdidier gaumet <didier.gaumet@gmail.com>
Date2021-06-25 21:20 +0200
Message-ID<CtZwS-40B-13@gated-at.bofh.it>
In reply to#236450

Le vendredi 25 juin 2021 à 11:40 -0400, Cindy Sue Causey a écrit :
> On 6/24/21, didier gaumet <didier.gaumet@gmail.com> wrote:
> 
[...]
> > 'GRUB_OS_PROBER_SKIP_LIST'
> >     List of space-separated FS UUIDs of filesystems to be ignored
> > from
> >      os-prober output.  For efi chainloaders it's <UUID>@<EFIFILE>"
[...]
> it would surely help if someone could point GRUB
> Users to what that "<EFI FILE>" is referencing.
[...]

My laptop (with an EFI firmware) has a dual boot with Debian Bullseye
and Windows 10. In this Windows 10 case, it is an EFI chainloading
(that would not be the case (chainloading) with another OS without its
self bootloader installed and properly configured)

My /boot/grub.grub.cfg contains:
"[...]
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p3)' --class windows --
class os $menuentry_id_option 'osprober-efi-FAF2-88F6' {
	insmod part_gpt
	insmod fat
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  FAF2-88F6
	else
	  search --no-floppy --fs-uuid --set=root FAF2-88F6
	fi
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###
[...]"

I edit /etc/default/grub to add this line:
GRUB_OS_PROBER_SKIP_LIST='FAF2-88F6@/EFI/Microsoft/Boot/bootmgfw.efi'

then I update the config:
didier@hp-notebook14:~$ sudo update-grub
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.10.0-7-amd64
Found initrd image: /boot/initrd.img-5.10.0-7-amd64
Skipped Windows Boot Manager on
/dev/nvme0n1p3@/EFI/Microsoft/Boot/bootmgfw.efi by user request.
Adding boot menu entry for EFI firmware configuration
done

So the Windows 10 entry has been skipped

It is confirmed by inspecting /boot/grub/grub.cfg:
"[...]
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
[...]"

Cheers :-)

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web