Question Adding a boot option for Windows 10 to GRUB

Nice Nicer

Commendable
May 24, 2021
103
3
1,595
Hi,

I use Linux Mint ( latest LTS release ) alongside windows 10 and try to find a way of adding the option for booting directly into windows 10 to GRUB . Both Linux and Windows 10 have been installed on two different SSDs. I can access both via the boot menu, when I choose the advanced bios settings option during GRUB bootloader. But that's a workaround and I just want GRUB to let me choose directly. So I've tried a couple of things :

Command : sudo os prober ( doesn't find anything except for Linux )

Same command when the second drive ( win10 ) is mounted ( same result )

I heard that the hard drive ( SSD) might have to be mounted at a certain point, for os prober to recognize it as a bootable drive. That's where I might need advice. Is that a possible solution ?

I won't add hardware info because I think this problem is software related and can be answered or even solved in a general way, if at all.
If further info is needed feel free to ask .
 
Put the windows ssd as the main boot drive, boot into windows and run the free version of easybcd, add linux to the windows boot menu and put it as the default choice if you want to.
Easybcd is easy to use and also has a lot of support online, you can find guides on anything it does.

If you want to do it through grub then wait, maybe someone will give you the steps.
 

Nice Nicer

Commendable
May 24, 2021
103
3
1,595
Linux Mint is already listed in the boot menu. I have to press f9 every time to get there while the manufacturer's logo appears ( that's more or less the workaround I mentioned ) When I don't do so, I automatically get to the GRUB bootloader. It let's me select Linux Mint or the advanced bios settings ( not sure if I remember the name of the option correctly). That way I can also go to the list of bootable devices through that option and pick whatever I like. So long story short,
accessing both : no problem
adding option for windows 10 to GRUB: no idea unfortunately 😕


, add linux to the windows boot menu

Do you mean the list of bootable devices that's part of the bios ?
added later : I've just read that the bootmgr ( Bootmanager) was developed by Microsoft, although it looks as if it is part of the bios

I haven't got the option to put windows at the top of the list because my UEFI boot options are priorised by default ( windows 10 is listed as legacy ) and the bios won't let me change that. I wouldn't want that either because i would have to switch back to the other SSD to access GRUB.

Thanks for mentioning easybcd, sounds like good software. I'll read something about it.
 
Last edited:
Linux Mint is already listed in the boot menu. I have to press f9 every time to get there while the manufacturer's logo appears ( that's more or less the workaround I mentioned )
...
...
I haven't got the option to put windows at the top of the list because my UEFI boot options are priorised by default ( windows 10 is listed as legacy ) and the bios won't let me change that. I wouldn't want that either because i would have to switch back to the other SSD to access GRUB.
If the bios lets you choose the drive in the boot menu to boot from then there is an option to make that permanent, I don't want to say it's impossible that you can't with what we have seen from mobo makers though.
Maybe do list your mobo at least and/or upload a few pics.
There are two lists in bios one for the general order to boot from (cd/hdd/net) and then a separate list for each of these items where if you have multiple hdds you can set those in the order of your liking as well.
The windows boot menu allows you to chainload grub from the other drive, just like grub would chainload windows.

Do you mean the list of bootable devices that's part of the bios ?
added later : I've just read that the bootmgr ( Bootmanager) was developed by Microsoft, although it looks as if it is part of the bios
It looks like DOS which is not bios, your bios has a distinct graphical look.
 

mettall

Prominent
Nov 28, 2022
33
5
695
Okay, this guide is for Archlinux but i hope the same principle will hold for linux Mint.

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

  • First, you have to install a tool called os-prober (or something like that, depends...)
  • Then, you have to add this line "GRUB_DISABLE_OS_PROBER=false" in the /etc/default/grub file.
  • Then, you have to regenerate the grub configuration (create new config files in the /boot/grub directory). Basically running grub-mkconfig with some parameters...
  • Then, you have to run grub-install with some parameters to install the new grub configuration in the same hard drive/partition.
The os-prober will automatically detect the windows and it will add a booting option for that.
 
Last edited:

Nice Nicer

Commendable
May 24, 2021
103
3
1,595
Thanks a lot, i will try this immediately. I hope it works.
I have tried os-prober before but the rest is relatively new to me.
I will give some feedback once i am done with this procedure.
 

Nice Nicer

Commendable
May 24, 2021
103
3
1,595
I tried t get it done yesterday .

Seems like i have to add some mounting points as well to the fstab configuration. Ihaven´t found out, how to do it properly yet, but i balready tried and might get it working next time.
 

mettall

Prominent
Nov 28, 2022
33
5
695
Yes, this is from the Archlinux's guide from the link above:

Note:
  • The exact mount point does not matter, os-prober reads the mtab to identify places to search for bootable entries.
  • Remember to mount the partitions each time you run grub-mkconfig in order to include the other operating systems every time.
So it's not necessary to edit the fstab. You can just manually mount the windows partitions with the mount command.
So as a super user (or root user):
  • mkdir /mnt/windisk1 to make a new directory for for the mounting point...
  • And then mount /dev/sdX /mnt/windisk1 to mount the partition. Depending on the file system it could be necessary to add some other options to the mount command. Please check some manual for that.

    And you have to do this for all partitions... After the whole thing is done you can unmount the partitions with the unmount command.
 
Last edited:

Nice Nicer

Commendable
May 24, 2021
103
3
1,595
Thanks again, I didn't completely understand the article yet, I guess. I will try again later. I did realize that it isn't always necessary to mount the partition via fstab but I thought i might as well try to do it that way. If I want a music library on a different drive ( NTFS) to be detected at every start , so I don't have to run a search with the music player every time , would adding it to fstab be the right option ? Bit offtopic , but I thought you might know.
 
Last edited:

mettall

Prominent
Nov 28, 2022
33
5
695
Yes, in this situation you can add that partition to the fstab file. You can check this guide on how to do so because there are quite a lot of options. https://wiki.archlinux.org/title/Fstab For example you can mount the partition as read-only or you can mount some directories from that partition to your home directory (point 3.7 from the link).

Additionally, if this partition is on a separate spinning hard drive you can set additional parameters to the power management options with hdparm. For example you can make your HDD to stop spinning after certain amount of time if there are no read/write operations. This can make your system more quiet and power efficient and also it could extend or shorten the life of your hdd. This is the archlinux's guide for that: https://wiki.archlinux.org/title/hdparm However, I would suggest you to not do that for 2 reasons:
  1. Make sure you know what you are doing,
  2. Mint Linux probably has it's own way to manage that.
Long story short - you can mount the data partitions via the fstab and the rest of the partitions with the mount command in order to regenerate the grub configuration.
 
Last edited: