Windows 10: Windows 10 won't boot after installing Ubuntu to a different drive

Discus and support Windows 10 won't boot after installing Ubuntu to a different drive in Windows 10 Installation and Upgrade to solve the problem; So, here is my problem: I tried to install Ubuntu 16.04.3 LTS to an old HDD I have (let's call it HDB) while maintaining my main OS (Windows 10) on my... Discussion in 'Windows 10 Installation and Upgrade' started by m4q, Jan 31, 2018.

  1. M4Q
    m4q Win User

    Windows 10 won't boot after installing Ubuntu to a different drive


    So, here is my problem:
    I tried to install Ubuntu 16.04.3 LTS to an old HDD I have (let's call it HDB) while maintaining my main OS (Windows 10) on my main HDD (let's call it HDA). The problem is that after I installed Ubuntu to HDB my Windows 10 (which was on HDA) wouldn't boot.

    Full history to better contextualize:
    Before starting the Ubuntu installation process I got a message saying that there were some Windows partitions on HDB, which I found strange since I formatted the drive before (and could boot my Windows 10 just fine), but just to be sure I cancelled the installation, shutted the PC down and removed both SATA and power cables from HDA so it would be impossible for the installer to do any changes on that drive. Then I installed Ubuntu to HDB - still got the message saying there were some windows folders/partitions in it, but I was pretty sure it had nothing to do with my HDA installation - and later on it loaded just fine. So I unplugged HDB's (now with Ubuntu) SATA and power cables from my MOBO and plugged HDA (which should have my Windows 10 installation untouched) back in, but to my surprise Windows 10 wouldn't boot, it was (still is) giving me the "Reboot and Select proper Boot device or Insert Boot Media in selected Boot device and press a key" error.
    I looked for help on Ubuntu forums, we tested some things there and came to the conclusion that I somehow either managed to delete my EFI partition on HDA or it was on HDB the whole time and for some reason I was able to boot Windows 10 even with HDB disconnected and/or formatted (which I did before installing Ubuntu).
    So I think the question now is: Is it possible (if so, how) to recreate the EFI partition, which possibly never existed on HDA in the first place? I've seen some guides on how to do it, even some 3rd part apps that claim to do it, but I think my problem is quite different of what other people been having, and I don't want to mess it any further.
    I ran gpart on a live-usb Ubuntu to see what is the state of my HDDs and here it is:

    HDA (sda):

    Windows 10 won't boot after installing Ubuntu to a different drive [​IMG]

    Only shows a "msftres" partition (which is not the OS partition, I guess?) and a "basic data partition". Could Windows 10 installation be on the later?

    HDB (sdb):

    Windows 10 won't boot after installing Ubuntu to a different drive [​IMG]

    As expected, only has partitions related to Ubuntu (Linux) installation. If my Windows 10 EFI partition (and maybe others?) was there it was 100% overwritten it seems.

    Sorry for the lack of more technical info or if it looks confusing, I’m a just a noob when it comes to IT, I only know how to do some formatting, partitioning, OS installing and know a little of hardware, but that’s all, I have zero programming background. And sorry for any grammar mistake, English is not my first language. Thank you in advance.

    :)
     

  2. Edit partitions while installing Windows 10

    Thank you for your answer.

    In my previous experience, installing Windows after Ubuntu causes Ubuntu partition to be deleted. Won't this happen with Windows 10 too?

    And if yes, what will happen to GRUB after removing the Ubuntu partition? Will I still be able to boot into Windows 8.1?

    Thank you for your patience
     
    AndreaPivetta, Jan 31, 2018
    #2
  3. JavierDL Win User
    Download Tool Error: 0x80042401 - 0xA0019

    Thank you Andre, that's good to know.

    But to be sure that's what I need, maybe I should provide more info on the situation at hand:

    I will create a dual boot with Windows 10 & Ubuntu. I found this tutorial that
    advises to install Windows 10 first, then Ubuntu.

    This being said, would it work to install Windows 10 from a "Recovery Drive", after Ubuntu is installed?

    Thanks,

    JDL
     
    JavierDL, Jan 31, 2018
    #3
  4. AddRAM Win User

    Windows 10 won't boot after installing Ubuntu to a different drive

    Just sit tight, someone will be along to help you. *Smile

    Sounds like an easy fix.

    Did you even look at HDB when you got the message telling you there were windows files on it ?
     
    AddRAM, Jan 31, 2018
    #4
  5. M4Q
    m4q Win User
    No, I didn't. I thought that whatever Windows partition was there was from the old Windows installation I had in that drive a long time ago. I did "look" at it on "Computer" after formatting and it showed as empty (~160GB space), but EFI and other system partitions do not show there, from what I learned today, since they have no letter assigned to them, right?
     
  6. AddRAM Win User
    Yes there is 1 hidden partition

    It would look like this in windows and the 2nd shot is Partition Wizard showing the other 16 MB partition.
     
    AddRAM, Jan 31, 2018
    #6
  7. AddRAM Win User
    Did you or someone else install W7 on HDA, while HDB was hooked up ?

    I`m wondering how any windows files got on HDB.

    This is why windows needs to be installed with all and any other drives unplugged.

    If NavyLCR sees this thread he will help you out quick. *Smile
     
    AddRAM, Jan 31, 2018
    #7
  8. Windows 10 won't boot after installing Ubuntu to a different drive

    HI,
    Only other partition would be a Fat32 I believe it is about 16mb's it's the boot loader for win-10.
     
    ThrashZone, Jan 31, 2018
    #8
  9. AddRAM Win User
    The hidden partition is 16 MB you can see it in my snip of PW. It's labeled Other, not Fat32.

    I still don't see how it could get on another drive.

    Just another reason why I don`t do UEFI installs *Smile
     
    AddRAM, Jan 31, 2018
    #9
  10. Hi,
    Yeah maybe that is for bitlocker ?
     
    ThrashZone, Jan 31, 2018
    #10
  11. M4Q
    m4q Win User
    Maybe I installed Windows 10 on HBA while HDB was pluggued, could be the reason why boot files ended up there, but I can't be sure. The strange part is that after Windows 10 was intalled on HBA I am pretty sure that I removed HDB and could boot it with no problem at least once.

    So, I just formatted HDB again, converted to GPT and installed a fresh Windows 10 on it, just to be sure I removed the SATA and power cables from HDA again. Installation went perfectly fine, installed MiniTool Partition Wizard, shutted it down, plugged HDA cables back in, booted the new Windows 10 (on HDB), launched MiniTool Partition Wizard and HDA doesn't even show there! It's only getting worse hahaha!
    Windows 10 won't boot after installing Ubuntu to a different drive [​IMG]

    New Windows 10 installation on HDB seems to have every partition at least...
     
  12. M4Q
    m4q Win User
    Ok, I set BIOS config to default (I changed boot option to "UEFI only" to load the usb with Windows installer before installing it) and HDAis showing now. I don't know if that was really the problem, but it's showing now and that's one less thing to worry hah.
    So, I found some ways to restore the EFI partition, one of them is by using the "Partition Recovery" option in Partition Wizard, or creating it "manually" with DiskPart on Windows PE. The first option seems easier, but is it really safe? Link with the methods: How to Restore Deleted Windows Partition after Windows Can't Boot?
    Edit: print
    Windows 10 won't boot after installing Ubuntu to a different drive [​IMG]
     
  13. NavyLCDR New Member

    Windows 10 won't boot after installing Ubuntu to a different drive

    I use diskpart and bcdboot to shrink the OS partition by 100MB, create a FAT32 partition in the empty space, use BCDBOOT to write the boot files to it, then change the partition ID to EFI system partition. You should be able to do it while booted into the Windows that is on "HDB". The only issue will be that you won't have a standard partition layout on "HDA", the partitions will be out of order.
     
    NavyLCDR, Feb 1, 2018
    #13
  14. Beginning in Windows 10, Microsoft reserved partition (MSR) partition size is 16 MB.

    Add an MSR to each GPT drive to help with partition management. The MSR is a reserved partition that does not receive a partition ID. It cannot store user data.

    This partition is not use for booting Windows 10 the EFI System Reserved partition is use for booting Windows 10.

    The minimum size of EFI System Reserved partition is 100 MB, and must be formatted using the FAT32 file format.



    Please boot your computer with Windows 10 Installation Media and from Windows Recovery Environment start the Command Prompt.

    Please type below commands into Command Prompt and press Enter key.

    Following commands will repair Master Boot Record (MBR), Boot Sector and BCD Store.


    Code: Bootrec /FixMbr Bootrec /FixBoot Bootrec /RebuildBcd[/quote]
    Please post a screenshot of these three commands outputs.
     
    FreeBooter, Feb 1, 2018
    #14
  15. NavyLCDR New Member
    Please post a screenshot of these three commands outputs.[/quote] That won't work on the OP's first hard drive because they do not have an EFI System Partition existing on the drive to repair.
     
    NavyLCDR, Feb 1, 2018
    #15
Thema:

Windows 10 won't boot after installing Ubuntu to a different drive

Loading...
  1. Windows 10 won't boot after installing Ubuntu to a different drive - Similar Threads - won't boot installing

  2. Windows 10 won't boot after second drive install

    in Windows 10 Network and Sharing
    Windows 10 won't boot after second drive install: I have a 1tb m.2 with windows 10 and I was creating a sata ssd for my friend. I went through the normal process, the USB, setup, chose the correct disk and it worked perfectly fine, but now it recognizes my main drive as the second one and bios recognizes it as a bootable...
  3. Windows 10 won't boot after second drive install

    in Windows 10 Gaming
    Windows 10 won't boot after second drive install: I have a 1tb m.2 with windows 10 and I was creating a sata ssd for my friend. I went through the normal process, the USB, setup, chose the correct disk and it worked perfectly fine, but now it recognizes my main drive as the second one and bios recognizes it as a bootable...
  4. Windows 10 won't boot after second drive install

    in Windows 10 Software and Apps
    Windows 10 won't boot after second drive install: I have a 1tb m.2 with windows 10 and I was creating a sata ssd for my friend. I went through the normal process, the USB, setup, chose the correct disk and it worked perfectly fine, but now it recognizes my main drive as the second one and bios recognizes it as a bootable...
  5. Windows 10 won't boot anymore on Windows 10/Ubuntu dual boot.

    in Windows 10 BSOD Crashes and Debugging
    Windows 10 won't boot anymore on Windows 10/Ubuntu dual boot.: I pressed standby button on keyboard while in Windows 10 then left computer, when I came back hard drive light was solid and mouse, keyboard and monitor switches had no effect so I pressed the reset button now Windows 10 wont boot but Linux on same ssd but different partition...
  6. Cannot boot to windows after installing ubuntu on another drive

    in Windows 10 Installation and Upgrade
    Cannot boot to windows after installing ubuntu on another drive: Hello! So I I just got a new SSD and everything is installed but then I installed ubuntu on my previous main drive and now there's no options or way to get into windows 10. I have an MSI motherboard and it's boot options are not great IMHO. - I Already had this working but...
  7. my windows 10 is not booting after installing ubuntu alongside

    in Windows 10 Installation and Upgrade
    my windows 10 is not booting after installing ubuntu alongside: hellofew days ago I tried to install ubuntu in my legacy bios laptop. but I failed to install. then I saw a youtube video and had installed successfully ubuntu only after deleting EFI folder from LiveUsb. But after completing the installation of ubuntu, my windows 10 is not...
  8. Windows 10 won't boot after install

    in Windows 10 Installation and Upgrade
    Windows 10 won't boot after install: Bought a MSI u180 netbook second hand with windows 7 just to run some car diagnostics. The graphics drivers weren't set up so thought I'd upgrade to Windows 10. Went through the windows assistant and it was happy so installed it. Started up and all looked ok but didn't...
  9. Installed ubuntu then deleted ubuntu. Now won't boot

    in Windows 10 Ask Insider
    Installed ubuntu then deleted ubuntu. Now won't boot: I realize I'll get a lot of comments about m my IQ. I installed ubuntu through the store on my hp eebook. I could not get it to work because it was the wrong version for what i was trying to load. Go into windows and delete folder of ubuntu. Bad idea. Now can't load anything....
  10. Unable to boot Windows after installing Ubuntu as dual boot

    in Windows 10 Customization
    Unable to boot Windows after installing Ubuntu as dual boot: Initially my windows was running perfectly. Then i tried to dual boot it with ubuntu. After doing dual boot I'm not able to access windows. I'm getting a screen like this.[IMG]I also tried using grub command but it didn't work!! ***Original title: Dual boot***...