In this guide, you will learn how to Dual boot Arch Linux with Windows 10 on UEFI system. This guide assumes that you already have Windows 10 installed on your system.
Before you begin configuring the dual-boot setup, ensure that the following requirements are met:
- A bootable installation medium of Arch Linux (Either USB or DVD). To download the latest Arch Linux ISO, proceed to the official Arch Linux download page. Once you have downloaded the ISO image, grab an 8GB USB drive and make it bootable using Rufus tool or any other application that can create a bootable USB drive.
- A fast and stable internet connection for downloading and installing software packages.
Step 1) Create a separate partition for installation of Arch Linux
For the dual boot setup to work, we need to create a separate partition on the hard drive on which Arch Linux will be installed. To do so, head over to the disk management utility by pressing Windows Key + R. In the dialogue box, type diskmgmt.msc and hit ENTER.
This launches the disk management utility displaying the various disk partitions on your hard drive. We are going to create an unallocated partition by shrinking the C drive. If you have a bigger partition than the C drive, feel free to use it for creating the separate partition,
So, we are going to right-click on drive C and select the ‘Shrink Volume’ option as shown
On the pop-up dialogue box that appears, we are going to specify the amount to shrink as shown. This is the amount that will be designated for the installation of Arch Linux. In our example, we have shrunk 20 GB of hard disk space will serve as the unallocated space.
Once you are satisfied, click on the ‘Shrink’ button.
Your unallocated space will be indicated as shown below. In our case, we have set aside approximately 20G for the installation of Arch Linux.
With the unallocated partition in place, plug in your bootable USB and reboot your PC.
Step 2) Configure BIOS to boot from bootable medium
Before you begin with the installation process, it’s prudent to set the boot priority in the BIOS to select your bootable medium as the most preferred option. Depending on your vendor, you can press the Esc, or F10 key to enter the BIOS and navigate to the boot priority Menu.
Also note that we are using the UEFI mode for installation.
Once you have selected your boot medium, press the ESC button to continue with the booting process.
Step 3) Begin the installation of Arch Linux
On the bootup screen, you will be presented with options as shown below. Select the first option – Arch Linux install medium (x86_64, UEFI) and hit ENTER.
This initialize Arch Linux as evidenced by the boot messages on the screen.
After a few seconds, this ushers you to the prompt as shown below.
To confirm that you have EFI support, run the command:
# ls /sys/firmware/efi/efivars
You should get some entries on the screen as shown. If nothing is listed on your screen, then it means you are using MBR and this guide won’t work for you in configuring up a dual boot setup.
As you begin the installation, you might want to ensure that you have internet connectivity. Internet connectivity is crucial in setting time and date.
You can ping Google’s DNS as shown:
# ping 126.96.36.199 -c 4
You should get a positive reply as shown.
Step 4) Update time and date
Next, we are going to update the system time and date using the timedatectl command as shown.
# timedatectl set-ntp true
You can thereafter confirm the time and date using the command
# timedatectl status
Step 5) Create & format Linux partitions
Next, we are going to partition our hard drive and create some Linux partitions. An easy way of doing this is using the cfdisk utility. Run the command:
This displays all the partitions available including Windows partitions.
As you can see, we have some free space of 19.5G that we created earlier in step 1 from shrinking drive C on the Windows side. Using this partition, we shall create the following Linux partitions :
- Root partition / 12G
- swap partition 4G
To achieve this, we will navigate to the free space with 19.5G just after /dev/sda3 volume and hit ENTER. We will then specify the volume as 12G for the root partition as shown below. Then hit ENTER.
The root partition will be created with the Linux filesystem type as shown.
Next, we will create another partition for swap. Using the same method, we will proceed to the remaining free partition of 7G and select the ‘New’ option.
Specify the partition size as 4G
Since this will be our swap partition, we need to go the extra step and modify the partition type. Therefore, we will select the ‘type’ option and hit ENTER.
In the list that appears, select ‘Linux Swap’ and hit ENTER.
At this point, both the root and Linux swap partitions are created as seen from the partition table below.
To save the partitions, select the ‘Write’ option and hit ENTER.
When prompted if you want to write the partition to disk, simply type ‘yes’ and hit ENTER.
To exit cfdisk utility, select the ‘Quit’ option and hit ENTER.
Step 6) Format and mount the partitions
For the partitions to become usable and available for use, we need to format them and later mount them.
To format the root partition, run the command:
# mkfs.ext4 /dev/sda5
For swap partition, use the command:
# mkswap /dev/sda6
Then enable swap using the swapon command shown:
# swapon /dev/sda6
Next, mount the root partition to the /mnt directory
# mount /dev/sda5 /mnt
Additionally, we are going to create a directory for the EFI partition on which we will mount the Windows EFI system which , in our case is located on the /dev/sda1 partition.
# mkdir /mnt/efi
Then mount the EFI partition on the EFI mount point.
# mount /dev/sda1 /mnt/efi
Step 7) Install base system and other required Linux firmware packages
Next, we are going to install the central packages for our Linux system including the base and Linux-firmware packages.
# pacstrap /mnt base linux linux-firmware
This is going to take quite some time. At this point, you can take a much-deserved break and head out for a stroll and grab some coffee. When the installation is successful, you should get the following output.
Step 8) Generate fstab file
The next step will be to generate the fstab file on the /mnt directory as follows.
# genfstab -U /mnt >> /mnt/etc/fstab
Step 9) Setup timezone
After generating the ftab file, navigate to the newly created root filesystem
# arch-chroot /mnt
You can verify that you are in the root filesystem using the command as shown.
Time zone information is found in the /usr/share/zoneinfo/ directory. To set your timezone, create a symbolic link to the /etc/localtime
# ln -sf /usr/share/zoneinfo/US/Pacific /etc/localtime
Next, sync the hardware clock using the command:
# hwclock --systohc
Step 10) Set up locale
The locale determines the system language, currency format, numbering and date on your system. This information is contained in the /etc/locale.gen file. So, open the file using the vim editor.
# vim /etc/locale.gen
NOTE: To install the vim editor, use the pacman command as follows:
# pacman -Sy vim
Once you have accessed the file, scroll and uncomment your preferred locale. In this case, we have decided to go with en_US.UTF-8 UTF-8
Save and exit the file. Next generate the locale configuration using the command.
Next, create a new locale configuration file and save the locale as shown.
# echo "LANG=EN_US.UTF-8" > /etc/locale.conf
Step 11) Set up hostname
Next, we are going to configure the hostname of our Arch System. First, create a new file and specify the hostname as shown.
# echo linuxtechi > /etc/hostname
Afterwards, modify the /etc/hosts file as follows.
# echo "127.0.1.1 linuxtechi" >> /etc/hosts
Step 12) Install netctl Network Manager
To use the internet once the installation is complete and upon a reboot, we need to install a network manager. In this example we wil install the netctl network manager as follows
# pacman -Sy netctl
During the installation some optional dependencies for netctl are listed. We are going to install the following dependencies. These are:
- dhcpcd – For DHCP support
- wpa-supplicant – For wireless networking
- ifplugd – For wired connections networking
These dependencies will help you set up networking without a problem when you next boot in to Arch Linux.
To install the optional dependencies, run the command below:
# pacman -Sy dhcpcd wpa-supplicant ifplugd
Step 13) Create a regular user
Next, we will create a regular user called linuxtechi and place him in the wheel group as follows.
# useradd -G wheel -m linuxtechi
The next step will be to assign a password to the user.
# passwd linuxtechi
Step 14) Install GRUB bootloader
We are getting close to the finish line. In this step, we will install the grub bootloader to enable us boot into our Arch Linux system upon a reboot.
We will install the grub bootloader package alongside the efi boot manager package since we are using the UEFI mode.
# pacman -S grub efibootmgr
Next, install the os-prober package which will enable Arch Linux to detect the Windows operating system.
# pacman -S os-prober
Then install grub on the EFI directory as shown.
# grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
And install a grub configuration file as shown.
# grub-mkconfig -o /boot/grub/grub.cfg
The last line is an indication that Arch has detected the presence of Windows Boot manager on /dev/sda1 partition. Perfect!
The finally, set a password for the root user as shown.
Then exit and reboot your system.
# exit # reboot
Step 15) Boot into Arch Linux
When booting, the GRUB bootloader will display various options including booting into Arch Linux, which is the first option, and also booting into Windows which is the last option in my case.
Log in as your regular user as shown
Step 16) Post Installation tasks
One of the things I noted when I logged in is that I do not have any internet connection. This is an issue caused by the default dhcp profile settings which need to be modified to accommodate the network interface attached to the Arch Linux system.
To find the interfaces attached run the command:
$ ip link
The output confirms that our network interface is enp0s3
We need to modify the ethernet-dhcp file in the /etc/netctl/examples/ path and edit out network interface.
But first, lets copy the file to the /etc/netctl directory.
Switch to the root user
Copy the ethernet-dhcp file to the /etc/netctl directory.
# cp /etc/netctl/examples/ethernet-dhcp /etc/netctl/custom-dhcp-profile
Next, navigate to the /etc/netctl directory.
# cd /etc/netctl
Use the vim editor to edit the file.
# vim custom-dhcp-profile
The interface attribute is set to eth0.
However, as we saw earlier, our network interface is enp0s3. Therefore, modify it to enp0s3. Additionally, uncomment the line starting with the DHCPClient parameter.
This enables the system to accept IP addresses using the dhcp service.
Save and exit the configuration file. Next, enable the custom dhcp profile.
# netctl enable custom-dhcp-profile
And finally enable the dhcp service.
# systemctl enable dhcpcd.service
Your interface should now pick an IP address from the router and you should have an internet connection.
You can install an X windows system as shown,
$ sudo pacman -S xorg xorg-server
Then install a display manager. For example, to install GNOME, run:
$ sudo pacman -S gnome
Then start and enable gdm service
$ sudo systemctl start gdm $ sudo systemctl enable gdm
This brings us to the end of this lengthy topic. Hopefully, you are now in a position to Dual boot Arch Linux with Windows on UEFI system.