Install Bootloader Windows 10

0 views
Skip to first unread message

Natasha Mulhearn

unread,
Jul 31, 2024, 5:48:47 AM7/31/24
to ouneananwa

I've got a new ssd and would like to install ubuntu on it and dual-boot it on my main machine with windows. I have two drives beyond the new one, 1 ssd and 1 hdd, with mbr partitions. Windows is installed on the ssd. (ssd is primary partition and boot drive, BIOS mode: legacy)

Everything is working and both windows and the ubuntu installation media finds the new drive. Now my question is: which drive do I install the boot loader on? I would like to be able to choose which system to load at boot.

install bootloader windows 10


Download Ziphttps://perdigahiara.blogspot.com/?ldf=2zUJyw



Boot loader will be installed during Ubuntu installation. I sugest install boot loader (Grub) to MBR of hardrive where Windows is installed. If you are using EFI system partion, also use the same hard drive. You can turn off the Security Boot in BIOS before start Ubuntu installation. Some third-party drivers (e.g. wifi) can be not installed properly. Grub boot menu will be created automatically. Good luck.

I would suggest installing Ubuntu in Legacy mode using the Something else option and put GRUB on the Ubuntu Disk. It will add Windows to the boot menu automatically, If it does not for some reason, just run sudo update-grub

In Use Bootrec.exe in the Windows RE to troubleshoot startup issues (applies to Windows 7 and Windows Vista) they say to use Bootrec.exe with options /FixMbr /FixBoot, but when I type "bootrec.exe /FixMbr" in a command prompt, Windows says:

Alternatively you can use "Dual-boot Repair Tool" which has a graphical interface to bcdboot.exe, bootsect.exe and other useful functions like boot sector view and ... one click dual-boot repair function for Windows 10/8/7/Vista (also can fix Windows XP boot files).

The other answers given here work great on MBR/BIOS systems, however if you're on a UEFI system like I am, bootsect will just write a semi-functional boot MBR over the GPT protective MBR and bootrec just gives an "Access denied" error message, and neither one has a functional option to fix a broken EFI system partition, which on a UEFI/GPT drive is what contains the bootloader that used to be stored in the MBR. There's unfortunately almost no up-to-date guides on fixing the UEFI Windows Boot Manager (almost all of them just say to run the graphical Startup Repair utility, but that doesn't fix the problem in all cases), but I finally found the correct solution buried in this article, which requires the use of the bcdboot command instead:

Now do select volume x (where x is the volume number for the ESP) and then assign letter=N: to mount the partition. Run list volume again and note that the ESP is now assigned a driver letter. Run exit to leave diskpart.

(Optional) If you are not currently dual booting and want to fully clean the ESP before writing a new bootloader, run format N: /FS:FAT32 to reformat it as FAT32. This is probably not necessary under normal circumstances, however, as bcdboot seems to do a good job of cleaning things up itself. Especially do not do this if you have a Linux distro on another partition or else you'll have to reinstall GRUB as well once you're done with this. Also note that the following steps should not affect an EFI GRUB install as long as you do not otherwise delete GRUB's existing directory on the ESP.

Finally, write the new bootloader to the partition with bcdboot C:\windows /s N: /f UEFI. This command rebuilds a new UEFI-compatible bootloader on the ESP mounted at N: using the Windows installation mounted at C:\windows. Once it's done, you can verify the new bootloader was written by running dir N:\EFI, where you should see a Microsoft directory containing the new Windows Boot Manager as well as a boot directory containing the fallback bootloader (along with other directories for any other bootloaders you have installed, such as GRUB for Linux).

Symptom: Had a Windows 10 blue error screen directly after choosing Windows 10 in the grub boot menu with some cryptic error code, which shows not much information. It says I should press F8 for troubleshooting or Enter to retry, but F8 just shows the same error.

Notes:The problem other solutions tries have when you have a working grub you may not want to break that. As such, e.g. do not overwrite the MBR (breaks MBR and requires grub reinstall then) or overwrite the boot sector.

In this article, we will learn how to repair the Windows bootloader on a modern computer that uses UEFI instead of a classic BIOS and GPT disk partition table (instead of MBR). The corruption of the Windows bootloader can occur after installing a second OS (in Dual Boot configurations), file system corruption, incorrect actions during Windows recovery, removal of some data on hidden partitions, malicious software (virus, ransomware, etc.), and for some other reasons. (adsbygoogle = window.adsbygoogle []).push();

A UEFI computer with Windows installed in native mode will not be able to boot if the Windows EFI bootloader is corrupted. When trying to boot from a disk with a damaged or missing EFI bootloader, the following BSOD (Blue Screen of Death) error appears:

In this example, you can see that the EFI boot partition has the partition 2 index (aka Volume 5 with the Hidden label). The easiest way to identify an EFI partition is by the FAT32 file system and 100 MB in size (this is the standard minimum size of EFI partition for Windows computers; in rare cases, the partition size may differ). The most commonly used label for it is System EFI or ESP/EFI System Partition).

In this case, K: is the drive letter assigned to the EFI partition just above. If the \EFI\Microsoft\Boot\ directory is missing (error The system cannot find the path specified), try the following commands:

You can use all these commands only for MBR-based disks. If your computer boots in UEFI mode, then it uses the GPT partition table (as in our case). Therefore, when you run bootrec commands, you will see an error: access is denied

You need to use the BCDBoot.exe tool to restore bootloader files and fix the boot records on the EFI partition by copying them from the system directory on the Windows partition. The BCD bootloader configuration is recreated using the %WINDIR%\System32\Config\BCD-Template file.

Delete the current BCD configuration file by renaming it (this will keep the old boot configuration as a backup): ren BCD BCD.bak
Using the bcdboot tool, you need to copy the critical files of the UEFI boot environment from the system directory to the EFI boot partition and recreate the BCD bootloader config file:
bcdboot C:\Windows /l en-us /s k: /f ALL

An entry should appear in the Windows Boot Manager section containing the full path to the UEFI boot file (\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI).In this example, it is located on volume 5 (partition=\Device\HarddiskVolume5).

The Windows Boot Manager section must contain the path to the EFI partition (=\Device\HarddiskVolume5 ) and the path to the boot manager file (bootmgfw.efi). The Windows Boot Loader section contains the Windows partition info and the path to the Windows EFI bootloader ( \Windows\system32\winload.efi). When you turn it on, your computer will pass control to the EFI bootloader, which will start the Windows bootloader.

Now you need to restart your computer and disconnect the bootable media. If you did everything correctly, the Windows Boot Manager should appear in the list of bootable devices, where you can choose a desired operating system to boot. Your EFI bootloader and BCD configuration have been restored successfully!

I was looking for fix for so long but finally this solved my problem. I thought thats end for 1TB of data on my disk because of damaged boot BCD files but this helped me a lot! Thank you for this guide

what about if you press f9 for your bios boot options, not only do I see the bootmanager as an option, I see the second fat32 partition I made with winodow setup ISO extracted on it as a boot option label as my Hard drive model number . IE ST1503xxxxxxxx , something like that, and when I choose that, it goes right into setup to install or repair my computer..

For a moment I thought I would never be able to bring my laptop back to life again, but this page helped me to fix the problem. Just needed to change the language in the syntax to nl-NL and find the right volume and file (was 300MB in my case, but also a FAT32, also slighly different name of the BCD-file). Thanks a lot!

I skipped the steps with the FAT 32 and got all the way until renaming BCD I fixed it and was successful but when I went to rename it access got denied. When I attempted to copy the boot files they also failed. Any other ideas?

Thanks a lot.
Worked for me too on Windows 10. I read many forums and you were the only one to provide the correct instructions for creating the BCD store again:
bcdboot C:\Windows /l en-us /s k: /f ALL
In my case I actually had to run the free Boot-Repair tool afterwards but I got the job done.

if your os is corrupted, you could have use windows 10 setup ISO on a usb and repaired it by using DISM command from the command prompt and targeted C: by using the install.wim as your source to fix it .

I have read many similar articles on how to fix Windows boot problem in order to get mine working again. This is the ONLY article that actually works. You have helped me a lot. Thank you so very much!!!

This works! Thank you i appreciate it. For all who get the failure when initializing library system volume eroor. Just try the next FAT32 volume. I got that error at first. I tried the next FAT32 drive and it worked. Trust me. I was frustrated too, until i found the blog. Thank again.

Thanks for your help. I was getting no where with trying to fix the boot issues with this server. The boot info was corrupted or just not readable. No matter what i did nothing worked until i tried your steps. yours worked on the first try.

Havent been to H/W for very long and while moving my OS to SSD and then cleaning up my HDD i messed it up. Was quite confused about the solutions provided and i was getting errors because I was looking at wrong partitions. Never knew there is something called EFI partition too. This article helped a lot and find the exact partition which i should work with when all other articles didnt mention about EFI and how to find them in the Volume. Thanks a lot it worked after I ran bootrec /rebuildbcd on the EFI partition selecting the folder of EFI.

93ddb68554
Reply all
Reply to author
Forward
0 new messages