Table of Contents
- What is Dual Booting?
- Prerequisites
- Preparing Your System
- Creating Linux Installation Media
- Shrinking the Windows Partition
- Disabling Secure Boot and Fast Startup
- Booting from the Linux Live USB
- Installing Linux
- Setting Up the Boot Loader (GRUB)
- Post-Installation Steps
- Troubleshooting Common Issues
- Conclusion
- References
What is Dual Booting?
Dual booting is the process of installing two operating systems on a single hard drive (or SSD) and selecting which one to run when you start your computer. Unlike virtual machines (which run an OS inside another), dual booting lets each OS use your hardware directly, maximizing performance.
Why dual boot?
- Use Windows for gaming (most AAA games work best on Windows).
- Use Linux for development (tools like
git,bash, and Docker are native). - Experiment without replacing Windows entirely.
Prerequisites
Before starting, gather these tools and check your system:
Hardware Requirements
- Storage Space: At least 20GB of free space on your hard drive/SSD (50GB+ recommended for comfort).
- USB Drive: 8GB+ USB flash drive (will be erased, so back up data).
- Internet Connection: To download Linux and updates.
Software & Tools
- A Windows PC (obviously, since we’re dual-booting with it).
- A Linux ISO file (we’ll use Ubuntu 22.04 LTS—beginner-friendly, stable, and widely supported).
- A tool to create a bootable USB (Rufus for Windows or BalenaEtcher for cross-platform).
Preparing Your System
Step 1: Back Up Your Data
Critical! Dual booting involves partitioning your drive, which carries a small risk of data loss if something goes wrong. Back up important files to:
- An external hard drive.
- Cloud storage (Google Drive, OneDrive, etc.).
- Windows Backup (Search > “Backup settings” > “Add a drive”).
Step 2: Check Disk Space in Windows
Ensure you have enough free space for Linux:
- Press
Win + X> Select Disk Management. - Look for the “C:” drive (your main Windows partition). Note the “Free Space” (e.g., 100GB).
- If free space is less than 20GB, free up space by deleting unused files or moving them to an external drive.
Creating Linux Installation Media
Step 1: Download a Linux ISO
For beginners, Ubuntu is ideal. Download the latest LTS (Long-Term Support) version:
- Ubuntu 22.04 LTS ISO (64-bit recommended).
Step 2: Create a Bootable USB
Using Rufus (Windows):
- Download Rufus (portable version works fine).
- Insert your USB drive.
- Open Rufus > Under “Device,” select your USB drive.
- Click “Select” > Choose the Ubuntu ISO file you downloaded.
- Leave other settings as default (Partition scheme: GPT, Target system: UEFI (non-CSM)).
- Click “START” > Confirm that you want to erase the USB (click “OK”).
- Wait 5–10 minutes for Rufus to create the bootable drive.
Shrinking the Windows Partition
To make space for Linux, shrink your Windows partition:
- Open Disk Management (Win + X > Disk Management).
- Right-click your Windows partition (usually “C:”) > Select Shrink Volume.
- Windows will calculate available shrink space. Enter the amount to shrink (e.g., 50000MB = 50GB) > Click “Shrink.”
- Note: If the shrink size is smaller than expected, disable hibernation and page files temporarily (see Microsoft’s guide).
- You’ll now see a new “Unallocated” space (black bar) on your drive—this is where Linux will live.
Disabling Secure Boot and Fast Startup
These Windows/UEFI features can block Linux from installing or booting:
Disable Secure Boot
Secure Boot is a UEFI security feature that restricts unsigned OSes. Linux works with Secure Boot on modern distros, but disabling it avoids issues:
- Restart your PC. As it boots, press the BIOS/UEFI key (varies by manufacturer):
- Dell: F2 or F12
- HP: F10 or Esc
- Lenovo: F2 or Novo button
- ASUS: F2 or Del
- In the BIOS/UEFI menu, navigate to the “Security” or “Boot” tab.
- Find “Secure Boot” > Set it to Disabled.
- Save changes and exit (usually “F10” or “Save & Exit”).
Disable Fast Startup
Fast Startup is a Windows feature that speeds up boot times but can lock the Windows partition, causing Linux to fail to mount it:
- Open Control Panel > “Power Options” > “Choose what the power buttons do.”
- Click “Change settings that are currently unavailable” (requires admin rights).
- Uncheck “Turn on fast startup (recommended)” > Click “Save changes.”
Booting from the Linux Live USB
Now, boot into the Linux live environment to test before installing:
- Insert your Linux USB drive.
- Restart your PC. As it boots, press the boot menu key (e.g., F12 for Dell, F10 for HP) to open the boot device menu.
- Select your USB drive (labeled “USB” or the drive brand, e.g., “Kingston DataTraveler”).
- Ubuntu will load. Select “Try Ubuntu” (not “Install Ubuntu”) to test the OS without making changes.
Test Linux (Optional but Recommended)
In the live environment, check if basic hardware works:
- Wi-Fi: Connect to your network (top-right corner).
- Sound: Play a video or music.
- Touchpad/keyboard: Ensure they work.
If something fails, research fixes for your hardware (e.g., “Ubuntu Wi-Fi not working [laptop model]”) before installing.
Installing Linux
Once you’re ready to install:
- Click the “Install Ubuntu” icon on the desktop.
- Select your language > Click “Continue.”
- Choose keyboard layout > Click “Continue.”
Installation Type (Critical Step!)
This determines how Linux is installed alongside Windows. For beginners, “Install Ubuntu alongside Windows Boot Manager” is safest:
-
Option 1: Alongside Windows (Recommended)
The installer will automatically use the unallocated space we created earlier. Confirm the partition sizes (you can drag the slider to adjust Linux/Windows space) > Click “Install Now.” -
Option 2: Manual Partitioning (Advanced)
For control (e.g., separate home partition), select “Something else.” Create these partitions:- Root (/): 20GB+ (ext4, mount point: /).
- Swap: Equal to your RAM (e.g., 8GB for 8GB RAM; use “swap area” type).
- Home (/home): Remaining space (ext4, mount point: /home) to store files.
Complete the Installation
- Click “Continue” > Confirm you want to write changes to disk (this is safe if you followed the steps!).
- Select your time zone > Click “Continue.”
- Create a user account:
- Name, computer name, username.
- Password (make it strong!).
- Check “Log in automatically” (optional) or “Require my password to log in.”
- Wait for the installation to finish (10–20 minutes).
- Click “Restart Now” when prompted. Remove the USB drive when asked.
Setting Up the Boot Loader (GRUB)
After restarting, you’ll see the GRUB boot loader menu. It lets you choose between:
- Ubuntu (Linux)
- Windows Boot Manager (Windows)
- Advanced options for Ubuntu (recovery mode, etc.)
By default, GRUB will boot into Linux after 10 seconds. To change this:
- Boot into Linux.
- Open a terminal (Ctrl + Alt + T).
- Run
sudo nano /etc/default/grub(edits GRUB settings). - Change
GRUB_DEFAULT=0toGRUB_DEFAULT=2(if Windows is the 3rd option in the menu; count starts at 0). - Change
GRUB_TIMEOUT=10to adjust the wait time (e.g., 5 seconds). - Save (Ctrl + O) > Exit (Ctrl + X).
- Update GRUB:
sudo update-grub.
Post-Installation Steps
Update Linux
Linux updates frequently—install them first:
- Open a terminal > Run:
sudo apt update && sudo apt upgrade -y - Restart if prompted.
Install Drivers
Most hardware works out of the box, but proprietary drivers (e.g., NVIDIA graphics) may need manual installation:
- Open “Software & Updates” > Go to the “Additional Drivers” tab.
- Select the recommended driver (e.g., NVIDIA driver) > Click “Apply Changes.”
Install Software
Add apps using:
- Ubuntu Software Center: GUI for apps like Chrome, VS Code, and Spotify.
- Terminal: Install via
apt(e.g.,sudo apt install firefox). - Snap/Flatpak: For universal apps (e.g.,
sudo snap install codefor VS Code).
Troubleshooting Common Issues
GRUB Menu Doesn’t Appear
If your PC boots straight to Windows:
- Restart > Enter BIOS/UEFI > Set “Ubuntu” or “GRUB” as the first boot option.
- If that fails, use the Linux live USB:
- Boot into “Try Ubuntu.”
- Open terminal > Run
sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt update && sudo apt install boot-repair -y. - Launch “Boot Repair” > Click “Recommended repair.”
Windows Not Booting from GRUB
If selecting Windows in GRUB causes an error:
- Boot into Windows via BIOS (temporarily set Windows as first boot option).
- Run
sudo update-grubin Linux to refresh the boot menu.
Linux Can’t Access Windows Files
Ensure Fast Startup is disabled (see Step 6). If still stuck, install ntfs-3g:
sudo apt install ntfs-3g
Conclusion
Dual booting Linux and Windows is a great way to explore Linux without abandoning Windows. With this guide, you’ve learned to:
- Prepare your system and back up data.
- Create a bootable Linux USB.
- Shrink Windows partitions and disable blocking features.
- Install Linux alongside Windows and set up GRUB.
Now, experiment! Try Linux tools like htop (system monitor), git (version control), or GIMP (image editing). And remember: backups are your friend—keep them updated!