Fucked Up EFI Bootloader Help
So you installed windows on your new drive, but forgot to unplug your old drive with a previous installation of windows on it... You can still fix it. Instructions below for advanced users.
Windows installer is a bit dumb in this regard. If an existing EFI is found it will use this automatically. Even if it's on another disk. Don't ask me why it does this because I have no idea and seen it happen dozens of times.
Disk partitions are created in this order for Windows:
EFI > MSR > RECOVERY > Windows
For Linux, I use this order:
EFI > SWAP > / > /home
The ideal solution here is to install Windows through the deployment tools (dism) to bypass this issue of it using the wrong EFI partition.
If Windows installed on the disk without an EFI partition, this isn't a huge problem, but does come with limitations.
You can move partitions to the right and create free space to the left. It's just not possible. EFI partitions should be first. But it's entirely possible to boot from EFI partition in any order. With Windows booted, open Disk Manager and shrink your Windows volume by 200mb. Leave it as unallocated space.
You need a Bootable Windows USB to continue. So create one if you don't have it. Boot from it. Press SHIFT + F10 on the setup screen to open Command and enter the command line steps below displayed in code format.
diskpart
list disk - We need to show all disks and their numbers.
select disk # - Replace # with the target disk you want to use.
detail disk - Ensure you have the correct disk. You can verify by checking the name, size and type of disk it is. You should see your Windows partition listed. If you have the correct disk, continue.
create part EFI size=200 - This is EFI boot.
format fs=fat32 label="EFI" - Formats EFI.
assign letter=T - Assign EFI to T.
list volume - Note the letter of the Windows volume.
exit
bcdboot C:\Windows /s T: /f UEFI - The letter C should be replaced with letter you see in the volume list.
Now Windows has its own EFI partition. It's not ideal, but if you don't want to reinstall this works just fine.
No Comments