Windows 10 "bootrec /fixboot" fails with "Access is Denied" on Multiboot System

Hi All,

After upgrading Ubuntu to 18.04 LTS on my multiboot system, the install apparently overwrote the boot sector of my Windows 10 NTFS partition with GRUB2.  I am trying to restore the boot sector but I am running into some problems.

When booting the Windows 10 install USB, I tried Startup Repair but that failed with:

"Automatic Repair couldn't repair your PC"

Then, I have tried the following commands:

  • bootrec /rebuildbcd
  • bootrec /fixmbr
  • bootrec /fixboot <-- This fails with "Access is Denied"

Since that failed, I have tried:

  • bootsect /nt60 C: /mbr <-- Which I think wipes the boot sector clean, after running this, my computer boots to a single cursor on a blank screen
  • bcdboot C:\Windows /s C: /f BIOS <-- I think this creates BIOS boot files

None of these seem to restore the NTFS partition boot sector, since when I try to boot Windows, all I get is a black screen with a single cursor.  This indicates to me that the boot sector of the NTFS partition is still broken.

Please also note the following unique things about my system setup:

  • Partitioning Scheme: GPT with Hybrid MBR
  • Boot Mode: Legacy BIOS (not EFI, it's not supported by my motherboard)
  • GRUB2 Bootloader is installed in the first 200MB "EFI System Partition" despite it booting in Legacy BIOS mode
  • The Hybrid MBR is not currently aware of the 200MB "EFI System Partition" (this can be changed, please see partition tables below)
  • Windows is on Partition 4 below (It still says Windows 7 because I upgraded from Windows 7)

GPT Scheme

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   200.0 MiB   EF02  EFI System Partition
   2          411648       292372703   139.2 GiB   AF00  MacOSX
   3       292372704       293642239   619.9 MiB   AB00 
   4       293642240       684003327   186.1 GiB   0700  WINDOWS 7
   5       684265472      1074823167   186.2 GiB   0700  LINUX
   6      1075085865      1087115263   5.7 GiB     8200 
   7      1087375590      3906766847   1.3 TiB     0700 

Hybrid MBR

Number  Start (sector)    End (sector)  Size       Code  Name
   2          411648       292372703   139.2 GiB   AF00  MacOSX
   4       293642240       684003327   186.1 GiB   0700  WINDOWS 7
   7      1087375590      3906766847   1.3 TiB     0700 

My question is, how do I restore the boot sector of my NTFS partition and boot Windows 10 via Legacy BIOS Mode?

I suspect the solution may involve reformatting my EFI System Partition to FAT32, and then creating the following Hybrid MBR table:

Proposed Hybrid MBR Table

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   200.0 MiB   EF02  EFI System Partition
   4       293642240       684003327   186.1 GiB   0700  WINDOWS 7

And then hopefully the "bootreq /fixboot Access is Denied" error will go away.  Any ideas?

Also, if someone could explain which of the above commands actually installs the Windows bootloader back to the NTFS partition boot sector?

Thanks!

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

Also, if someone could explain which of the above commands actually installs the Windows bootloader back to the NTFS partition boot sector?

Looks like in Windows 10 we don't use bootrec?(!!)

https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/bootsect-command-line-options 

(BING search for

    +"bootrec" site:docs.microsoft.com
)

<quote>

Bootsect.exe updates the master boot code for hard disk partitions to switch between Bootmgr and NT Loader (NTLDR). You can use this tool to restore the boot sector on your computer. This tool replaces FixFAT and FixNTFS.

</quote>

Even more surprising a search for bootrec there has no hits?

Google shows that there are some but they are certainly not highlighted there.

Here's someone's summary which includes both

https://www.digitalcitizen.life/command-prompt-fix-issues-your-boot-records
 (Google search for

    "bootrec" vs "bootsect"  in windows 10
)

FYI

Robert Aldwinckle

---

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thanks for your reply, would you be able to answer my other question?

My question is, how do I restore the boot sector of my NTFS partition and boot Windows 10 via Legacy BIOS Mode?

I saw this guide which states:

https://www.boyans.net/RepairWindows/repair-windows-boot.html

  bootsect /nt60 N: /force /mbr - rewrite Windows 7/8/10 boot records to system partition and MBR.
 
attrib -s -h N:\boot\bcd - remove system and hidden attributes of BCD file so it can be deleted. See Note below.
 
del N:\boot\bcd - delete BCD. See Note below.
 
bcdboot c:\windows /s N: - re/create BCD assuming your latest Windows version is installed on drive c:

Are these the steps to follow?

Also, the system partition is the partition that will eventually have GRUB2 installed on it.  Will these commands also repair the NTFS partition boot sector?

It seems that several sources online still recommend bootrec to repair Windows 10 boot.  It also still comes with the Windows 10 installer. Why is that?

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

My question is, how do I restore the boot sector of my NTFS partition and boot Windows 10 via Legacy BIOS Mode?

I don't know.  I thought the "summary" page I found for you mentioned bootsect as an auxiliary tool but I don't even understand why it would be needed.  One interpretation would be that it is needed for repairing a multi-boot legacy scenario?  Another uncertainty would concern your non-Windows OS.  E.g. I imagine that  bootrec  /SCANOS  might miss your other OS but maybe not.  And does BootMgr support those other OS?

We probably need to do some more searching, this time involving GRUB or just non-Windows OS in general.

It seems that several sources online still recommend bootrec to repair Windows 10 boot.  It also still comes with the Windows 10 installer. Why is that?

I don't know.  I was just indicating my surprise that DOCS doesn't seem to mention bootrec.  That's what I was trying to research there and why I tried to find a page which could explain the difference between bootsect and the equivalent functionality in bootrec.  Still looking I could say.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi, It still does not boot.  I am at my wits end.  Startup Repair does not work and the commands below ran successfully but I still end up with a blank screen.  Is there any way to restore windows?

Here is what I have tried:

- Using System Restore to the last good restore point

- chkdsk /f (Found no errors)

Here are the commands I ran to attempt to fix the boot.

1. Here are the volumes listed, C: is my Windows Partition

2. I then ran:

bootrec /fixmbr

bootsect /nt60 all /force

This is to fix the NTFS boot sector and it looks like it succeeded

3. I had to delete the existing BCD in order to rebuild it

4. I successfully rebuilt my bcd

5. But still it just boots to a blank command screen with nothing.  There is no error, it just shows nothing.  You can't even type.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Since there is only one OS you won't have a boot menu.  Try creating a boot menu too?   bcdedit  /set  {bootmgr}  DisplayBootMenu  Yes

That way you will at least be able to get into the Advanced Boot Options via F8.

That would be my own personal tack in this circumstance.  I haven't seen it tried anywhere, probably mostly because the people who are writing tutorials understand what they are doing.

Also, I have the vague understanding that even an NTFS NTLDR boot uses a small system partition.  The so-called boot partition is actually where the system goes.  So, I would be wondering if you need to fix the boot sector on that E: drive too?  E.g. it didn't get updated.  Is that what should be booted from?

https://en.wikipedia.org/wiki/System_partition_and_boot_partition 

Those were just quick ideas.  I'll try thinking about this and researching it some more later.

Good luck

Robert

---

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thanks for your help so far.  I really appreciate that you are helping me with this issue.

I tried running the bcdedit command that you gave and it still boots to that black screen with a cmd cursor.  It is leading me to strongly suspect that it is an issue with booting Windows 10 in BIOS mode.  I know Windows 10 supports BIOS booting but I am wondering if the tool is not creating a proper BCD for BIOS booting?

It also may have something to do with the Hybrid MBR setup I mentioned earlier.  My disk is formatted as a GPT scheme but I created a Hybrid MBR gdisk so that Windows thinks it is installed on an MBR partition.  More info here:

https://www.rodsbooks.com/gdisk/hybrid.html

I was thinking... f I reformat my System Partition to FAT32 then run this command:

bcdboot C:\Windows /s E: /f ALL

Do you think that will work? Also currently my Windows Partition is the only bootable partition (I can change the boot flags on E: if needed)

E: - System Partition - FAT32

C: - Windows Partition - NTFS [Bootable:Yes]

I also suspected that maybe my Windows install was corrupt but I ran sfc and it did not find anything wrong.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

reformat my System Partition to FAT32 then run this command:

bcdboot C:\Windows /s E: /f ALL

That looks reasonable or since you think that you don't have UEFI why not just  /f BIOS explicitly?

 /s         Specifies an optional volume letter parameter to designate
             the target system partition where boot environment files are
             copied.  The default is the system partition identified by
             the firmware.
/f         Used with the /s command, specifies the firmware type of the
             target system partition. Options for <firmware> are 'UEFI',
             'BIOS', or 'ALL'.

Then see if you can fix that boot sector on E:  perhaps just with  bootrec.

BTW I'm wondering where your GRUB fits into this; e.g. presumably that's why you are having a problem with E: now?  Then on another tack would GRUB have better help for fixing the Windows boots?  Still searching for more relevant help but not finding the right search expressions or locations.

Good luck

Robert

---

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

GRUB is normally installed on the System Partition E:

It boots in BIOS mode.  Usually I am able to reformat it and reinstall GRUB no problem.  This action plus recreating the Hybrid MBR usually never affects the Windows Partition.  I read that each NTFS partition has a boot sector.

Assuming that rebuilding my BCD succeeds, I am assuming that these commands:

bootsect /nt60 all /force

or

bootrec /fixboot

Are supposed to fix the boot sector of the NTFS partition.  I also noticed that I previously downloaded an older version of Windows 10.  And when I ran bootrec /fixboot, it ran successfully although it did not fix the problem.  I currently still cannot boot.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thanks for your help!

I managed to get Windows to boot!!!

The issue was 2 things

  1. Grub overwrote the NTFS boot sector
  2. Grub could not find the Windows bootmgr and booted to a black screen

Since I can't boot only windows, I had to fix GRUB.

Ok here is what I did to fix it:

  1. I launched a Windows Installer USB and entered the command line
  2. I ran bootrec /rebuildbcd to fix my BCD then
  3. bootsect /nt60 C: /force <-- This clears GRUB from the NTFS Boot sector
  4. Then GRUB couldn't boot Windows, it just went to a black screen with a DOS cursor
  5. To fix this I had to add: ntldr /bootmgr after chainloader +1 in my /boot/grub/grub.cfg

The GRUB fix is here: *Grub* Windows 10 doesn't start anymore

Thanks again!

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Details on my Fix.

Ok so after doing a bit of research into what is going on:

  • ntldr /bootmgr in my /boot/grub/grub.cfg actually bypasses the partition boot sector altogether and directly boots into bootmgr - See ntldr documentation
  • I also noticed that clover exhibits the same behaviour when also trying to boot into Windows
  • This leads me to conclude that my Windows NTFS bootsector is completely corrupted and unrecoverable even despite running bootsect /nt60 C: /force.  This command is supposed to correct any NTFS boot sector errors on the partition but in my case, it failed to do so.

In summary, the reason why it booted into a black screen was because my NTFS Partition Boot Sector (not to be confused with MBR) is completely corrupted and unrecoverable using standard tools like bootsect.  For now, the only way to boot directly into Windows 10 is through GRUB.

3 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

 
 

Question Info


Last updated April 23, 2023 Views 17,853 Applies to: