Score:0

How to install Ubuntu on a PC with two Hard Drives without losing data in one HDD?

cn flag

I have a laptop with two drives.

  1. 256GB SSD
  2. 2TB HDD All my data is in the 2TB HDD. Windows 10 is installed in the SSD. I don't want to keep windows in the SSD and want to install Ubuntu there without losing data on my HDD? How can I do this?
Score:2
ar flag

1. Backup

Backup all your data in an external drive. Mistakes happen. There is no substitute for backups.

2. Create a Windows recovery USB.

For one reason or the other you may want to reinstall Windows. A recovery USB/DVD will make it easier. The recovery USB drive may also come handy if your NTFS formatted HDD becomes corrupted and needs to be fixed.

NTFS is Windows native file system. If it breaks it is best to fix it using Windows native tools. Since you are planning to delete Windows from your system, keeping a recovery USB may be useful.

Also see Fix corrupt NTFS partition without Windows

3. Completely Shutdown Windows

This step is very important, as you are planning to delete the Windows installation and replace it with Ubuntu. Windows uses Fast Startup by default. This does not fully shutdown Windows when you shut it down and keeps the SSD/HDDs in a "dirty" state.

If you do not disable Fast Startup from within Windows, and delete Windows, you may have problem writing to your NTFS partition in the HDD. See Unable to mount Windows (NTFS) filesystem due to hibernation for details.

See Unable to create new folder. (ctrl+shift+N) is not working in my HDD partitions folder for how to turn off Fast Startup in Windows.

Or you can Google how to disable fast startup in Windows 10.

Remove 2nd HDD (Optional)

I consider this an optional step. However, other members have suggested this step in the comments. So, I am including these steps. These steps ensure you will not be installing Ubuntu on the HDD by mistake and nothing will be deleted by mistake. There are two ways of doing it.

From UEFI

Some UEFI systems allow you to disable, turn off or otherwise remove the second HDD from system in the drive settings. If you can do this, when the computer boots, it will only recognize the primary SSD and the HDD will not be recognized.

Physical Removal

If the UEFI of your laptop does not allow disabling the HDD, You may want to open the laptop up and and physically remove the secondary HDD.

Post Installation

Then after install you can turn the HDD back on in the UEFI or physically put it back in the laptop. And then add entries to /etc/fstab to mount the partitions in the HDD.

4. Try Ubuntu

Before you install Ubuntu it is always a good idea to try it first. The installation USB you will create (or created already) has an option to Try Ubuntu. This option will run Ubuntu from the USB drive without making any changes to your SSD or HDD. This will allow you to verify that all the hardware and peripherals of your computer works with Ubuntu.

See Should I select 'Install Ubuntu' or 'Try Ubuntu before installing' when using a live USB? for some details.

Once you are satisfied, continue to Install Ubuntu.

5. Install Choices

I suggest you use the Erase Disk and Install Ubuntu option to erase the SSD with Windows 10. This will delete everything in this drive. If you have any data or files of music or pictures back them up and copy them in the HDD.

enter image description here

The Ubuntu installation process shows you a dialog regarding which drive and partition(s) will be modified when you press the Install Now button:

enter image description here

Make sure the the drive you have selected is the SSD and not the HDD before you click Continue.

Your SSD may be called nvme0n1, sda, or sdb. Your HDD may be called sdborsda`.

Hope this helps

cc flag
Windows might be necessary if filesystem repairs are ever necessary on the HDD, which is probably formatted with ntfs.
Joepie Es avatar
eg flag
I would make a Windows usb-stick first before deleting it, in case you ever need it to repair your filesystem, because this can only be done in Windows. And indeed try Ubuntu first before installing to make sure all your hardware works.
ar flag
@JoepieEs Thanks for this comment. I have added a bit about this option in my answer. Feel free to edit and add more if you think necessary.
Matthew avatar
ru flag
It may be worth removing the HDD while OP installs Ubuntu, even though this can be tricky on a laptop. I did this on an old laptop that was out of warranty - I cared much more about my data than the laptop.
oldfred avatar
cn flag
Some UEFI systems allow you to disable, turn off or otherwise remove another drive from system in the drive settings. Then after install you can turn it back on. And then add entries to fstab to mount partitions. If converted to ext4 also give yourself ownership & permissions. Bit more advanced to use HDD for folders normally in /home, but keep /home inside / (root). Shows fstab & ownership & permissions commands: https://askubuntu.com/questions/1013677/storing-data-on-second-hdd-mounting/1013700#1013700
ar flag
@oldfred I have added your comments in my answer.
ar flag
@Matthew I have added your comments in my answer.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.