Introduction
In this article, we will guide you through the process of dual-booting Ubuntu 24.04 LTS and Windows 11 Pro on a ThinkPad E14 Gen 4. We will cover the necessary partition setup using the GParted Live USB and ensure a smooth booting experience.
Prerequisites
Before we begin, make sure you have the following:
- A ThinkPad E14 Gen 4 laptop
- Ubuntu 24.04 LTS ISO file
- Windows 11 Pro ISO file
- A blank USB stick for creating Live USBs
- A secondary monitor or external display (optional)
Creating Live USBs
First, we will create Live USBs for both Ubuntu and Windows. You can use Rufus or Etcher to create the USBs:
# For Ubuntu
sudo dd if=./path/to/ubuntu-24.04.iso of=/dev/sdX bs=4M status=progress oflag sync && sync
For Windows
Rufus -o WinUSB /path/to/Windows.iso
Booting from Live USBs
Boot your laptop from the Ubuntu Live USB. Once the Live environment loads, open the terminal:
sudo swapoff -a
sudo swapon /dev/sdXY1 # Replace X with the correct disk identifier
Partitioning Disks
We will now partition the disks using the GParted Live USB. First, we will create partitions for both Ubuntu and Windows:
Creating Ubuntu Partitions
Create the following partitions for Ubuntu:
- / (root): Min. 20GB, Ext4
- /boot: Min. 512MB, Ext4
- /swap: Recommended size: 2x RAM, Swap
# Create the partitions
sudo gdisk /dev/sdXY # Replace X with the correct disk identifier
g> n # New partition
p # Primary
1 # Partition number
# Set the size and file system type
t # Create a new partition type (Linux filesystem)
1 # Partition number
w # Write the table to disk and exit
Creating Windows Partitions
Create the following partitions for Windows:
- C: (System, Boot, and Program Files): Min. 100GB, NTFS
- D: (Data): Min. 100GB, NTFS
# Create the partitions
sudo gdisk /dev/sdXZ # Replace Z with the correct disk identifier
g> n # New partition
p # Primary
1 # Partition number
# Set the size and file system type
t # Create a new partition type (Windows data)
2 # Partition number
w # Write the table to disk and exit
Formatting Partitions
Format the newly created partitions:
Formatting Ubuntu Partitions
sudo mkfs.ext4 /dev/sdXY1 # Replace X with the correct disk identifier
sudo mkfs.ext4 /dev/sdXY2
sudo mkswap /dev/sdXY3
Formatting Windows Partitions
sudo mkfs.ntfs /dev/sdXZ1
sudo mkfs.ntfs /dev/sdXZ2
Mounting Partitions
Mount the partitions:
Mounting Ubuntu Partitions
sudo mount /dev/sdXY1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
Mounting Windows Partitions
sudo mount /dev/sdXZ1 /mnt/windows
Installing GRUB
Install GRUB:
Installing GRUB on Ubuntu
sudo grub-install --force --boot-directory=/mnt/boot /dev/sdXY # Replace X with the correct disk identifier
Installing GRUB on Windows
Install GRUB on Windows using the Boot Repair tool:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install -y boot-repair
sudo boot-repair
Installing Ubuntu
Install Ubuntu:
Installing Ubuntu Desktop
sudo apt update
sudo apt install ubuntu-desktop
Installing Windows
Install Windows:
Installing Windows 11 Pro
sudo mount /dev/sdXZ1 /mnt
sudo swapon /dev/sdXY3
sudo umount /mnt/windows
sudo umount /mnt
sudo reboot
Conclusion
Congratulations! You have successfully installed Ubuntu 24.04 LTS and Windows 11 Pro on your ThinkPad E14 Gen 4, using the partition setup outlined in this article.