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
[Solved] Grub Lost Windows Option in Dual Boot Setup
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.
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.
Re: Grub Lost Windows Option in Dual Boot Setup
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.
I will confirm the result in another post.
Thanks again, Tom.
Re: Grub Lost Windows Option in Dual Boot Setup
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.
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.
- 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
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:
Copy this into the file, then save and close:
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.
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
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
}
FWIW, I always disable os-prober when using a custom.cfg file. The command is sudo chmod -x /etc/grub.d/30_os-prober.
Re: Grub Lost Windows Option in Dual Boot Setup
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.
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.
- 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
Glad to hear the problem has been solved.
Well, no, that wouldn't be the explanation. Grub update doesn't consult NVRAM, which is where that list is stored.
Re: [Solved] Grub Lost Windows Option in Dual Boot Setup
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.
No matter, it is solved now, and I have marked it as such.
Once again many thanks, Tom.
Re: Grub Lost Windows Option in Dual Boot Setup
Thanks for good informetion.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.