Dual booting win and ubuntu on different hard drives - tlam/Wiki GitHub Wiki
Dual Boot Win 11
Ubuntu will boot first from the bios.
- In the bios, ensure that
Fast Bootis disabled
If the above still give hd0,gpt3 not found for Windows boot, try:
-
Boot the computer with the Windows UEFI USB stick
-
Select
Repair your computer>Troubleshoot>Advanced options>Command Prompt -
Find your windows disk, the EFI partition and assign it a letter that is not used. The following assumes windows is on disk 0 and the EFI partition is on 2.
diskpart list disk select disk 0 list volume select volume 2 assign letter=g -
Go back to the command prompt and run
cd /d g:\EFI\Microsoft\Boot bootrec /fixboot bcdboot C:\windows /s g: -
Remove the Windows USB and reboot
Dual Boot Win 10
- If Windows is still legacy mode, convert to UEFI if possible.
- Boot to the Recovery environment. On the Lock screen, press and hold the Shift key while choosing Restart from the Power menu. Continue pressing the shift key until you see the Windows Recovery environment, asking you to select an option.
- Click Troubleshoot>Advanced options>Command Prompt.
mbr2gpt.exe /validate
mbr2gpt.exe /convert
- If the above returns
Failed to retrieve geometry, find the disk id in disk management and run:
mbr2gpt.exe /disk:0 /validate
type x:\setupact.log | more
- In the bios, move the UEFI windows icon to first
- In Ubuntu, re-configure grub:
sudo os-prober
sudo update-grub
Dual Boot Win 7
-
Install Windows 7 on
/dev/sda -
Create the Windows system repair disk after inserting a blank disk:
Click Start > All Programs > Maintenance > Create a System Repair Disc -
Install Ubuntu on
/dev/sdbwith the recommended install. At this point, grub will be installed on/dev/sdband windows might not boot anymore. -
Use Boot Repair to move grub from
/dev/sdbto/dev/sda.- Boot Repair might not work, you will have to create an unformatted partition.
- Boot Ubuntu from the USB, start Parted to create the partition
- The partition is > 1MB, unformatted with a
bios_grubflag. - Reduce the largest partition by 10MB and apply the change.
- Apply the above settings to the new partition
-
Move grub from
/dev/sdbto/dev/sda. -
Grub will work at this point but only Ubuntu will be available from the menu.
-
Attempt to fix the Win7 boot with the system repair disk.
-
You might get error message:
This version of System Recovery Options is not compatible with the version of windows you are trying to repair. Try using a recovery disc that is compatible with this version of windows. -
The above might happen if you are using two different hard drives for your OS.
-
Go to the bios > Advanced Mode > Boot tab. Scroll down to
Hard Drive BBS Priorities. Make sure that the hard drive containing Windows starts is first. Save your changes.
-
-
System repair disk should load now and try to repair your PC at the command line.
-
Follow the instructions as explained here:
C:\> diskpart DISKPART> select disk 0 DISKPART> select partition 0 DISKPART> active DISKPART> extend filesystem DISKPART> exit C:\> bootrec /rebuildbcdThe index still starts at 0 on Windows. You can view the disk and partition list by typing
disk listandpartition listafter selecting a disk. -
Reboot and go to Ubuntu on your 2nd hard drive. Try the following to see if Windows can be picked up by grub:
sudo os-prober sudo update-grub -
If Windows is still not there, go back to the Windows recovery disk and this time, click on
Startup Repairin theSystem Recovery Optionsas explained here. -
Go back to Ubuntu and run:
sudo os-prober sudo update-grubWindows should hopefully be in your grub list.