You are not logged in.

#1 2024-01-02 19:01:58

Enrico1989
Member
Registered: 2018-07-05
Posts: 201

[SOLVED] How to get Win 10 back in the OS list of GRUB?

My laptop comes with Win 10 Pro 64bits.

Right after buying it in the middle of 2020, I installed Arch in dual boot with it.

After such a long time, I don't remember the details, but I think I followed 2.1 Windows before Linux or, most likely (?), the corresponding page that existed at that time.

Anyway, some time ago Windows has disappeared from the GRUB list. Since I haven't used for ages¹, I haven't noticed when it disappeared. I've discovered its absence just yesterday because of another problem now solved.

From the last link above, you can see I've managed to boot Windows from the UEFI menu, and it seems to work just fine, so how do I get it back in the GRUB?

---
(¹) Booting into it I've found nothing installed other than "balena etcher", which I most likely downloaded precisely to put Arch on a pen drive to install it beside Windows; there's a chance I've never used it for anything other than that.

Last edited by Enrico1989 (2024-01-04 19:16:03)

Offline

#2 2024-01-02 19:04:58

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,903
Website

Re: [SOLVED] How to get Win 10 back in the OS list of GRUB?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#3 2024-01-02 20:40:36

Enrico1989
Member
Registered: 2018-07-05
Posts: 201

Re: [SOLVED] How to get Win 10 back in the OS list of GRUB?

To have grub-mkconfig search for other installed systems and automatically add them to the menu, install the os-prober package and mount the partitions from which the other systems boot. Then re-run grub-mkconfig.

[...]

The exact mount point does not matter,

[...]

For Windows installed in UEFI mode, make sure the EFI system partition containing the Windows Boot Manager (bootmgfw.efi) is mounted. Run os-prober as root to detect and generate an entry for it.

So I've run

$ sudo fdisk -l
[sudo] password for enrico: 
Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: KBG40ZNS512G NVMe KIOXIA 512GB          
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9DF34935-F28A-4FF0-ACC1-9174FA0C6B10

Device             Start        End   Sectors   Size Type
/dev/nvme0n1p1      2048     309247    307200   150M EFI System
/dev/nvme0n1p2    309248     571391    262144   128M Microsoft reserved
/dev/nvme0n1p3    571392  482201599 481630208 229.7G Microsoft basic data
/dev/nvme0n1p4 482201600  929927167 447725568 213.5G Microsoft basic data
/dev/nvme0n1p5 963481600  965509119   2027520   990M Windows recovery environment
/dev/nvme0n1p6 965509120  996978687  31469568    15G Windows recovery environment
/dev/nvme0n1p7 996980736 1000187903   3207168   1.5G Windows recovery environment
/dev/nvme0n1p8 929927168  963481599  33554432    16G Linux swap

Partition table entries are not in disk order.

(which incidentally looks a bit weird..., but I kinda remember I was a bit perplexed by the number of partions I found on the laptop right out of the envelope)

$ sudo os-prober 
/dev/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
$
$ mkdir Foo
$ sudo mount /dev/nvme0n1p1 Foo
$
$ sudo grub-mkconfig -o /boot/grub/grub.cfg 

and then I rebooted.

No new item in the GRUB. So I read a bit more:

edit /etc/default/grub and add/uncomment:

GRUB_DISABLE_OS_PROBER=false

did that, and rebooted.

No new item in GRUB either.

What am I doing wrong?

Offline

#4 2024-01-02 21:12:54

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,751
Website

Re: [SOLVED] How to get Win 10 back in the OS list of GRUB?

Did you run the `grub-mkconfig` command again after editing /etc/default/grub?

Otherwise check the EFI system partition for /EFI/Microsoft/Boot/bootmgfw.efi, which is the Windows bootloader.

EDIT: typo.

Last edited by Head_on_a_Stick (2024-01-02 21:39:06)

Offline

#5 2024-01-04 19:13:11

Enrico1989
Member
Registered: 2018-07-05
Posts: 201

Re: [SOLVED] How to get Win 10 back in the OS list of GRUB?

Head_on_a_Stick wrote:

Did you run the `grub-mkconfig` command again after editing /etc/default/grub?

That was it, thanks!

I guess I missed the Then try again big_smile

Last edited by Enrico1989 (2024-01-04 19:15:48)

Offline

Board footer

Powered by FluxBB