Windows 10 Reinstalling bootloader on a different disk

LtJack92

Well-Known Member
Hi all.
Last week I've installed Windows on one of the SSDs in my computer (the other one has a linux installation).
During install I chose the free disk however Windows decided to install the bootloader in the other SSD (I believe I was never asked about where to place the bootloader...)

My question is simple: how I can reinstall the bootloader so that the two SSDs are completely "self contained"? Windows should have its own bootloader in its SSD and the linux installation should be completely left alone.

I know one way of doing this: removing the linux disk and reinstalling windows on the PC with just the other SSD. However I'd like to avoid modifying the hardware to fix what ought to be a simple configuration option and reinstalling the whole windows install when I have just to fix the bootloader.

These are my disks as shown by the partition manager (sorry for the Italian, if you need a translation I can provide it):


37390


Disk0 (the one with 500GB) is the Windows SSD installed on a SATA port while the 250GB SSD is the linux disk installed via M2.

Last piece of information: the linux drive is hardware encrypted (using sedutil). The issue I care about is that I want to be able to boot Windows without having to decrypt the other drive. Currently I must decrypt the other drive to be able to boot windows which does not make sense.
When I tried to install windows it did not let me install it when the other drive was encrypted (claiming that the system partition was to small), I tried to decrypt the other drive and it installed breaking the linux bootloader. I should have probably removed the encrypted drive instead but I did not want to modify hardware when the windows install asks you on which drive to install and that ought to be it.
 
Try Super Grub2 disk. (this will help you boot into an OS if the bootloader is broken and then you can reinstall it)

Since each OS is on a different disk, do you not have to choose in BIOS/UEFI which one to boot?

I used dual boot in the past but both Windows and Linux were on the same disk.
 
I already fixed the grub. But I'd like to have grub+linux on one SSD and Windows with its own bootloader on the other.

I'm relatively ignorant about UEFI details. When I first boot (with the linux drive hardware encrypted) I get a bunch of empty slots in the boot menu and the last one is the SSD with linux. I thought this was simply because the firmware sees that no bootloader is installed on the second this, but maybe I'm wrong?
 
EFI bootladers are located by the UEFI firmware of your computer during the boot process, so you certainly can move the Windows boot loader to the SSD with Windows on it. In a dual boot systems it's a better idea to keep the boot loaders on the same disk. I find it easier to manage and you don't have to keep switching disks at the firmware level.

While the UEFI specification doesn't explicitly state it Microsoft does recommend the first partition be the boot partition. The windows install process will always make it the first partition, but you should be able to shrink your C partition and create a new EFI partition there.

As far as the erroneous entries, you should be able to clean them up with (depending from which boot loader your seeing them from) efimanager for Linux and bcdedit from Windows.
 
I tried to check carefully the BIOS settings.

I cannot select the Windows SSD from the boot options, but I believe this is because it is configured to only accept UEFI devices to boot (so the firmware sees no EFI partition in that disk and does not list it as a possibility I guess).

I will try now to shrink the C partition and add an EFI partition and I will see if this fixes the issue.
 
As a sharing point and perhaps you're already aware.

Technically speaking all computers have firmware. (Either BIOS or UEFI) all newer will strictly be UEFI. Your firmware which is likely UEFI will scan the disks for a GPT partition table and then at the partition designated as the EFI boot partition. If neither of these exist then that given device will not likely show up as a boot selection.

If the disk is not, it will need to formatted or converted to GPT and a boot partition added with an EFI boot manager and EFI boot loader for it to be detected by the firmware.
 
In diskpart or disk manager you should be able to skrink C and create it. It should be a 500MB fat32 partition. In diskpart you can create specifically a EFI partition with create partition EFI size=500 then select the new partition and format fs=fat32 quick

You'll then want to assign it a drive assign letter=#
Then you need to copy all critical boot files with
bcdboot C:\Windows /S Z: /F EFI assuming you assigned the efi partition the letter Z
 
I searched and did basically what you said right now. I created a 100MB partition (the instructions I found used 100) and it seems to work fine. I don't plan to ever add multiple OSes on this disk so I believe it should be fine.

To recap for anyone else having a similar problem:
  1. Boot using the installation media for Windows 10
  2. At the first screen (with GUI) press SHIFT+F10 to get a command line
  3. Run the following commands in bold
    • diskpart
    • list disk and note the number of the disk you want to fix
    • select disk <number-of-said-disk>
    • list partition and not the number of the partition that contains the Windows 10 installation
    • select partition <number-of-partition>
    • shrink desired=<size> (I used 100 for <size> and it worked fine, Neemobeer suggests 500)
    • create partition efi size=<same-size-as-above>
    • format quick fs=fat32
    • assign letter=s
    • list partition check that everything looks like you wanted with an EFI partition in there
    • list volume and keep track of the volume letter where Windows 10 is installed
    • exit
  4. Then run bcdboot <letter-for-windows10>:\windows /s S: (Neemobeer suggest to specify /F EFI to specify the firmware type. It works without /F since bcdboot by default uses UEFI for GPT disks. This documentation does not list /F as a valid option while this one does but the valid would be UEFI or ALL and not EFI)
  5. If no error message was given you are good to go. Just exit and reboot and you should be able to select the disk from the boot menu.
The only doubt I have is why Windows decided to end up in the situation I described in my initial post. My only guess is that I may have used the manual procedure and I probably forgot to create the system partition on the second disk. It's the only sensible way in which I believe I could end up in this situation.

Thanks!
 
Back
Top