The officially official Devuan Forum!

You are not logged in.

#1 2021-02-12 21:30:20

nobodyuknow
Member
Registered: 2017-09-10
Posts: 174  

SOLVED: Windows 10 entry in boot menu; is Grub to blame?

I have a question that isn't Devuan's fault, but I'm not sure where to ask it.

I have a few different Linux distributions, all Debian spins, installed on SSDs in external enclosures connected via USB (the internal SSD has Windows 10 installed on it). I would think they'd all operate via the same rules. However, one thing puzzles me. On some distributions, after I boot a few times, the boot menu changes to include a Windows 10 entry. On Sparky Linux systems, it's clear why that happens, as a script that deals with Grub runs, demanding that the user choose the drive on which Grub should be installed. After that script runs, the boot menu includes a Windows 10 entry. But on this system, a Devuan MATE, I saw the Windows 10 boot menu entry after ten or twenty boots. What's strange (to me) is that the Windows 10 boot entry will be present even if I remove the internal SSD.

By the way, when I install Linux on an external SSD, I remove the internal SSD to avoid a dual-boot situation.

At first I thought the Windows 10 boot entry was added after I booted Windows without disconnecting the external SSD, but now I'm not sure about that.

Does Linux automatically run Grub on every boot? Is it when Grub is updated?

Can this extraneous boot entry be removed without harming the OS?

Feel free to point me to a website explaining things, as I'd like to understand what's happening.

Last edited by nobodyuknow (2021-02-12 22:49:51)

Offline

#2 2021-02-12 21:44:46

nobodyuknow
Member
Registered: 2017-09-10
Posts: 174  

Re: SOLVED: Windows 10 entry in boot menu; is Grub to blame?

UPDATE: I surfed around and learned that the menu has something to do with /boot/grub/grub.cfg. There is a line in it:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 10 (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-8E1EA5C71EA5A8A3' {

and it was updated yesterday. Comments in grub.cfg state that it is "automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub," though /etc/grub.d and /etc/default/grub do not appear to contain anything relevant. grub-mkconfig scans drives for installed bootable OSs, so maybe the Windows 10 boot entry is added when grub is updated.

Last edited by nobodyuknow (2021-02-12 21:59:13)

Offline

#3 2021-02-12 22:25:24

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: SOLVED: Windows 10 entry in boot menu; is Grub to blame?

nobodyuknow wrote:

Does Linux automatically run Grub on every boot? Is it when Grub is updated?

Debian-based distributions will update the GRUB configuration when the kernel is updated.

EDIT: post 1337! The leet post! big_smile

EDIT2: that's it, I can't post here any more. So long and thanks for all the fish.

Last edited by Head_on_a_Stick (2021-02-12 22:26:52)


Brianna Ghey — Rest In Power

Offline

#4 2021-02-12 22:49:33

nobodyuknow
Member
Registered: 2017-09-10
Posts: 174  

Re: SOLVED: Windows 10 entry in boot menu; is Grub to blame?

Of course, that explains the apparently random nature of the entry's appearance.

I deleted the relevant section for Window 10 in /boot/grub/grub.cfg. The system booted fine, without the Windows 10 boot menu entry.

The leet post? I had to look that up. Upside down and backwards.

Offline

#5 2021-02-12 23:01:28

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: SOLVED: Windows 10 entry in boot menu; is Grub to blame?

nobodyuknow wrote:

I deleted the relevant section for Window 10 in /boot/grub/grub.cfg.

It will be re-added next time the kernel is updated if the Windows drive is connected.

You can exclude specific partitions by adding this to /etc/default/grub:

GRUB_OS_PROBER_SKIP_LIST="$uuid"

Replace $uuid with the actual UUID of the partition that holds Windows (use blkid to list the UUIDs of all connected drives). To exclude more than one partition make a list inside the quotation marks with each UUID separated by a space.


Brianna Ghey — Rest In Power

Offline

Board footer