Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Solved] Grub Lost Windows Option in Dual Boot Setup

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
DocTomJP
Posts: 82
Joined: 2015-06-08 05:21
Location: Thailand
Been thanked: 1 time

[Solved] Grub Lost Windows Option in Dual Boot Setup

#1 Post by DocTomJP »

After many years, suddenly the grub menu has lost the option to boot windows in a dual boot system. I rarely use Windows, but I do need it on infrequent occasions.
I suspect that this has occurred due to a recent Debian upgrade because it has occurred on two laptop computers in our house, both of which were upgraded at about the same time. The same disappearance of a grub windows option at boot occurred on both machines, one of which has a legacy bios with Debian 12/Win 7, and the other is an UEFI Debian 12/Win 10 system.
I may be entirely wrong about the cause (Debian 12 upgrade), but I post here because of my suspicion.

In any case, I will be very grateful for any advice, as so far my attempts to overcome the problem have failed completely, and I am nervous that I may do something such that I will lose the Debian system as well as the Windows.
Tom.
Last edited by DocTomJP on 2023-11-07 10:51, edited 1 time in total.

User avatar
kalle123
Posts: 353
Joined: 2015-03-21 11:17
Location: Rhineland - Germany
Has thanked: 4 times
Been thanked: 12 times

Re: Grub Lost Windows Option in Dual Boot Setup

#2 Post by kalle123 »


DocTomJP
Posts: 82
Joined: 2015-06-08 05:21
Location: Thailand
Been thanked: 1 time

Re: Grub Lost Windows Option in Dual Boot Setup

#3 Post by DocTomJP »

KH, many thanks indeed for your quick and effective response. I have just implemented the solution on the Deb/Win7 laptop (legacy boot) and everything works perfectly. Tomorrow I will check the UEFI machine, fully expecting the same good result.
I will confirm the result in another post.
Thanks again, Tom.

User avatar
kalle123
Posts: 353
Joined: 2015-03-21 11:17
Location: Rhineland - Germany
Has thanked: 4 times
Been thanked: 12 times

Re: Grub Lost Windows Option in Dual Boot Setup

#4 Post by kalle123 »

Glad I could give a hand.

Regards KH

DocTomJP
Posts: 82
Joined: 2015-06-08 05:21
Location: Thailand
Been thanked: 1 time

Re: Grub Lost Windows Option in Dual Boot Setup

#5 Post by DocTomJP »

I just tried the solution on the UEFI Debian 12/Win 10 laptop. Unfortunately it did not work.
The solution worked without any issues on the older legacy bios Debian 12/ Win 7 system, the boot into Windows option appearing at first reboot. But I could not get any progress on the UEFI system.
Any further help please?
Tom.

User avatar
pbear
Posts: 329
Joined: 2023-08-27 15:05
Location: San Francisco
Has thanked: 1 time
Been thanked: 57 times

Re: Grub Lost Windows Option in Dual Boot Setup

#6 Post by pbear »

I've given up on os-prober. Instead, I use a custom.cfg file. 40_custom in /etc/grub.d does the same thing, but I think custom.cfg is easier.

Several ways to do this. Here's one. Run these three commands:

Code: Select all

lsblk -f
sudo touch /boot/grub/custom.cfg
EDITOR='gedit -w' sudoedit /boot/grub/custom.cfg
Copy this into the file, then save and close:

Code: Select all

menuentry "Windows 10" {
     insmod part_gpt
     insmod fat
     insmod chain
     search --no-floppy --fs-uuid --set=root <UUID-of-EFI-Partition>
     chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
Note: The UUID will be eight characters, in the form 38EC-CDB2. FYI, the same file can be used to put Linux OSs on the boot list, but the form of entry is different.
FWIW, I always disable os-prober when using a custom.cfg file. The command is sudo chmod -x /etc/grub.d/30_os-prober.

DocTomJP
Posts: 82
Joined: 2015-06-08 05:21
Location: Thailand
Been thanked: 1 time

Re: Grub Lost Windows Option in Dual Boot Setup

#7 Post by DocTomJP »

pbear, many thanks for your help with my problem.

I have not attempted your proposed solution, as I did not see your post until I opened this thread just now, after I had attempted further myself to solve the issue.

In fact I did succeed. I am not sure how. I booted to the bios, and did nothing significant other than perhaps elevating the Windows boot item above a USB boot item so that the order is Debian then windows.
Then I tried os-prober again, and for the first time (after several attempts over the previous days) it found the Windows EFI System Partition.
I thought that this seemed encouraging, so I rebooted, and hey presto. the Windows option in Grub was restored, and I am able to boot into Debian or Windows from the Grub menu.

So very many thanks. I shall save the details of your post for future reference,and use if the problem reappears.

Both yourself and and Kallie123 before have been very helpful, and I am grateful for your time and kindness.
Tom.

User avatar
pbear
Posts: 329
Joined: 2023-08-27 15:05
Location: San Francisco
Has thanked: 1 time
Been thanked: 57 times

Re: Grub Lost Windows Option in Dual Boot Setup

#8 Post by pbear »

Glad to hear the problem has been solved.
DocTomJP wrote: 2023-11-05 04:54 ... did nothing significant other than perhaps elevating the Windows boot item above a USB boot item so that the order is Debian then windows.
Well, no, that wouldn't be the explanation. Grub update doesn't consult NVRAM, which is where that list is stored.

DocTomJP
Posts: 82
Joined: 2015-06-08 05:21
Location: Thailand
Been thanked: 1 time

Re: [Solved] Grub Lost Windows Option in Dual Boot Setup

#9 Post by DocTomJP »

Pbear, thanks. So I am at a loss to know what caused the windows option to appear after the last attempt with os-prober, having failed on several previous attempts.
No matter, it is solved now, and I have marked it as such.
Once again many thanks, Tom.

layna64
Posts: 1
Joined: 2024-02-18 13:42
Location: india

Re: Grub Lost Windows Option in Dual Boot Setup

#10 Post by layna64 »

DocTomJP wrote: 2023-11-05 04:54 pbear, many thanks for your help with my problem.

I have not attempted your proposed solution, as I did not see your post until I opened this thread just now, after I had attempted further myself to solve the issue.

In fact I did succeed. I am not sure how. I booted to the bios, and did nothing significant other than perhaps elevating the Windows boot item above a USB boot item so that the order is Debian then windows.
Then I tried os-prober again, and for the first time (after several attempts over the previous days) it found the Windows EFI System Partition.
I thought that this seemed encouraging, so I rebooted, and hey presto. the Windows option in Grub was restored, and I am able to boot into Debian or Windows from the Grub menu.

So very many thanks. I shall save the details of your post for future reference,and use if the problem reappears.

Both yourself and and Kallie123 before have been very helpful, and I am grateful for your time and kindness.
Tom.
Thanks for good informetion.

Post Reply