Dual booting win and ubuntu on different hard drives - tlam/Wiki GitHub Wiki

Dual Boot Win 10

  1. If Windows is still legacy mode, convert to UEFI if possible.
  2. 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.
  3. Click Troubleshoot>Advanced options>Command Prompt.
mbr2gpt.exe /validate
mbr2gpt.exe /convert
  1. 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
  1. In the bios, move the UEFI windows icon to first
  2. In Ubuntu, re-configure grub:
sudo os-prober
sudo update-grub

Dual Boot Win 7

  1. Install Windows 7 on /dev/sda

  2. Create the Windows system repair disk after inserting a blank disk:

     Click Start > All Programs > Maintenance > Create a System Repair Disc 
    
  3. Install Ubuntu on /dev/sdb with the recommended install. At this point, grub will be installed on /dev/sdb and windows might not boot anymore.

  4. Use Boot Repair to move grub from /dev/sdb to /dev/sda.

    1. Boot Repair might not work, you will have to create an unformatted partition.
    2. Boot Ubuntu from the USB, start Parted to create the partition
    3. The partition is > 1MB, unformatted with a bios_grub flag.
    4. Reduce the largest partition by 10MB and apply the change.
    5. Apply the above settings to the new partition
  5. Move grub from /dev/sdb to /dev/sda.

  6. Grub will work at this point but only Ubuntu will be available from the menu.

  7. Attempt to fix the Win7 boot with the system repair disk.

    1. 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.
      
    2. The above might happen if you are using two different hard drives for your OS.

    3. 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.

  8. System repair disk should load now and try to repair your PC at the command line.

  9. 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 /rebuildbcd
    

    The index still starts at 0 on Windows. You can view the disk and partition list by typing disk list and partition list after selecting a disk.

  10. 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
    
  11. If Windows is still not there, go back to the Windows recovery disk and this time, click on Startup Repair in the System Recovery Options as explained here.

  12. Go back to Ubuntu and run:

     sudo os-prober
     sudo update-grub
    

    Windows should hopefully be in your grub list.