Score:0

Windows 10 doesn't boot after Ubuntu 22.10 installation

sn flag

After I've installed Ubuntu 22.10, Windows 10 doesn't boot from GRUB (the computer just reboots). My computer has a BIOS motherboard that doesn't support UEFI.

The Ubuntu installer couldn't automatically partition my drive because it already had 4 partitions (MBR limit).

I've prepared my drive for partitioning the following way:

  1. Shrinked sda2
  2. Moved sda3 and sda4 just after sda2
  3. Converted the MBR to GPT using gdisk -f
  4. Ran the Ubuntu installation, chosing "Install alongside Windows 10"

Current drive partitions (fdisk -l):

Disk /dev/sda: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 850 
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: 283EE3B5-B530-4F2E-9FB2-149FB9A724D7

Device          Start        End    Sectors  Size Type
/dev/sda1        2048     206847     204800  100M Microsoft basic data
/dev/sda2      206848 1644306431 1644099584  784G Microsoft basic data
/dev/sda3  1644306432 1645398015    1091584  533M Windows recovery environment
/dev/sda4  1645398016 1646319615     921600  450M Windows recovery environment
/dev/sda5  1646319616 1646321663       2048    1M BIOS boot
/dev/sda6  1646321664 1647372287    1050624  513M EFI System
/dev/sda7  1647372288 1953523711  306151424  146G Linux filesystem


Disk /dev/sdb: 10,91 TiB, 12000138625024 bytes, 23437770752 sectors
Disk model: ST12000VN0008-2Y
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: C984BE76-DC83-4A2C-99DF-6F27D46768B1

Device     Start         End     Sectors  Size Type
/dev/sdb1     34       32767       32734   16M Microsoft reserved
/dev/sdb2  32768 23437766655 23437733888 10,9T Microsoft basic data

Things I've tried to fix the problem:

  1. Added ntldr /bootmgr at the end of the Windows menu entry in grub.cfg
  2. Used boot-repair as described here
  3. Ran update-grub.

None of those worked.

Things I don't want to do: reinstall Windows 10.

Please help.

mook765 avatar
cn flag
The reason is the conversion from MBR to GPT. Windows was installed in legacy boot mode which requires MBR from Windows side. On GPT drive Windows must be UEFI boot mode. Both OS need to be in same boot mode for Grub to work for both OS. I don't know if Windows can be repaired or needs reinstall, probably better to ask on a Windows forum or https://superuser.com/ .
mook765 avatar
cn flag
Since you motherboard doesn't support UEFI and you want to run Windows you have to use MBR. `gdisk` provides a comment to convert back from GPT to MBR but best to delete all Ubuntu partitions first (sda5, sda6, sda7) to make conversion easier. see `man gdisk`. No guarantee that you can boot Windows after conversion, maybe still needs repair. We are not the Windows experts here, sorry.
Score:0
jp flag

As correctly noted by @mook765, converting from MBR to GPT was a mistake in your case, and recovery will require Windows expertise. That said, there are some possibilities that can involve Ubuntu.

First, you say that your computer is BIOS-only, but you don't say what the computer or motherboard is. Most x86-64 computers and motherboards sold since 2011 are EFI-based, but some of them were shipped to boot in BIOS/CSM/legacy mode. Thus, unless the computer is over a dozen years old, it probably does support EFI-mode booting. If this is the case, you may be able to use the Windows MBR2GPT tool to get it working; however, you may need to convert back to MBR first, which will in turn require deleting the Ubuntu partitions and starting over with the Ubuntu installation.

Second, if the computer is truly BIOS-only, then you may still be able to boot in EFI mode from a GPT disk by using a BIOS-to-EFI boot loader -- basically an EFI implementation that loads like a boot loader. The one that I know of that's currently being maintained is the Clover boot loader. This is intended for booting macOS, so there are a lot of Mac references in the documentation; but it might just get you started. You'll need to install an EFI-mode boot loader for Windows within Clover if you take this approach. Overall, this approach is likely to be a major hassle, so I don't think it's really a good option, but I thought it was worth mentioning in case you're interested in the challenge.

Third, your best option is probably to delete the Ubuntu partitions, convert back to MBR, reinstall the BIOS-mode boot loader (since I fear it was likely wiped out at some point), and start again. Unfortunately, with four partitions already used by Windows, this will be awkward at best. Maybe somebody on a Windows forum will be able to suggest a way to delete one of those partitions or convert it from primary to logical form. (gdisk can do this in some cases, but you'd probably have to move at least one partition to do so; and I don't know how Windows would react to that. My guess is it wouldn't react well.) Your best bet for easily installing Ubuntu once you get Windows working again would likely be to add a disk for Ubuntu.

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.