How to Dual Boot Debian 12 (Bookworm) with Windows
Categories:
4 minute read
Dual booting Debian 12 (Bookworm) with Windows allows you to enjoy the flexibility of Linux while keeping Windows for tasks that require it. This guide provides step-by-step instructions to help you set up a dual-boot system safely and efficiently.
Prerequisites
Before you begin, ensure you have:
- A PC with Windows already installed or ready for installation.
- A Debian 12 (Bookworm) ISO file.
- A USB drive (at least 8GB).
- A backup of important files (just in case something goes wrong).
- Access to BIOS/UEFI settings to configure boot options.
Step 1: Prepare Windows for Dual Boot
1.1 Check System Configuration
- Press
Win + R
, typemsinfo32
, and check the “BIOS Mode.” If it says “UEFI,” you must install Debian in UEFI mode. If it says “Legacy,” you must install Debian in Legacy mode.
1.2 Shrink Windows Partition
- Open Disk Management (
Win + X
> “Disk Management”). - Right-click your Windows partition (usually C:), then select “Shrink Volume.”
- Allocate at least 20GB for Debian (more if you plan to use it extensively).
- Leave the space unallocated (do not format it).
1.3 Disable Fast Boot and Secure Boot
- Go to
Control Panel > Power Options > Choose what the power buttons do
. - Click “Change settings that are currently unavailable.”
- Uncheck “Turn on fast startup.”
- Reboot and enter BIOS (usually by pressing
F2
,F12
,DEL
, orESC
at startup). - Look for “Secure Boot” under Boot settings and disable it.
Step 2: Create a Debian 12 Bootable USB
2.1 Download Debian 12 ISO
- Get the latest Debian 12 ISO from Debian’s official website.
2.2 Create Bootable USB
- Use Rufus (on Windows) or Balena Etcher (cross-platform).
- Select your USB drive.
- Choose the Debian ISO.
- Set the partition scheme:
- UEFI mode: Select GPT.
- Legacy mode: Select MBR.
- Click “Start” and wait for the process to complete.
Step 3: Boot into Debian Installer
- Insert the USB into your PC and restart.
- Enter BIOS and change the boot order so the USB drive is first.
- Save and exit (F10 usually saves changes).
- The Debian installer should load.
Step 4: Install Debian 12
4.1 Choose Installation Type
- Select Graphical Install or Install (depending on preference).
- Choose your language, region, and keyboard layout.
4.2 Configure Network and User Details
- Connect to WiFi or Ethernet if required.
- Set up a root password (if asked) and create a new user.
4.3 Partitioning (Dual Boot Setup)
- Choose Manual Partitioning.
- Find the unallocated space from earlier and select it.
- Create partitions:
- Root (
/
): At least 15GB (ext4 format). - Swap: (Equal to RAM if less than 8GB, otherwise 4GB is enough).
- Home (
/home
) (optional): Allocate space if you want to store personal files separately.
- Root (
- Select Finish Partitioning and Write Changes to Disk.
4.4 Install Bootloader (GRUB)
- Debian will detect Windows and add it to the bootloader automatically.
- Install GRUB on the primary drive (usually
/dev/sda
or/dev/nvme0n1
).
Step 5: Finalizing Installation
- Wait for Debian to install.
- Remove the USB and reboot.
- The GRUB menu should appear, allowing you to select Debian or Windows.
Step 6: Post-Installation Steps
6.1 Update Debian
Open the terminal and run:
sudo apt update && sudo apt upgrade -y
6.2 Install Missing Drivers
For proprietary WiFi or graphics drivers, enable
contrib
andnon-free
repositories in/etc/apt/sources.list
and install:sudo apt install firmware-linux firmware-misc-nonfree
6.3 Set Default Boot OS
If you want Windows to boot by default:
sudo nano /etc/default/grub
Change
GRUB_DEFAULT=0
to the correct Windows entry (check withgrep menuentry /boot/grub/grub.cfg
).Save and update GRUB:
sudo update-grub
Troubleshooting
GRUB Not Showing
Boot into a Debian live USB.
Open the terminal and reinstall GRUB:
sudo mount /dev/sdX /mnt sudo grub-install --root-directory=/mnt /dev/sdX sudo update-grub
(Replace
/dev/sdX
with your boot disk, e.g.,/dev/sda
.)
Windows Boot Issues
- If Windows doesn’t boot, use a Windows installation USB:
Open the command prompt (Shift + F10 in Windows installer).
Run:
bootrec /fixmbr bootrec /fixboot bootrec /scanos bootrec /rebuildbcd
Conclusion
Dual-booting Debian 12 and Windows provides flexibility without sacrificing either operating system. Following these steps ensures a smooth installation process. If you encounter issues, Debian’s community forums and documentation are great resources for troubleshooting.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.