How to: Upgrade a dual boot installation of Windows and Linux to Windows 10 - Part 1

Technical Level : Intermediate

Summary
The market for client operating systems over the past 10 years has become richer and diverse. Many individuals who are entering the field of IT are broadening their skill set to encompass not just Microsoft technologies, but also open source solutions. The Linux operating system in particular has been a major driving force behind this change in the industry. Many persons are now more than ever experimenting and learning the alternative desktop and server operating system available in hundreds of flavors called distributions. Persons interest in Windows have not waned, its just that there is now more choice. In this article, we take a look at one of the common scenarios many persons upgrading to Windows 10 will face; dual boot configurations with Linux. The good news is, Windows 10 is quite receptive to such configurations.
Details

This article does not go into the complexities of such configurations but looks at the scenarios involving upgrading such a configuration. In my case, I had a Windows 7 and Ubuntu Linux specifically (12.10) dual boot configuration setup. Because of the hundreds of distributions that exist, this article will not be the final word on how to upgrade such a configuration.

As noted, I have a dual boot configuration between Ubuntu Linux and Windows 7. Above you will see a text based boot menu called GRUB which is used to managed both operating systems. You can use it to choose the operating system you want to load when you start your computer. 

Windows 7 and Ubuntu Linux version 12 desktops

Above, you see a standard desktop for both operating systems, I have a single file on each. I should let you know, this is the best way to upgrade to Windows 10 when Windows is installed first. So if you have a desire to run Linux in the future, install it now.

Starting setup

Installation must be started from within the running version of Windows. When the initial phase of setup is  complete, your computer will restart.

Because GRUB is the default boot manager, setup will not boot into Windows 10 installation unless you manually choose to do that. To do so, select the Windows 7 or Windows 8 (loader) and hit the Enter key.

Setup will go through its installation phases, each time your computer restarts, you must select the 'Windows loader' in order for setup to continue and complete. So ensure you are observing the installation as it goes along.

After setup is completed, you will be booted directly into the Windows 10 Out of Box Experience.

Windows 10 and Ubuntu should be running together in perfect harmony.

The GRUB menu will still display Windows 10 as Windows 7. You can edit this by downloading the free GRUB Customizer utility for Ubuntu Linux:

http://askubuntu.com/questions/295666/how-can-i-run-grub-customizer-on-ubuntu-1204

One of the good things I learned from this experience is knowing that upgrading an existing version of Windows to Windows 10 under such a configuration will not affect your Linux installation.

Resources

What are the editions of Windows 10 available?

Frequently Asked Questions: Windows 10

What are the editions of Windows 10 available?

How to: Do a custom installation of Windows

How to: Do a clean install of Windows 10

How to: upgrade from previous versions of Windows using Windows 10 ISO file

 

Forum Article Info


Last updated April 21, 2019 Views 32,848 Applies to:

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

I found these articles very  helpful  thnk you

Thank you for your reassurance and for your experience with the win 10 upgrade and GRUB.  I was worried 10 might want to take over the hdd and that would have ended it for windows.  Glad that is not the case.
Thanks so much!
Does it matter If I have legacy boot with dual os or does it only work with UEFI ? 

I have had almost identical configuration as shown in this article. However, the upgrade to Windows 10 did not go so smoothly. Let me write about some of problems to help other people who might encounter the same issues.

My computer came with Windows 8 pre-installed so I shrunk the Windows partition to make room for Ubuntu. That it how it works for the last year.

After the second reboot in Windows 10 upgrade the computer did not boot any more. The grub only displayed a grub rescue command prompt. I found out later that the problem occurred because windows somehow changed the partition scheme. The boot partition was no longer where grub expected it. I don't know how and why this happened.

First what you can do is to see the partitions in grub rescue with "ls". Mine were (hd0,gpt1), (hd0,gpt2), etc. Try to find out which partition is your boot partition. I tried the following commands until i found the right partition:

ls (hd0,gpt1)/

ls (hd0,gpt1)/boot

ls (hd0,gpt2)/

etc.

Then type "set" in grub rescue prompt. It will display where the grub looks for its files. In my case (hd0,gpt6) has moved to (hd0,gpt7). The set command displayed:

prefix=(hd0,gpt6)/boot/grub

root=hd0,gpt6

Change the prefix and root settings to point to the right partition. In my case commands were:

set prefix=(hd0,gpt7)/boot/grub

set root=(hd0,gpt7)

Then switch from rescue to normal mode:

insmod normal

normal

You should get the normal grub menu. From now on you can boot Windows and finish your Windows upgrade. The problem is that you have to tell grub rescue about the right partitions on every reboot. That is how I did it. I left the problem of grub for later because I was not sure whether Windows will do some more changes to the partitions or boot.

When Windows finished I started to solve grub problems. Press "e" to edit boot options for Ubuntu. I changed all (hd0,gpt6) to (hd0,gpt7) and Ubuntu booted. However, I use encrypted partition and cryptswap. At the boot Ubuntu asked me for the passphrase. Fortunately I saved it at the installation of Ubuntu and entered it at the boot. Ubuntu booted without problems. I corrected the /boot/grub/grub.cfg where I replaced (hd0,gpt6) with (hd0,gpt7) and performed "sudo grub-install".

Now it was only the encryption. Since the root Ubuntu partition was raised for one (7 from 6), the swap partition suffered a similar change. I had to change the /etc/crypttab file to point to /dev/sda8 instead of /dev/sda7.

I am using only two partitions for Ubuntu (root and swap). If other operating systems coexisting with windows use more partitions there might be more changes required. Especially if partitions are mounted according to their numbers and not by their UUIDs. Take a look at your /etc/fstab. If the partitions are identified by UUID there should be no problems. But if there are /dev/... lines the number should be corrected if they were changed.

I had both Ubuntu and Windows 7 installed in my system & when i was updating to Windows 10, it got stuck up during reboot after 29% installation with the following error message:

error: no such partition.
Entering rescue mode….
grub rescue> _

Pls help..!!

It certainly looks like the issue I had. Follow the instructions described. First you need to establish from where grub is trying to boot and where the actual boot partitions are. Type "set" so see how grub is set and then type "ls" commands to find out where the boot partitions are. Then you can change the settings with set commands. After you set them you can type "insmod normal" and "normal" to boot the system.

When the computer resterts after the initial phase of setup, and i choose "windows 8 (loader)" in grub menu, then the windows logo appears and the PC freezes then and there.

I even left it in that state the whole night (about 8 hours) but it was still frozen on that screen, and then I had to hard reboot it by long pressing the power button, and when i chose "windows 8 (loader)" again from GRUB, this time, windows 8 loaded up with windows 10 setup being the first thing and showing an error:

0xC1900101 - 0x20017 The installation failed in the SAFE_OS phase with an error during BOOT operation.

Any solutions?

I am a novice in this and i need your help to fix my computer.!

I have tried your set of commands and below are the results:

grub rescue> ls

(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)

grub rescue> set

cmdpath=(hd0)

prefix=(hd0,msdos6)/boot/grub

root=hd0,msdos6

I am not able to determine which is my boot partition.

Try

ls (hd0,msdos5)/

ls (hd0,msdos5)/boot/grub/

ls (hd0,msdos3)/

ls (hd0,msdos3)/boot/grub/

ls (hd0,msdos2)/

ls (hd0,msdos2)/boot/grub/

ls (hd0,msdos1)/

ls (hd0,msdos1)/boot/grub/

As you can see you have tried "ls" and got (msdo5, msdos3, msdos2 msdos1). I think one of them should be your boot partition. I don't know what happened to your msdos6 which is set in the grub as your boot partition.

You can also try to boot from all of the partitions until you find the one that boots. You can try:

set prefix=(hd0,msdos5)/boot/grub/

set root=(hd0,msdos5)

insmod normal

normal

If this doesn't work try for other partitions. Just replace msdos5 with msdos3, msdos2 or msdos1 in the above commands.

I hope you succeed.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.