Introduction
If your boot drive is running out of space, using your PC can quickly become frustrating and limiting. You might struggle to save files, or even open programs or access the internet if there’s no space left. When this happens, you have a few options to free up more space. The simplest solution is to add another hard drive or solid-state drive. However, this might not be feasible for everyone, especially if you’re dealing with a laptop that lacks expansion slots, or if you specifically need to use the C: drive for optimal performance.
This guide will walk you through the straightforward process of replacing your boot drive, for Windows, Linux and Mac computers.
For Windows and Linux
Before we begin, you’ll need to have the following items ready:
- Linux Mint Live USB: A USB stick with a live copy of Linux Mint. To create this, download the Linux Mint ISO (Cinnamon edition) and use a tool like Rufus if you are on Windows, or the built-in USB creator (for Linux) to write the ISO to the USB stick.
- Drive Enclosure: You might need a drive enclosure for your existing drive if you don’t have a way to connect both the new and old drives to the same computer.
Step 1: Finding and fitting a new drive
First, you’ll need to choose the right replacement drive. This could be an M.2, 2.5", or 3.5" form factor. Once you’ve selected your new drive, shut down your computer and unplug it from the power source. Remove the current boot drive from its slot and replace it with the new drive. If you’re upgrading the form factor (e.g., from SATA to M.2), simply install the new drive in the appropriate slot.
Next, keep your existing boot drive connected to the PC. You can do this in several ways:
- Plug the current boot drive into a new slot
- Leave the current boot drive in its existing slot if you’ve upgraded to a different form factor.
- Use an external drive enclosure to connect the old drive via a spare USB port.
Step 2: Booting into Linux
With the new drive installed as the main drive and the old boot drive connected as a secondary drive, either internally or through an enclosure, it’s time to boot into Linux from the USB stick. Plug in the USB stick and power up your computer. Depending on your system, you may need to access the boot menu to select the USB stick:
- Laptops: Press F12 as the laptop starts to open the boot menu before the Windows loading screen appears.
- Desktops: Booting options can vary. If you have a pre-built or proprietary desktop (like an HP or Dell), try pressing F12 at startup. Alternatively, you can enter the BIOS by pressing F10, F2, or Del, depending on your model. Once in the BIOS, select the USB device as the boot option and save your settings.
Step 3: Cloning the Disk
After booting into the Linux Mint live environment, open Gparted by searching for it in the start menu. Gparted will display all connected drives and their respective names in Linux. Identify your old and new drives by their sizes (by clicking the top right drop down) and note their paths and names, such as /dev/sda1, /dev/sda2, or /dev/nvme1n0.
Next, open the terminal and prepare to clone your disk. Double-check the drive paths to ensure accuracy because cloning in the wrong direction could erase all your data. To clone the entire disk from the source drive (/dev/sdX) to the target drive (/dev/sdY), use the following command, replacing sdX and sdY with the correct paths:
dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync
Step 4: Wait
After running the command, the terminal will appear to do nothing, but the cloning process is working in the background. Be patient, as this can take a while, especially for larger drives. You’ll know the process is complete when the terminal displays a new line or confirmation message.
Step 5: Booting from Your New Drive
Once the cloning process is complete, shut down your computer and remove the USB stick. Restart your computer, and it should now boot from the new, larger drive with all your data intact. To confirm that you’ve booted from the new drive:
- On Windows: Open the Start Menu and search for Disk Management. The disk you’ve booted from should be the larger one labelled C:.
- On Linux: Open Gparted and verify that the drive you’ve booted from is the new one at the top of the list.
(If you changed BIOS settings to boot to the USB, you could change them back now)
Step 6: Expanding Your Partition
Since the new drive is a clone of the old one, if it is a larger disk, it will have a lot of unallocated space that the system doesn’t yet recognize. You’ll need to expand the partition to access this new space.
- On Windows: If the C: partition is adjacent to the unallocated space, you can expand it using Disk Management. Right-click on the C: partition, select “Extend,” and follow the prompts. If the partitions aren’t adjacent, you may need a third-party tool like Partition MiniTool to move and expand the partition.
- On Linux: Use Gparted to move or extend partitions as needed.
After expanding the partition, restart your computer to ensure everything is functioning correctly.
Step 7: Erasing Your Old Drive
Now that you’re using the new drive, you can erase your old drive if you choose or keep it as a backup.
To erase your old drive, just do the following:
On Windows
Open up Command Prompt or Powershell. Then type in:
Diskpart
This will open a disk partition program. Type in list disk
and see what disk is the old one (identified by size usually) and what number it is assigned to. Then type sel disk X
where X is the number of your old disk. Then type clean
and it will erase the whole disks partition table leaving a completely empty drive.
Once that is done, close all the programs and open up Disk Management again. You should be prompted to initialise the old disk, click yes. Then you can find it and format it how you like.
On Linux
Whilst still in GParted, if you are sure you are booted to the new drive, simply locate and erase your old drive.
For Mac OSX
Before we begin, you’ll need to have the following items ready:
- OSX Installer USB - Create a USB installer using your Mac with the old drive still installed. Follow the instructions provided by Apple.
- Drive Enclosure - You may need a drive enclosure for your existing drive if you do not have a way to plug both the replacement drive and current drive in the same computer.
Step 1: Installing the New Drive
Install the new drive and remove the old one if necessary. If your system doesn’t allow you to fit both drives simultaneously, use an external enclosure for the old drive.
Step 2: Booting into the Mac OSX Installer
Hold down the left Alt key during the startup chime to access the boot menu, then select the USB drive to boot from.
Step 3: Installing a Fresh Copy of OSX
Open Disk Utility, format the new drive as APFS or HFS (depending on your OSX version), and then install a fresh copy of OSX on the new drive.
Step 4: Booting into the New OSX
After installation, boot into your new OSX environment. Although you can attempt to transfer data before this step, it’s sometimes more reliable to do so afterward.
Step 5: Migrating Data
With your old drive connected (internally or via an external enclosure), use Migration Assistant (found through Spotlight search) to transfer your data. Once you’re confident that everything has transferred successfully, you can erase your old drive if desired.