Windows 10: How do I restore w10 bootloader? dual boot with ubuntu on separate hdd Solved

Page 3 of 3 FirstFirst 123

  1. Posts : 20
    Windows 10 64 bit Pro
    Thread Starter
       29 Dec 2016 #21

    @topgundcp
    Thanks for clarifying that. Makes sense.

    those partition files that I will download from you; I assume I could access those by placing them on a usb stick on another computer, plugging that into this problem computer, and then access/use them when booted up in that tool from post #11?
      My ComputerSystem Spec


  2. Posts : 2,151
    Ubuntu14.04x64 MintMate17x64 Win10Prox64
       29 Dec 2016 #22

    whatitdo6 said: View Post
    @topgundcp
    Thanks for clarifying that. Makes sense.

    those partition files that I will download from you; I assume I could access those by placing them on a usb stick on another computer, plugging that into this problem computer, and then access/use them when booted up in that tool from post #11?
    Yes. You can also save it to the same USB that you use to create the bootable ISO. It is a small file ~19MB.
      My ComputerSystem Spec


  3. Posts : 20
    Windows 10 64 bit Pro
    Thread Starter
       29 Dec 2016 #23

    @topgundcp

    Thanks, I'll be giving this a shot first thing when I get home. Thank you!
      My ComputerSystem Spec

  4.    29 Dec 2016 #24

    How To Fix The Windows 10 Bootloader


    The UEFI firmware supports two boot modes: UEFI mode and Legacy BIOS mode.

    - UEFI mode starts the Windows 10 boot process directly from the EFI system partition of a hard drive. UEFI mode and the GUID Partition Table (GPT) partition style on the hard drive do not use boot sectors and there is no need to set any partition as active. Note that the "bootrec /fixboot" and "bootrec /fixmbr" commands are not needed at all, if the hard drive has a GPT partition style.

    - Legacy BIOS mode starts the Windows 10 boot process at the first sector of a hard drive containing the MBR boot code. Legacy BIOS mode uses the Master Boot Record (MBR) partition style.

    1. How to fix the Windows 10 bootloader if the hard drive has a GUID Partition Table (GPT) partition style.

    On a GPT disk, Windows Setup will create a Recovery partition, an EFI system partition, a Microsoft Reserved partition (won't show in Disk Management) and a primary Windows partition.

    information   Information
    The EFI system partition is a FAT32 formatted partition from where the UEFI firmware launches the UEFI bootloader and application. If the EFI system partition has been corrupted, you can use BCDBoot to recreate the EFI system partition boot files by using new copies of these files from the Windows partition.

    bcdboot <source>

    Examples:
    bcdboot c:\windows
    bcdboot d:\windows

    BCDBoot Command-Line Options


    information   Information
    How to create an Extensible Firmware Interface (EFI) system partition on a GUID Partition Table (GPT) disk.

    create partition efi [size=<n>] [offset=<n>]

    size=<n> The size of the partition in megabytes (MB). If no size is given, the partition continues until there is no more free space in the current region.

    offset=<n> The offset in kilobytes (KB), at which the partition is created. If no offset is given, the partition is placed in the first disk extent that is large enough to hold it.

    Examples:
    create partition efi
    create partition efi size=100
    create partition efi size=260 (for "Advanced Format 4Kn" drives)

    UEFI/GPT-based hard drive partitions


    Boot from the Windows 10 USB/DVD in UEFI mode (marked UEFI in the boot menu). Press either SHIFT+F10 to bring up the command prompt or at the "Install now" screen click "Repair your computer" > "Troubleshoot" > "Command Prompt".

    Click image for larger version. 

Name:	Boot to UEFI mode or Legacy BIOS mode.png 
Views:	77 
Size:	548.1 KB 
ID:	115188

    Option 1 - Recreate the EFI system partition boot files.

    diskpart
    list volume (note the volume letter where the Windows 10 is installed)
    exit

    bcdboot c:\windows (if "C" is the volume letter of your Windows 10 partition)

    BCDBoot copies the boot files from the Windows 10 partition to the EFI system partition and creates the Boot Configuration Data (BCD) store in the same partition.

    If the volume letter is incorrect or if you boot from the Windows 10 USB/DVD in Legacy BIOS mode (not marked UEFI in the boot menu), you will receive the following error message: Failure when attempting to copy boot files.

    Click image for larger version. 

Name:	GPT - fix bootloader.png 
Views:	63 
Size:	36.7 KB 
ID:	115733

    Option 2 - Format the EFI system partition and add boot files to the EFI system partition.

    diskpart
    select disk 0
    list partition
    select partition # (make sure to select the EFI system partition)
    format quick fs=fat32
    exit

    bcdboot c:\windows (if "C" is the volume letter of your Windows 10 partition)

    Click image for larger version. 

Name:	Format the EFI System partition.png 
Views:	180 
Size:	34.7 KB 
ID:	115292

    Option 3 - How to delete and recreate the EFI system partition, if you do not have unallocated space.

    diskpart
    select disk 0
    list partition
    select partition # (make sure to select the EFI system partition)
    delete partition override
    create partition efi
    format quick fs=fat32
    exit

    bcdboot c:\windows (if "C" is the volume letter of your Windows 10 partition)

    Click image for larger version. 

Name:	Delete and recreate the EFI System partition.png 
Views:	71 
Size:	41.3 KB 
ID:	115328

    Option 4 - How to delete and recreate the EFI system partition, if you have unallocated space.

    Note: If your unallocated space is immediately to the right of the EFI system partition.
    - step 3: list partition (check the current size of your EFI system partition)
    - step 6: create partition efi size=<n> (the size of the partition in megabytes (MB))

    Note: The unit in the offset parameter (offset=<n>) is kilobytes (KB), not megabytes (MB) or gigabytes (GB).
    1 MB = 1024 KB - MB to KB Conversion Megabytes to Kilobytes Calculator
    1 GB = 1048576 KB - GB to KB Conversion Gigabytes to Kilobytes Calculator
    Example: Offset is 451 MB > 451x1024=461824 > create partition efi offset=461824

    diskpart
    select disk 0
    list partition (check the current offset of your EFI system partition)
    select partition # (make sure to select the EFI system partition)
    delete partition override
    create partition efi offset=<n> (you need to use kilobytes (KB) instead of megabytes (MB) or gigabytes (GB))
    format quick fs=fat32
    exit

    bcdboot c:\windows (if "C" is the volume letter of your Windows 10 partition)

    Click image for larger version. 

Name:	How to delete and recreate the EFI system partition, if you have unallocated space.png 
Views:	31 
Size:	41.7 KB 
ID:	116318

    2. How to fix the Windows 10 bootloader if the hard drive has a Master Boot Record (MBR) partition style.

    On an MBR disk, Windows Setup will create a System Reserved partition and a primary Windows partition.

    Boot from the Windows 10 USB/DVD in Legacy BIOS mode (not marked UEFI in the boot menu). Press either SHIFT+F10 to bring up the command prompt or at the "Install now" screen click "Repair your computer" > "Troubleshoot" > "Command Prompt".

    bootrec /fixboot (writes a new boot sector to the system partition)
    bootrec /fixmbr (writes a MBR to the system partition but does not overwrite the existing partition table)

    diskpart
    list volume (note the volume letter where the Windows 10 is installed)
    exit

    bcdboot d:\windows (if "D" is the volume letter of your Windows 10 partition)

    BCDBoot copies the boot files from the Windows 10 partition to the system partition (active partition) on the primary hard drive and creates the Boot Configuration Data (BCD) store in the same partition. If the System Reserved partition exists, it is the system partition, if not, the Windows 10 partition is the system partition.

    If the volume letter is incorrect or if you boot from the Windows 10 USB/DVD in UEFI mode (marked UEFI in the boot menu), you will receive the following error message: Failure when attempting to copy boot files.

    Click image for larger version. 

Name:	MBR - fix bootloader.png 
Views:	49 
Size:	41.3 KB 
ID:	115996

    If the System Reserved partition exists
    - System Reserved partition (System, Active, Primary Partition)
    - Windows OS partition (Boot, Page File, Crash Dump, Primary Partition)

    If the System Reserved partition does not exist
    - Windows OS partition (System, Boot, Page File, Active, Crash Dump, Primary Partition)

    This naming convention is confusing. The "System" partition on a Windows computer is where the files needed to "boot" the computer are located. It is normally the first partition on the first hard drive enumerated by the computer's BIOS. The "Boot" partition of a Windows computer can be located on any other hard drive and contains the files for the Windows operating system.

    Note: If you receive the error message "Element not found" when you run the "bootrec /fixboot" command, then you have to first mark the System Reserved partition as active. If the System Reserved partition does not exist, then mark your Windows 10 partition as active. There can be only one active system partition at a time on the primary hard drive.

    diskpart
    select disk 0
    list partition
    select partition # (if the System Reserved partition does not exist, then select the Windows 10 partition)
    active
    exit

    If you activate the wrong partition, then use the "inactive" command to de-activate it.

    You can check whether the partition is active or not, for example: diskpart > select disk 0 > select partition 1 > detail partition > The output will have: Active: Yes/No.




    How to use BCDBoot to add or repair the boot menu on a dual-boot PC.
    Look at post #3 in this thread: EasyBCD Dual Boot management for Win10 and Win7 on separate drives

    For more info about UEFI mode and Legacy BIOS mode.
    Look at post #5 in this thread: Cant install Windows 10 because of GPT partition error message
    Last edited by Avocado; 28 Jan 2017 at 13:44. Reason: more info
      My ComputerSystem Spec


  5. Posts : 20
    Windows 10 64 bit Pro
    Thread Starter
       29 Dec 2016 #25

    @Avocado

    i understand the difference between booting the recovery disk in UEFI vs legacy. I've been doing it in UEFI. I will try what you outlined here first, simply bc I'd like to be able to know how to do this manually (learning experience).

    But if this doesn't work, I will just use topgun's EFI partition data and do it how he outlined.
      My ComputerSystem Spec


  6. Posts : 20
    Windows 10 64 bit Pro
    Thread Starter
       29 Dec 2016 #26

    Avocado said: View Post
    Boot from the Windows 10 USB/DVD in UEFI mode (marked UEFI in the boot menu).

    Click image for larger version. 

Name:	Boot to UEFI mode or Legacy BIOS mode.png 
Views:	77 
Size:	548.1 KB 
ID:	115188

    STEP 1:

    - recreate the EFI System partition boot files

    bcdboot c:\windows

    Attachment 115189

    STEP 2: (if the above instructions do not work)

    - format the EFI System partition and add boot files to the EFI System partition

    diskpart
    select disk 0
    list partition
    select partition # (make sure to select the EFI System partition)
    format quick fs=fat32
    exit

    bcdboot c:\windows

    STEP 3: (if the above instructions do not work)

    - recreate the EFI System partition and add boot files to the EFI System partition

    diskpart
    select disk 0
    list partition
    select partition # (make sure to select the EFI System partition)
    delete partition override
    create partition efi
    format quick fs=fat32
    exit

    bcdboot c:\windows

    THANK YOU. This solved it. I think this was mentioned earlier by you or someone else perhaps but I've messed around with it enough now where I vaguely understood what the commands were doing. I actually had to delete the partition, recreate it, and re write the BCD as you suggested in Step 3.

    Shoutout to @topgundcp I'm sure that last method you suggested would have worked too, but now I understand how to do it manually, so I learned something.

    Also, thank you @NavyLCDR for your help as well.

    I have ONE last question, any SAFE way to remove the old ubuntu EFI entries that are present in my UEFI as boot options?

    edit: Nvm, figured it out. For anyone else wanting to know how to remove old EFI boot entries, use "EasyUEFI" it is super easy. Took like 10 seconds after install. I DID have two identical looking EFI's for my samsung ssd, one of them, in the details, showed that it had no file path. I assumed that was my old broken one and deleted it, must have been correct bc my computer boots up perfect.

    Thanks!!!
    Last edited by whatitdo6; 29 Dec 2016 at 19:09.
      My ComputerSystem Spec


 
Page 3 of 3 FirstFirst 123

Related Threads
I used to use Windows for my work and It used to boot very fast. However, after dual boot with Ubuntu, my windows boot time became very long, it was annoying. I deleted Ubuntu, FORMATED ALL DRIVE, devided partitions, reinstalled Windows but it is...
Ubuntu Dual Boot in Installation and Upgrade
I am using the non-metro Windows 10 boot loader to manage a dual boot setup (legacy BIOS) with Ubuntu. Generally, everything works fine. However, sometimes when I perform an update in Ubuntu, grub overwrites the Windows MBR. Then I have to use...
Dual boot Windows 10 and Ubuntu 16.04? in Installation and Upgrade
Is it possible?
Recently I played around with dual booting Linux Mint on my system. I decided that I would delete it for the present as I have other things to focus on. However, after deleting partitions and fixing my MBR to only boot windows my UEFI BIOS still...
I set up Ubuntu in dual boot with Win 10 and tried to replace it with Mint, which failed at installation. I then had a "grub rescue" prompt regardless of what I tried. I fixed the mbr by booting from Win 7 .iso and running Bootrec /fixmbr. I...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 22:44.
Find Us