How to Dual Boot Arch Linux and Windows 10 on UEFI system

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.

Prerequisites

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.

launch-disk-management-utility

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

02-Shrink-option

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.

03-shrink-amount

Your unallocated space will be indicated as shown below. In our case, we have set aside approximately 20G for the installation of Arch Linux.

03-Unallocated-space

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.

04-configure-boot-options

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.

05-Select-ArchLinux-UEFI

This initialize Arch Linux as evidenced by the boot messages on the screen.

06-loading-Arch

After a few seconds, this ushers you to the prompt as shown below.

07-Arch-Linux-loaded

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.

08-Verfiy-efi-support

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 8.8.8.8 -c 4

You should get a positive reply as shown.

09-Confirm-internet-access

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

10-sync-time

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:

# cfdisk

This displays all the partitions available including Windows partitions.

11-View-all-linux-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.

12-Create-a-root-partition

The root partition will be created with the Linux filesystem type as shown.

13-root-partition-created

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.

14-create-new-partition

Specify the partition size as 4G

15-specify-partition-size

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.

16-change-type-of-partition

In the list that appears, select ‘Linux Swap’ and hit ENTER.

17-set-to-Linux-swap

At this point, both the root and Linux swap partitions are created as seen from the partition table below.

18-Linux-swap-created

To save the partitions, select the ‘Write’ option and hit ENTER.

19-select-write-option

When prompted if you want to write the partition to disk, simply type ‘yes’ and hit ENTER.

20-accept-writing-changes

To exit cfdisk utility, select the ‘Quit’ option and hit ENTER.

21-exit cfdisk

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

22-Format-root-partition

For swap partition, use the command:

# mkswap /dev/sda6

Then enable swap using the swapon command shown:

# swapon /dev/sda6

23-Format-swap

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

24-Mount-partitions

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

25-install base-and-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.

27-pacstrap-command-done

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.

# ls

Time zone information is found in the /usr/share/zoneinfo/ directory. To set your timezone, create a symbolic link to the /etc/localtime

Path.

# 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.

# locale-gen

31-generate locale

Next, create a new locale configuration file and save the locale as shown.

# echo "LANG=EN_US.UTF-8" > /etc/locale.conf

32-set-locale-in-locale-conf-file

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

33-set-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

34-install-netctl package

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

35-optional-dependencies

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

36-install-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

37-create-a-user

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

38-Install-grub-efibootmgr

Next, install the os-prober package which will enable Arch Linux to detect the Windows operating system.

# pacman -S os-prober

39-Install-os-prober

Then install grub on the EFI directory as shown.

# grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB

40-install-grub-bootloader

And install a grub configuration file as shown.

# grub-mkconfig -o /boot/grub/grub.cfg

41-generate-grub-file

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.

# passwd

42-set-root-passwd

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.

43-Dual bootscreen

Log in as your regular user as shown

44-login as new user

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

45-network failure

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

# su

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.

46-Interface-set-to-etho

However, as we saw earlier, our network interface is enp0s3. Therefore, modify it to enp0s3. Additionally, uncomment the line starting with the DHCPClient parameter.

DHCPClient=dhcpcd

This enables the system to accept IP addresses using the dhcp service.

47-modify-custom-profile

Save and exit the configuration file. Next, enable the custom dhcp profile.

# netctl enable custom-dhcp-profile

48-enable dhcp-profile

And finally enable the dhcp service.

# systemctl enable dhcpcd.service

49-Enable dhcpcd service

Your interface should now pick an IP address from the router and you should have an internet connection.

50-verify-internet-connectivy

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.

Read Also : How to Create and Configure Sudo User on Arch Linux

11 thoughts on “How to Dual Boot Arch Linux and Windows 10 on UEFI system”

    • Please make sure that you have a partition that labeled as EFI System when you setup your partitions table, and also make sure that you format that EFI system partition to fat32 using the following command: mkfs.fat -F32 /dev/sdx. where x is your partition number whatever happens to be.

      Reply
    • Change the type of the partition to EFI. I think the default is ‘Linux Filesystem’ and you’ll need to change that

      Reply
  1. Sorry but i have warning in step 14:
    warning os-prober will not be executed to detect other bootable partition.
    System on them will not be added to the grub boot configuration.
    Check grub_disable_os_prober document entry
    Adding boot menu entry for UEFI firmware setting
    I next step and done, when I reboot I only see windows

    Reply
  2. Hey Thang, looks like os-prober has been disabled by default on your system. You need to open the /etc/default/grub file and uncomment the line.

    GRUB_DISABLE_OS_PROBER=false

    Then run:

    sudo update-grub

    Reply
  3. Thanks very much. Everything works fine. I had the same issue like Thang and after that what Jamie answers everything is OK.

    Reply

Leave a Comment