How to Install Linux as a Dual-Boot System Alongside Windows
Installing Linux as a dual-boot system alongside Windows allows users to experience the flexibility and power of Linux while maintaining access to Windows applications. A dual-boot setup provides an efficient way to explore Linux, conduct development work, or test software without compromising access to a Windows environment. This guide outlines the steps for safely setting up a Linux dual-boot system with Windows, including necessary preparation, installation, and post-installation configurations.
Prerequisites for a Dual-Boot Installation
Before beginning, there are several requirements and recommendations to ensure a smooth installation process:
Backup Data: Installing a new operating system can risk data loss, so it’s essential to back up all important files on an external drive or cloud storage service.
Create Available Disk Space: Dual-booting requires an unallocated partition on your disk for Linux installation. Generally, allocating at least 20–30 GB for Linux provides adequate space for the operating system and additional software.
Download Linux Distribution: Choose a Linux distribution suitable for dual-boot, such as Ubuntu, Linux Mint, or Fedora. Download the
.iso
file of the selected distribution from its official website.Create a Bootable USB: A bootable USB is required to install Linux. This can be done using tools like Rufus (for Windows) or Etcher.
Step 1: Preparing the Windows System
Disable Fast Startup:
Fast Startup in Windows can interfere with dual-boot installation. To disable it, go to:
Control Panel
>Power Options
>Choose what the power buttons do
>Change settings that are currently unavailable
.
Uncheck the Turn on fast startup option, and click Save changes.
Shrink the Windows Partition:
To create unallocated space for Linux, open the Disk Management tool:
- Right-click on the Start menu and select Disk Management.
Locate the main partition (usually C:) and right-click on it, then choose Shrink Volume.
Enter the amount of space to shrink (typically 20–30 GB) and click Shrink. This space will be used for the Linux installation.
Disable Secure Boot (if applicable):
Some Linux distributions require Secure Boot to be disabled. To do this:
Restart the computer and enter the BIOS/UEFI settings (often by pressing F2, F10, Delete, or Esc during boot).
Find the Secure Boot option (usually under the Security or Boot menu) and disable it.
Save changes and exit.
Step 2: Creating a Bootable USB for Linux
Insert a USB Drive: Insert a USB drive with at least 4 GB of space.
Download and Run Rufus (or a similar tool):
Open Rufus and select the USB drive.
Click Select and browse for the downloaded Linux
.iso
file.Set Partition scheme to GPT if you’re using UEFI, or MBR for older BIOS systems.
Click Start to create the bootable USB.
Restart the Computer and Boot from USB:
After the bootable USB is created, restart the computer.
Enter the Boot Menu (often accessible by pressing F12, Esc, or another key specific to your computer) and select the USB drive.
Step 3: Installing Linux
Once booted into the Linux installation environment, follow these steps to install Linux alongside Windows.
Select “Install Linux”:
- After booting from the USB, you’ll see an option to try Linux or install it. Select Install Linux.
Choose Installation Type:
During the installation process, Linux will detect the existing Windows installation. Choose the option to Install alongside Windows.
If this option does not appear, select Something else to manually partition the unallocated space.
Partitioning the Disk (if manual partitioning is required):
Select the unallocated space and create the following partitions:
Root Partition (
/
): At least 15 GB, formatted asext4
. This is where the main Linux files will reside.Swap Partition: Recommended size is 1.5–2 times the available RAM. This acts as virtual memory.
Home Partition (
/home
): Optional but recommended. This is where personal files and configurations are stored. Allocate any remaining space to this partition.
Select Installation Location for GRUB Bootloader:
- Ensure that the GRUB bootloader (Linux’s boot manager) is installed on the main drive (usually
/dev/sda
or equivalent). GRUB will manage the boot process for both Linux and Windows.
- Ensure that the GRUB bootloader (Linux’s boot manager) is installed on the main drive (usually
Complete the Installation:
Proceed with the installation. You’ll be prompted to select your time zone, keyboard layout, and create a user account.
After installation, the system will prompt you to remove the USB drive and restart.
Step 4: Booting into Linux and Windows
GRUB Bootloader:
- Upon restarting, the GRUB menu will appear, allowing you to choose between Linux and Windows. Use the arrow keys to select the operating system you wish to boot into.
Verify Installation:
- Boot into Linux to confirm the installation. You can then reboot and select Windows to ensure both systems function properly.
Step 5: Post-Installation Setup
Updating Linux:
Open a terminal in Linux and update the system by running:
sudo apt update && sudo apt upgrade # For Ubuntu-based systems sudo dnf update # For Fedora systems
Installing Essential Applications:
- Install necessary software and drivers, especially if you plan to use Linux for development or other specific tasks.
Accessing Windows Files from Linux:
- Most Linux distributions can access NTFS partitions, allowing you to read and write files on the Windows partition directly from Linux.
Backing Up the GRUB Configuration:
If you make any changes to your partition structure in the future, run the following command to update GRUB:
sudo update-grub
Troubleshooting Common Issues
GRUB Does Not Appear: If you boot directly into Windows after installation, it may be necessary to change the boot order in the BIOS/UEFI settings to prioritize the Linux boot partition.
Windows Fast Startup Interference: If Windows doesn’t shut down properly due to Fast Startup, re-enable this setting and disable it again to clear any cache issues.
Disk Space: Ensure Linux has adequate space on the partition. Low disk space can cause errors or prevent Linux from booting.
Conclusion
Installing Linux alongside Windows as a dual-boot system provides a seamless way to explore Linux while retaining access to Windows. This configuration is ideal for developers, students, and users looking to maximize their computer’s versatility. By following the steps above, you’ll be able to install Linux, set up GRUB for dual-boot, and customize your environment with minimal risks.
Subscribe to my newsletter
Read articles from Ahmed Raza directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Ahmed Raza
Ahmed Raza
Ahmed Raza is a versatile full-stack developer with extensive experience in building APIs through both REST and GraphQL. Skilled in Golang, he uses gqlgen to create optimized GraphQL APIs, alongside Redis for effective caching and data management. Ahmed is proficient in a wide range of technologies, including YAML, SQL, and MongoDB for data handling, as well as JavaScript, HTML, and CSS for front-end development. His technical toolkit also includes Node.js, React, Java, C, and C++, enabling him to develop comprehensive, scalable applications. Ahmed's well-rounded expertise allows him to craft high-performance solutions that address diverse and complex application needs.