I have Ubuntu installed on my 256gb SSD and I have a 2tb HDD. I would like to install Windows 10 on the HDD as a secondary operating system for some games that I miss. I am concerned about potentially breaking my current Ubuntu installation or the boot loader (GRUB).
Is it possible to install Windows 10 on the HDD without disrupting the current setup?
I have not been able to find any information on this through my own searches, so if anyone can provide a link to an article or offer guidance in the comments, I would greatly appreciate it.
Thank you in advance!
3 Answers
Introduction
If you are a gamer who switched to Ubuntu from Windows, you might miss some of the games that are not supported on Linux. Installing Windows 10 on a separate hard drive is a great solution to this problem. It will allow you to have both operating systems on your computer and switch between them as needed. However, you might be concerned about the potential risks of breaking your current Ubuntu installation or the boot loader (GRUB). In this post, we will guide you through the process of installing Windows 10 on a separate hard drive without disrupting your current setup.
Preparation
Before you start the installation process, there are a few things that you need to do to prepare your computer. First, you need to back up all your important data. This is important because the installation process might delete your data. You can use an external hard drive or cloud storage to back up your data.
Second, you need to create a bootable USB drive with the Windows 10 installation files. You can download the Windows 10 ISO file from the Microsoft website and use a tool like Rufus to create a bootable USB drive.
Finally, you need to disconnect all other hard drives from your computer except for the one on which you want to install Windows 10. This is important because the installation process might modify the boot loader (GRUB) on other hard drives and cause problems.
Installation
Once you have prepared your computer, you can start the installation process. Insert the bootable USB drive into your computer and restart it. Press the key to enter the boot menu (usually F2 or F12) and select the USB drive as the boot device.
The Windows 10 installation wizard will start. Follow the instructions on the screen to select your language, time zone, and keyboard layout. When you get to the screen that asks you where you want to install Windows, select the hard drive on which you want to install Windows. Make sure you select the correct hard drive, as selecting the wrong one might delete your data.
The installation process might take some time, depending on the speed of your computer and the size of the hard drive. Once the installation is complete, your computer will restart automatically.
Recovering GRUB
After the installation is complete, you might notice that you can only boot into Windows and not Ubuntu. This is because the Windows installation process modified the boot loader (GRUB) on your Ubuntu installation. To recover GRUB, you need to boot into Ubuntu using a live USB drive.
Insert the live USB drive into your computer and restart it. Press the key to enter the boot menu (usually F2 or F12) and select the USB drive as the boot device. Once you have booted into Ubuntu, open the terminal and enter the following commands:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair
This will install the boot-repair tool and launch it. Click on the “Recommended repair” button and follow the instructions on the screen. The tool will automatically detect your Ubuntu installation and recover GRUB.
Final Steps
Once you have recovered GRUB, you can restart your computer and select Ubuntu or Windows from the boot menu. You can also reconnect the hard drives that you disconnected earlier. Your computer will now have both Ubuntu and Windows 10 installed on separate hard drives.
However, there are a few final steps that you need to take to ensure that both operating systems work smoothly. First, you need to install the necessary drivers for your hardware on both operating systems. This will ensure that your hardware works properly on both operating systems.
Second, you need to set up file sharing between the two operating systems. This will allow you to access files on both operating systems from one operating system. You can use a tool like Samba to set up file sharing on Ubuntu and Windows.
Conclusion
Installing Windows 10 on a separate hard drive is a great way to have both Ubuntu and Windows on your computer. However, it is important to prepare your computer before the installation and recover GRUB after the installation to ensure that both operating systems work smoothly. With the right preparation and steps, you can enjoy the best of both worlds – the stability and security of Ubuntu and the gaming options of Windows.
Yes, it is possible to install Windows 10 on a separate hard drive without disrupting your current Ubuntu installation.
Here is a general outline of the steps you can follow to achieve this:
- Boot from the Windows installation media (USB or DVD).
- During the installation process, select the hard drive where you want to install Windows (the 2TB HDD).
- Make sure to select “Custom installation” and not “Upgrade.”
- Follow the prompts to complete the installation.
After the installation is complete, you should see a boot menu at startup that allows you to choose which operating system you want to boot into. The boot menu is usually managed by a boot loader, such as GRUB (the default boot loader for Ubuntu). If the Windows installation process overwrote the boot loader, you will need to repair it in order to regain the ability to boot into Ubuntu. There are a number of tools available that can help you repair the boot loader, such as Boot Repair.
It’s always a good idea to have a backup of your important files before making any changes to your system, just in case something goes wrong.
It is generally recommended to temporarily disconnect all disks except the one on which you plan to install Windows 10 when installing the operating system on a system with multiple disks. This is because modern versions of Windows will use multiple partitions and, although the installer prompts you to choose a disk/partition for the C: drive, it may not use the same disk for other partitions (and it will not specifically ask about those other partitions). Disconnecting the other disks removes this unpredictability. After the installation is complete, you should check and adjust the boot order in the UEFI/BIOS settings as needed.
If you are using the UEFI boot scheme, the Windows installer will register a new bootloader setting in the system NVRAM, typically named “Windows Boot Manager,” and place it as the first in the boot order. If your system firmware automatically deletes any boot entries that refer to non-existent disks, disconnecting your Ubuntu system disks will cause the bootloader registration for Ubuntu to be removed from the system NVRAM.
Before installing a second operating system in a dual-boot system that is currently booting Linux in UEFI mode, you should familiarize yourself with the efibootmgr
command, record the current UEFI bootloader entry used by Linux (run efibootmgr -v
and save the output), and make sure you have a live Linux media or a Linux installation media that you can use to boot the system in rescue mode in UEFI mode. This way, if your system firmware removes the Ubuntu bootloader registration when the Linux system disk is disconnected for the Windows installation, you can easily restore it by booting from an external media and using efibootmgr
to restore the boot registration. The required command would be similar to this:
efibootmgr -c -d /dev/sda -L "Ubuntu Linux" -l \\EFI\\Ubuntu\\grubx64.efi
(Note that the bootloader registration in NVRAM is based on GPT partition UUIDs, so it will not be a problem if your Linux system disk is not detected using the same device name when booting from an external media. You can simply tell efibootmgr
what the device containing your UEFI bootloader is currently known as, and it will do the job correctly.)
In the best case scenario, the firmware will not automatically delete the boot entry, and the only thing you will need to do after installing Windows and reconnecting the other disk is to visit the firmware settings (“BIOS settings”) and move the “Ubuntu” boot entry back to the first priority slot.
After installing Windows and reconnecting the other disks, you can run sudo update-grub
in Linux to allow Ubuntu to detect the presence of Windows and add it as a menu item in GRUB.