Installing Archlinux (Archcraft) alongside pre-installed Windows 11 with GPT partitions detected
In this article, we will guide you through the process of installing Archlinux (Archcraft) alongside a pre-installed Windows 11 system that uses GPT partitions. We will cover the key concepts and provide detailed context on the topic, including subtitles and paragraphs, using the
tags, with properly formatted code according to the programming language, including indentation and tabulation as needed.
Prerequisites
Before you begin, make sure you have the following:
- A system with pre-installed Windows 11 that uses GPT partitions
- A live USB of Archcraft
- Basic knowledge of command line interfaces
Viewing Partitions with fdisk
To view the partitions on your system, boot into the live USB of Archcraft and open a terminal. Run the following command:
# fdisk -l
This will display a list of partitions on your system. Look for the EFI system partition, which is typically mounted at /boot/efi.
Creating Partitions for Archlinux (Archcraft)
Next, you will need to create partitions for Archlinux (Archcraft). You can use the fdisk command to do this. For example, to create a root partition, you can use the following commands:
# fdisk /dev/sda
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-..., default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-..., default 4095455): +50G
Created a new partition 1 of type 'Linux' and of size 50 GiB.
Repeat this process to create any additional partitions you may need, such as a swap partition or a home partition.
Formatting Partitions
Once you have created the partitions, you will need to format them. For example, to format the root partition as ext4, you can use the following command:
# mkfs.ext4 /dev/sda1
Repeat this process for any additional partitions you have created.
Mounting Partitions
Next, you will need to mount the partitions. For example, to mount the root partition at /mnt, you can use the following command:
# mount /dev/sda1 /mnt
Repeat this process for any additional partitions you have created.
Installing the Base System
Once the partitions are mounted, you can install the base system using the following command:
# pacstrap /mnt base base-devel
Generating an fstab File
After installing the base system, you will need to generate an fstab file. You can do this using the following command:
# genfstab -U /mnt >> /mnt/etc/fstab
Chrooting into the New System
Next, you will need to chroot into the new system using the following command:
# arch-chroot /mnt
Configuring the System
Once you are chrooted into the new system, you can configure it. This includes setting the time zone, locale, and keyboard layout, as well as creating a user and setting the root password.
Installing a Bootloader
Finally, you will need to install a bootloader. We recommend using systemd-boot, which is the default bootloader for Archlinux (Archcraft). You can install it using the following command:
# bootctl install
In this article, we have covered the process of installing Archlinux (Archcraft) alongside a pre-installed Windows 11 system that uses GPT partitions. We have covered the key concepts and provided detailed context on the topic, including subtitles and paragraphs, using the
tags. We have also included code blocks, enclosed within tags, with properly formatted code according to the programming language, including indentation and tabulation as needed.
References
- Archlinux Installation Guide: https://wiki.archlinux.org/title/Installation_guide
- Archcraft Installation Guide: https://archcraft-os.github.io/archcraft-docs/installation/installation-guide/