Installing Arch Linux (UEFI) 2020
A Note about installing Arch Linux
There's a good chance by the time you are reading this that it is out of date, to stay up to date on Arch Linux Installs checkout the Arch Wiki
A Note about UEFI
UEFI (Unified Extensible Firmware Interface) is replacing BIOS (Basic-Input-Output system), if you are using modern hardware you are assuredly using UEFI. If you are interested in reading more about why checkout this excellent article explaining some key differences
Set keyboard layout
If you are using a US layout then you're good no need to worry out this section if not read on:
- First list your options:
- Now set the one you want, here's an example:
Verify boot mode
This command will verify that we will boot in UEFI mode
IF the above directory doesn't exist you are either on old hardware or you have UEFI disabled
Internet connection
TODO add that junk for ethernet being doa
I recommend installing over ethernet if your not then you can connect using wifi-menu
To confirm you're internet works:
If your ethernet is not working then try the following:
Use the number you found earlier to bring up your interface:
Then when it is up run Dhcp to pull an IP from the server:
Now try to ping again
Update System clock
Partition disks
Here is where you will most likely find the most trouble if you are not familiar with partitioning tools such as fdisk I would recommend you watch a video for this part since this really won't change much.
First list your disks
You should see your disk in here mine is called /dev/sda (WARNING do not write to any of these disks unless you know it's the one you want to install Arch on)
Now choose the disk you wish to partition
You should now be in the fdisk utility you can press m
for help
All of our partitions will be GPT partitions so you can press g
when ready
We will be create 3 partitions for the following:
- boot
- root
- home
Boot partition
- Enter
n
(To create new partition) - Enter
ENTER
(For the next available partition) - Enter
ENTER
(To start the first available section) - Enter
+512M
(This is the recommended size for our our boot partition) - Enter
t
(To change the type of the partition to EFI) - Enter
L
(To get a list of all partition types EFI should be 1) - Press
q
(to escape the list) - Enter
1
(To set the type of the partition we just made to EFI)
Root partition
- Enter
n
(To create new partition) - Enter
ENTER
(For the next available partition) - Enter
ENTER
(To start the first available section) - Enter
+15G
(You can increase this if you plan on installing a lot of programs 20G is usually more than enough) - Enter
t
(To change the type of the partition to Linux Root (x86-64)) - Enter
2
(You will now need to specify which partition you are referring to since now there are two or more) - Enter
L
(To get a list of all partition types Linux Root (x86-64) should be 24) - Press
q
(to escape the list) - Enter
24
(To set the type of the partition we just made to Linux Root (x86-64))
Home partition
- Enter
n
(To create new partition) - Enter
ENTER
(For the next available partition) - Enter
ENTER
(To start the first available section) - Enter
ENTER
(Just use the rest of the drive, I would even recommend putting this partition on a separate drive if you have a spare) - Enter
t
(To change the type of the partition to Linux home) - Enter
3
(You will now need to specify which partition you are referring to since now there are two or more) - Enter
L
(To get a list of all partition types Linux home should be 28) - Press
q
(to escape the list) - Enter
28
(To set the type of the partition we just made to Linux home)
Write changes to disk
- Enter
w
Now you can run fdisk -l
to see your newly created partitions
Format the partitions
We have to create 3 file systems here, so let's get started
- Format the EFI partition with:
- Format the Root partition with:
- Format the Home partition with:
Mount the filesystems
You will need to mount sda1, sda2 and sda3, but you will need to mount Root first
- Mount sda2 (Root)
- Mount sda1 (Boot)
- Mount sda3 (Home)
Check mounts are correct
You can run df
to make sure your mounts are in the right place
Install essential packages (and a few others)
Run the following:
If you have an intel processor also include intel-ucode
, for AMD amd-ucode
Configure the system
Fstab
Generate UUIDs for newly created filesystem
You can check that it worked by printing the file:
Chroot
Now you can change root into the new system:
Create a swap file
I'm going to use the varibale X to indicate what your swap size should be
where X is RAM+sqrt(RAM)
Add swapfile to fstab
Add the following to fstab
Open /etc/fstab
Time zone
Set the time zone:
Just search through /usr/share/zoneinfo until you find your nearest City
Run hwclock
:
Localization
Uncommnent en_US.UTF-8 UTF-8
and other needed locales in /etc/locale.gen
, and generate them with:
Create the locale.conf
file, and set LANG variable
Network configuration
Create hostname
file:
Add matching entries to hosts
Root password
Change the root password:
Installing more packages
Here we can install a few more packages for networking and things like man pages
Boot loader
We'll be using grub because it has the biggest presence in the boot loader world
Now let's install our boot loader
Generate our config
You're done
Enter exit
then reboot
Enable internet service
Notes
- arch boot mount to just /boot for windows
- I'll make a windows dual boot if there is interest
- If you dual boot with windows it is strongly recommended to disable Fast Startup