Dual-booting Ubuntu and Windows lets you enjoy the best of both worlds. You can run Ubuntu for development and productivity while keeping Windows for gaming or specific applications. This guide will show you how to safely set up a dual-boot system.
What You’ll Need
- A USB Drive: At least 8GB for the Ubuntu installer.
- Ubuntu ISO File: Download the latest version from ubuntu.com.
- Windows Installed: Ensure Windows is already installed on your system.
- Backup Your Data: Before proceeding, back up all important files in case anything goes wrong.
Step 1: Prepare Your USB Drive
- Download Rufus or balenaEtcher:
- If you’re on Windows, use Rufus to create a bootable USB drive.
- On macOS or Linux, use balenaEtcher.
- Create a Bootable USB:
- Insert your USB drive.
- Open Rufus or Etcher.
- Select the downloaded Ubuntu ISO file and your USB drive.
- Start the process to make the USB bootable.
Step 2: Shrink Windows Partition
- Open Disk Management:
- Press Win + R, type
diskmgmt.msc
, and hit Enter.
- Shrink a Partition:
- Right-click your main drive (usually C:) and select Shrink Volume.
- Enter the size you want to allocate for Ubuntu (20GB minimum recommended).
- Click Shrink.
Note: Don’t create a partition for Ubuntu yet. Leave the space as “Unallocated.”
Step 3: Boot from the USB
- Restart Your Computer.
- Access BIOS/UEFI:
- Press the appropriate key (like F2, F12, Esc, or Del) during startup.
- Set USB as the Boot Device:
- Navigate to the Boot menu and select your USB drive.
- Save and Exit:
- Your system will boot into the Ubuntu installer.
Step 4: Install Ubuntu
- Choose “Try Ubuntu”:
- This lets you try Ubuntu without installing it.
- Start the Installation:
- Double-click the Install Ubuntu icon on the desktop.
- Choose Installation Type:
- Select Install Ubuntu alongside Windows Boot Manager.
- If this option isn’t available, choose Something Else to manually partition.
- Partition the Unallocated Space:
- Select the unallocated space and create the following partitions:
- Root (
/
): 20GB or more, ext4 filesystem. - Swap Area: 2GB or more, if you don’t have enough RAM.
- Home (
/home
): The remaining space for your personal files.
- Root (
- Complete the Installation:
- Follow the prompts, set up your username, and wait for the installation to finish.
- Restart:
- Remove the USB drive and restart your computer.
Step 5: Set Up GRUB Bootloader
When you restart, you’ll see the GRUB menu, which lets you choose between Ubuntu and Windows.
- If you don’t see the GRUB menu:
- Boot into Ubuntu and open the terminal.
- Run:
bash sudo update-grub
- Restart your computer.
Step 6: Verify Everything Works
- Test Booting Ubuntu:
- Select Ubuntu from the GRUB menu and ensure everything works.
- Test Booting Windows:
- Reboot and select Windows from the GRUB menu to confirm it loads properly.
Tips for Managing a Dual-Boot System
- Switch Boot Order:
- Use your BIOS/UEFI settings to change the default boot option if needed.
- Access Shared Files:
- Ubuntu can read NTFS drives, so you can access your Windows files from Ubuntu.
Troubleshooting
- GRUB Not Showing:
- Boot into Ubuntu via USB and run:
bash sudo grub-install sudo update-grub
- Windows Boot Issues:
- Use Windows Recovery tools to fix the bootloader:
cmd bootrec /fixmbr bootrec /fixboot