1

My disk setup is currently as follows:

Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Model: WDC WD1003FZEX-0
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 8F14ACC0-7807-4C09-BCB0-C340A635CF07
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3437 sectors (1.7 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            6143   2.0 MiB     EF02  BIOS boot partition
   2            6144       524294143   250.0 GiB   8300  Linux filesystem
   3       524294144      1048582143   250.0 GiB   8300  Linux filesystem
   4      1048582144      1427140607   180.5 GiB   8300  Data
   5      1427140608      1949331455   249.0 GiB   0700  Microsoft basic data
   6      1949331456      1953523711   2.0 GiB     2700  Windows RE

I've got to this by having a first installation of Windows 10 (now on 5) and a Gentoo based Linux (now on 2) on a MBR partitioning scheme. All went fine. In time I have experimented with Linux, changed to GPT with a protective MBR, then added a second partition that holds another Gentoo based Linux (now on 3). All went fine until Windows 10 got updated. I know that until the updates, Windows 10 booted as MBR. I presume that it detected the GPT during the upgrade and changed it's booting to UEFI. The system is BIOS, can't upgrade to UEFI, now Windows can't boot - went to a short boot attempt and restarts in a loop. I've used a Windows 10 ISO provided by Microsoft to install and fix the system, on a Ventoy live stick. That can't repair the boot, I think it can't handle GRUB and the protective MBR and stops. I've entered in its command line troubleshooting, attempted to fix the boot and force rebuilding it as BIOS by issuing:

bcdboot C:\Windows /s C: /f BIOS

No luck, it seems it attempts a secure boot now as it complains by displaying this at boot time:

error: invalid signature

The GRUB entries I've tried:

menuentry "Windows 10 BIOS MBR" {
    savedefault
    insmod part_msdos
    insmod ntfs
    insmod chain
    chainloader (hd1,msdos1)+1
}

then:

menuentry "Windows 10 BIOS MBR" {
    savedefault
    insmod part_msdos
    insmod ntfs
    insmod chain
    drivemap hd0 hd1
    chainloader (hd1,msdos1)+1
}

I am not sure of how this should be, though.

So, I know Windoes 10 worked due to its initial MBR boot setup. How would this be fixed after the upgrade and preserve the protective MBR?

6
  • Use search -u $uuid -s and ntldr /bootmgr instead. $uuid should be replaced with the filesystem UUID of the filesystem that consists of /bootmgr (i.e. the volume specified with /s when bcdboot).
    – Tom Yan
    Dec 28, 2021 at 12:12
  • Please elaborate a bit. I am not aware of that command, I see a different syntax here. Shouldn't UUIDs be related to UEFI boot, a thing I try to avoid?
    – mike
    Dec 28, 2021 at 15:12
  • Windows only boots in UEFI mode from files in an ESP - efi system partition on gpt partitioned drive. Windows only boots in BIOS mode from MBR partitions and its boot files must be in a primary NTFS partition with boot flag. You do not seem to have either correct? Please copy & paste the pastebin link to the Bootinfo summary report ( do not post report), do not run the auto fix till reviewed.Lets see details, use ppa version with your USB installer (2nd option) or any working install, not Boot-Repair ISO, unless Gentoo does not work well with it. help.ubuntu.com/community/Boot-Repair
    – oldfred
    Dec 28, 2021 at 15:30
  • No, UUID has nothing to do with UEFI booting. If you read the page you linked more carefully, you will see why -u and -s (well, it doesn't mention that -s is equivalent to --set, but does mention its default value; and root refers to the / of /bootmgr).
    – Tom Yan
    Dec 28, 2021 at 15:32
  • But yeah, I forgot that you can't boot Windows in the BIOS/legacy way when it's on GPT-style drive, although I'm not entirely sure if that's also the case with the help of grub's ntldr. (Booting it in UEFI mode when it's on MBR-style drive is on the other hand possible though, albeit not officially "supported".)
    – Tom Yan
    Dec 28, 2021 at 15:35

1 Answer 1

0

You can try:

menuentry "Windows 10 BIOS MBR" {
    search -u $uuid -s
    ntldr /bootmgr
}

With $uuid being replaced with the output from:

blkid -no UUID /dev/sda5

(Apparently you installed Windows Boot Manager to / C: is the fifth partition.)

However, since the disk is partitioned with GPT, most likely bootmgr will ultimately fail in booting the Windows installation.

1
  • Did not work. It reboots.
    – mike
    Dec 28, 2021 at 16:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .