Score:0

How to set a Windows boot partition

us flag

I'm running Kubuntu 22.04.1. My machine has two hard drives,if that's relevant. One of the options on the boot menu is the Windows boot manager. Right now, if I choose that option, I get sent to a Windows recovery screen. Although I can eventually get to the Windows partition, I'd like to be able to get there more directly and sraightfowardly. I've installed the Grub Customizer, but it hasn't so far been helpful with this problem. I'm also able to edit the files in /boot directly.

The OS Prober finds the Windows boot manager but does not find the actual Windows partition. Since I can boot the Windows partition a different (but more indirect) way, I don't want to disrupt what is already working.

What should I do?

Update 1: There are two ways I might boot my desired Windows partition: (a) it might appear explicitly in the Ubuntu boot menu (which I'd prefer), or (b) the Windows Boot Manager might be able to find it (which it can't). Case (b) is of course a Windows question, not a Ubuntu question. But I'm hoping I can get approach (a) to work, which would happen if os-prober could detect that Windows partition.

Nmath avatar
ng flag
Unfortunately once you've selected Windows from GRUB, GRUB hands off to the Windows bootloader and nothing related to Ubuntu is running on your computer at that point. This also means there's nothing in Ubuntu you can do to solve this problem since it is 100% related to Windows and 0% related to Ubuntu. If Windows boot manager is not behaving correctly, you'll need to use support options for Windows. Unfortunately there's not anything you can do in Ubuntu to fix this since Ubuntu is not involved in Windows boot.
us flag
Perhaps there's some clue that I can create that would enable os-prober to detect the Windows partition, just as it detects the Windows boot loader. But I wasn't able to penetrate the information on os-prober to determine what that might be.
us flag
I was hoping that somehow grub would offer a fifth choice in its bootloader to load the Windows partition -- which it would do (after update-grub was called) if os-prober could find that partition. os-prober's job is to test partitions to see if they're bootable, so if its tests were a little more revealing, the problem would be solved. It's already capable of detecting some Windows partitions --- just not the one I'm dealing with.
Nmath avatar
ng flag
One of us is perhaps confused. Based on your description, my understanding is you are choosing Windows in GRUB and it takes you to Windows Recovery. If that's the case then 1) os prober won't help because it already detected and added the Windows entry and 2) GRUB is doing its job perfectly. Let's use a crude analogy. If you drive your car to the airport, you arrive to the gate on time, you board the plane, but the plane needs unplanned maintenance so you get delayed, it would not have made any difference if you left earlier or put premium gas in your car. Your car did its job perfectly
Nmath avatar
ng flag
Windows is detected and GRUB hands off to Windows. If after that point, Windows is broken, then the only way to solve that problem is to fix Windows. Nothing that happens prior to that is relevant.
us flag
The Ubuntu boot menu contains an entry for the Windows Boot Manager, which presumably is there because os-prober found it. I would like the Ubuntu boot menu to contain and additional entry for a particular Windows partition, which I assume would appear if os-prober found that partition.
Nmath avatar
ng flag
What Windows partition are you talking about if not the one that contains Windows boot manager? Hey, I'm really trying to help you here, but this is not an issue that can be solved with Ubuntu.
us flag
The Windows partition I see is the Windows Boot Manager.
Nmath avatar
ng flag
OK then everything I've already said is applicable. I suggest that you post about the Windows recovery issue on Super User because they are more prepared to help with Windows boot issues.
us flag
There is an EFI system partition, which os-prober discovers and includes in the Ubuntu boot menu as the Windows Boot Manager. There is also a Win10 partition, which neither os-prober nor the Windows Boot Manager can see. (I created the Win10 partition using a Win10 installation USB stick.) Ideally, os-prober would discover that Win10 partition and include it in the Ubuntu boot menu, but it doesn't.
Score:0
us flag

To solve this problem I had to resort to a Windows 10 boot USB stick, despite my vigorous attempts to fix it purely through Ubuntu. Once I reconciled myself to that necessity, I loaded the USB stick and navigated to a command prompt. The following three commands did the trick:

bootrec /RebuildBcd

bootrec /fixMbr

bootrec /fixboot

Once I did that, the Windows Boot Manager entry in the Ubuntu boot menu took me directly to the Windows partition.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.