View Full Version : [SOLVED] Windows 10 and Ubuntu won't boot properly

February 22nd, 2017, 10:37 PM
Hello community,

I installed Ubuntu onto my laptop, but when I tried to boot windows 10 I was unable to do so. Then I tried to fix things myself by using testdisk, but I then accidentally made Ubuntu boot with regards to the same partition that my windows was booting from. I now do not have access to both and I've had to use a USB for temporary access to Ubuntu. I then used the boot repair program and got the link after the analyses was over. I'm not sure if the paste2 link that I received from boor-repair has too much information to share online, so if someone can also help me with being selective of what information is fine to post. May I please receive assistance in correcting the errors made. My priority would be to boot windows 10 and if possible I would like to have dual capability with Ubuntu. I am a beginner so I am not too knowledgeable with the correct terminology, but i am trying. Thank you in advance for your time and assistance.


February 22nd, 2017, 10:39 PM
Also, if avoidable, I do not want to buy a windows recovery disk, but if it can not be helped please let me know.

February 22nd, 2017, 11:33 PM
Please post the link to the boot-repair report. That will give us the information we need to help you.

February 23rd, 2017, 01:25 AM

February 23rd, 2017, 04:51 AM
Disklabel type: dos from your paste2 link. Your MS Windows and Linux was installed on a GPT disk, now it is DOS (MBR). Read on how to convert from MBR to GPT http://www.rodsbooks.com/gdisk/mbr2gpt.html (http://www.rodsbooks.com/gdisk/mbr2gpt.html)

You will very likely have problems booting into win10 due to the GPT partition Unique partition GUID will be changed after conversion.

February 23rd, 2017, 05:10 AM
That "unused" GPT partition table looks like it should be the one in use, the dos partition table does not even have any linux partition. I'm not familiar with disk repair tools, but it looks like you need to replace the in-use dos partition table with the gpt one. Until then, do not write anything to the hard disk. At least you have the sectors in the paste link to manually redo the partitions if necessary, but lets see if anyone else with more experience in disk repairs chips in -- maybe change title or start a new thread which has "disk repair needed" in title.

February 23rd, 2017, 12:09 PM
Would I make these changes using testdisk or something else? Are there any step by step instructions on what you do and what application to use?.

February 23rd, 2017, 02:12 PM
My first thought would be do you have a backup for windows partition?

I don't know how things were installed but I'm guessing you should try fixing Windows first before any more damage is done to your system. If you have a recovery Windows partition I would try using that and see if you are able to access Windows then, work on getting Ubuntu up and running seeing Ubuntu should be a lot easier to fix.

February 23rd, 2017, 02:25 PM
Sorry I'm very inexperienced so I honestly don't know. How would I be able to tell?

February 23rd, 2017, 02:49 PM
It looks like you used testdisk and converted gpt install of Windows to a MBR(msdos) partitioned drive.
But Windows installed in UEFI mode on gpt drive will only boot from gpt partitioned drive.
And Windows installed to MBR drive will only boot in BIOS mode.
If you want to keep MBR, you have to purchase a new legal copy of Windows and install that.
Your Windows product license is actually in the UEFI, and only valid for the Lenovo OEM version originally installed.
This is why we always suggest full backups of Windows (and Ubuntu) before any major system change.

You first need to convert drive back to gpt. Use gdisk as posted above.
Use gdisk and verify partitions are correct with p, or v to review issues, and use w to write the partition table. If not correct just use q to quit. That should update primary, backup & protective MBR. Details:

Not sure if testdisk combined any partitions as Windows has to have the system reserved, which is just unformatted space and before first NTFS partition.
Windows normally has this, but often there is a vendor recovery at end of drive also.

Product key now in UEFI/BIOS

February 23rd, 2017, 04:46 PM
I used the terminal and typed "sudo gdisk /dev/sda" and in the partition table scan it says GPT: damaged. Then a line under it says which do I want to use. Should I go with GPT even though it says damaged? I'm really worried and don't want to mess things up.

February 23rd, 2017, 05:03 PM
Also, if avoidable, I do not want to buy a windows recovery disk, but if it can not be helped please let me know.

If your pc was shipped with Windows 10 installed then you can make a new installation media following the instruction at:

You can use this to do a fresh install without having to have a product key since your Windows 10 is already associated with your motherboard. You can even use the installation media as a recovery disk. Boot up you pc from the installation media and at the bottom left of the installation page choose "repair".

February 23rd, 2017, 05:14 PM
What specifically does gdisk error say.
Can you copy & paste?
And the results of p command?

One advantage of gpt is that is has both a primary & backup.
It may just say primary damaged (by conversion with testdisk to MBR) and backup is ok, using backup.
A write then corrects backup MBR, primary & backup partition tables.

When using testdisk one of the first choices is whether drive is MBR or efi/gpt. You need to know which you are trying to repair and then testdisk works well, but using it to convert type is not usually the best use of testdisk.

February 23rd, 2017, 05:16 PM
Hey you all, I'm up and running now due to the method I mentioned and just going along with it. Windows booted and I'm back on. Thank you all so much!!

February 23rd, 2017, 05:48 PM
World you mind sharing your solution with the forum

How were you able to get Windows to boot? it will help others If they run in to something like this

February 26th, 2017, 09:31 PM
To solve the issue i typed sudo gdisk /dev/sda into the terminal and it gave me the option to boot from GPT or MBR. I chose GPT and rebooted. It worked after that.