User:Imnotpathetic/UEFI Installation guide
This is a installation guide for installing Arch Linux on a UEFI computer with Grub as the bootloader, and networkmanager
Live environment
Once booted into the live environment, Arch Linux automatically logs in and you are presented with a shell prompt.
Verify boot mode
This installation Is for a UEFI motherboard computer. Thus, it is important to make sure that your computer has booted into the correct boot mode. To verify that you have booted into UEFI mode, you have to list the efivars
directory
# ls /sys/firmware/efi/efivars
If the command shows the directory without an error, you have booted into UEFI installation. If the command does not return anything, please refer to your motherboard manual.
Installation processes
From here on, it is all installation process.
Connect to the internet
If your computer offers a Ethernet port, you have to physically plug a wire to connect to the internet. If you do not have a Ethernet port, or you are too lazy to plug your wire, you will have to connect via the iwtctl command.
wifi-menu
command does not work anymore (2021)# iwctl
You will now see a new prompt [iwd]#
.
[iwd]# device list
This command is going to list all your wifi adapters in your computer.
[iwd]# station DEVICE scan
The above command is going to scan and find all networks in you area.
wlan0
.[iwd]# station DEVICE get-networks
The above command is going to list all the scanned networks
[iwd]# station DEVICE connect NETWORK_NAME
Type in your password and now, you will be connected to wifi. To exit type in
[iwd]# exit
Now you will need to test your internet connection. Ping a internet site you know.
# ping www.archlinux.org
If it returns you a command, then you have successfully connect to the internet.
Disk Setup
Every device is assigned a block device label example /dev/sda
, /dev/nvme0n1
, or /dev/mmcblk0
. To recognise these devices use the lsblk
command. It is recommended to use GPT partition layout to your computer. Partitioning could be done with cfdisk
or fdisk
or any of the tool.
Disk Partitioning
Mount point | Partition | Partition type | Suggested size |
---|---|---|---|
/mnt/boot or /mnt/efi
|
/dev/efi_system_partition
|
EFI system partition | At least 100 MiB |
[SWAP]
|
/dev/swap_partition
|
Linux swap | More than 512 MiB |
/mnt
|
/dev/root_partition
|
Linux x86-64 root (/) | Remainder of the device |
/mnt/home
|
home_partition
|
Home Partition | Atleast 1 GiB |
Formatting the Partitions
/dev/sda1
, /dev/sda2
, etc and a /dev/nvme0n1
will be labeled as /dev/nvme0n1p1
, /dev/nvme0n1p2
, etc. Please refer this for mounting your partitions with the help oflsblk
commandOnce the disk has been partitioned, each newly created partitions should be formatted with the appropriate filesystem. For the purpose of this guide, I will be using the tried and tested, Ext4 filesystem for the root and the home partition. To format your root partition and home partition, run the command
dev/*_partition
with the appropriate block device path# mkfs.ext4 /dev/dev_root_partition && mkfs.ext4 /dev/home_partition
Now, you will need to format your boot partition. So run the command
# mkfs.fat -F32 /dev/efi_system_partition
Now you will need to format swap partition, so run the command
# mkswap /dev/swap_partition
Mount the Partitions
Mount the root device to /mnt
# mount /dev/root_partition /mnt
Create a new mount point /mnt/boot
and mount the EFI partition by running the command
# mkdir /mnt/boot && mount /dev/efi_system_partition /mnt/boot
Create a new mount point /mnt/home
and mount the home partition by running the command
# mkdir /mnt/home && mount /dev/home_partition /mnt/home
Now, verify your partition table by running the command lsblk. If your mount points assigned are
# lsblk
block device label ├─root_partition /mnt ├─efi_system_partition /mnt/boot └─home_partition /mnt/home
Then you have completed probably the most difficult step.
Installing essential packages
Packages must be installed with the help of pacstrap command. You can change the mirror with the help of reflector command. To install packages punch the command
# pacstrap /mnt base linux linux-firmware