This is my personal guide for a minimal installation of arch linux
Note
I'm newbie in linux so this is so explanatory for me
[[#About|About]]
- [[#1. Prerequesites|1. Prerequesites]]
- [[#2. Pre-installation|2. Pre-installation]]
- [[#2. Pre-installation#2.1 Prepare Installation medium|2.1 Prepare Installation medium]]
- [[#2. Pre-installation#2.2 Boot the live enviroment|2.2 Boot the live enviroment]]
- [[#3. First steps: Basic Stuff|3. First steps: Basic Stuff]]
- [[#3. First steps: Basic Stuff#3.1 Keyboard|3.1 Keyboard]]
- [[#3. First steps: Basic Stuff#3.2 Internet Connection|3.2 Internet Connection]]
- [[#3. First steps: Basic Stuff#3.3 Update system clock|3.3 Update system clock]]
- [[#3. First steps: Basic Stuff#3.4 verify drivers and boot mode|3.4 verify drivers and boot mode]]
- [[#4. partition, format and mount your disks|4. partition, format and mount your disks]]
- [[#4. partition, format and mount your disks#4.1 Create your partition scheme|4.1 Create your partition scheme]]
- [[#4.1 Create your partition scheme#Old Scheme (Windows + arch)|Old Scheme (Windows + arch)]]
- [[#4.1 Create your partition scheme#New Scheme (Only Arch)|New Scheme (Only Arch)]]
- [[#4. partition, format and mount your disks#4.2 Format|4.2 Format]]
- [[#4. partition, format and mount your disks#4.3 Mount|4.3 Mount]]
- [[#4. partition, format and mount your disks#4.1 Create your partition scheme|4.1 Create your partition scheme]]
- [[#5. Install packages|5. Install packages]]
- [[#5. Install packages#5.1 Rank Mirrors|5.1 Rank Mirrors]]
- [[#5. Install packages#5.2 Install base packages|5.2 Install base packages]]
- [[#6. Configure the System|6. Configure the System]]
- [[#6. Configure the System#6.1 gen the fstab file|6.1 gen the fstab file]]
- [[#6. Configure the System#6.2 chroot|6.2 chroot]]
- [[#6. Configure the System#6.3 Timezone|6.3 Timezone]]
- [[#6. Configure the System#6.4 set locales|6.4 set locales]]
- [[#6. Configure the System#6.5 manage system users|6.5 manage system users]]
- [[#6. Configure the System#6.6 set the host name (name of your pc)|6.6 set the host name (name of your pc)]]
- [[#7. Install bootloader (grub)|7. Install bootloader (grub)]]
- [[#7. Install bootloader (grub)#7.1 for a windows multi-boot system|7.1 for a windows multi-boot system]]
- [[#8. Install Graphincs Drivers|8. Install Graphincs Drivers]]
- [[#8. Install Graphincs Drivers#11. Active some services|11. Active some services]]
- [[#12. Exit from the installation an reboot|12. Exit from the installation an reboot]]
- [[#13. Post installation|13. Post installation]]
- [[#13. Post installation#13.1 display server|13.1 display server]]
- [[#13. Post installation#13.2 Install your desktop enviroment (de) or window manager (wm)|13.2 Install your desktop enviroment (de) or window manager (wm)]]
- [[#13. Post installation#13.3 Additional packages|13.3 Additional packages]]
- [[#13. Post installation#14. Post installation|14. Post installation]]
- [[#13. Post installation#Credits|Credits]]
- Disable Secure Boot. It can be enabled after installation
- Disable Fast Boot
- Disable Hibernation.
- If You are dual booting. Check if the EFI or the boot partition of windows is more than 100MB as it may cause problems.
- Install the Latest Arch-Linux ISO file from Arch (https://archlinux.org/download/)[ISO]
- Burn it into a usb
- You can use Balena Etcher, Rufus if you are on windows. If you are on Arch read the arch wiki to create an Arch USB USB flash installation medium
- Plug the USB into a USB port and go into the BIOS by smashing that F2 or F12 or Del button and change the boot priority so that the Arch USB is on number 1. Save and Exit
You will be logged in on the first virtual console as the root user
- Set the keymap
loadkeys es
- Set your Keyboard Layout. Example for latin-american-spanish layout
localectl set-keymap la-latin1
Ensure your network interface is listed and enabled
ip link
- For wireless and WWAN, make sure the card is not blocked with rfkill.
- Ethernet—plug in the cable.
- Wi-Fi—authenticate to the wireless network using iwctl.
$ iwctl
[iwd]# device list
[iwd]# station device scan
[iwd]# station device get-networks
[iwd]# station device connect SSID
[iwd]# exit
Check if it is connected by pinging a website
ping -c 1 gnu.org
Example for Colombia
timedatectl set-timezone "America/Bogota"
ls /sys/firmware/efi/efivars/
cat /sys/firmware/efi/fw_platform_size
I recommend you to use gparted throughout the gparted distro live usb to partition your disks, especially when you're dealing with multiple os in your pc
other alternative is to partition your disk running cfdisk
command
There are many partitions schemes that you can use as reference, you should google for a scheme that fit with your needs. In my case i'm working with the following scheme: (output of lsblk
command)
you should check the space for your swap partition accordingly with your hardware specs (google it)
Note
The scheme right below is for dual boot (windows + arch, sdb is and ssd and sda is an hdd)
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 871.1G 0 part /home
├─sda2 8:2 0 8G 0 part [SWAP]
└─sda3 8:3 0 52.4G 0 part /
sdb 8:16 0 223.6G 0 disk
├─sdb1 8:17 0 100M 0 part /boot/efi
├─sdb2 8:18 0 16M 0 part
├─sdb3 8:19 0 223G 0 part
└─sdb4 8:20 0 512M 0 part
where:
sda1
is my/home
partsda2
is myswap
partsda3
is my/
(root) partitionsdb1
is the where in installed thegrub
- Other sdb* partitions are for windows
Update, I have removed Windows, leaving arch linux as my unique os, the my partitions now looks like this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 931.5G 0 disk
└─sda1 8:1 0 931.5G 0 part /home
sdb 8:16 0 223.6G 0 disk
├─sdb1 8:17 0 100M 0 part /boot/efi
├─sdb2 8:18 0 157.5G 0 part /home/jfmonsa/Desktop/extstorage
├─sdb3 8:19 0 16G 0 part [SWAP]
└─sdb4 8:20 0 50G 0 part / 8:0 0 931.5G 0 disk
- sda is hhd, sdb is ssd
mkfs.ext4 /dev/sda1 #for /home
mkfs.ext4 /dev/sda3 #for root ( / )
#swap format
mkswap /dev/sda2
swapon /dev/sda2
mount /dev/sda3 /mnt #mount root partition
mount /dev/sda1 /mnt/home #mount /home partition
If we are in a multiple-os pc , don't format the /boot/efi partition. only mount it
mkdir -p /mnt/boot/efi
mount /dev/sdb1 /mnt/boot/efi
-
Archlinux uses servers to get the packages we need to install. Having good mirrors means packages install faster as well may prevent packages from out of date due to server being out of sync
-
Create a backup of your current mirrorlist
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
- Get the fastest mirrors for you
pacman -Sy
pacman -S pacman-contrib
rankmirrors -n 10 /etc/pacman.d/mirrorlist.bak > /etc/pacman.d/mirrorlist
$ pacstrap -K /mnt base linux linux-firmware linux-headers base-devel vim git dhcpcd man
If you need add the following packages
- For wireless:
networkmanager wpa_supplicant network-manager-applet
- For Bluetooth:
bluez bluez-utils
- For intel CPU:
intel-ucode
- For amd CPU:
amd-ucode
generate and fstab file that contains our UUID(house address) of our drives.
genfstab -U /mnt >> /mnt/etc/fstab
Change the root to your new system
run arch-chroot /mnt
#To show all Regions
ls /usr/share/zoneinfo/
# To show cities example with canada
$ ls /usr/share/zoneinfo/Canada/
# Replace Region with Country and city with city
$ ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
$ hwclock --systohc
vim /etc/locale.gen
search your language and uncomment in my case I uncommented the lines en_US.UTF-8
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
#set root password
passwd
#create a normal (non-super-user) replace with your preferred user name
useradd -m user_name
ls -l /home
passwd user_name #password for the prev user
usermod -aG wheel user_name #adding user to groups
# is the same as edit sudoers
# Uncomment %wheel ALL=(ALL:ALL) ALL
# Also add Defaults timestamp_timout=0 // just prompts user to type password again after a long time
visudo
in my case my hostname is main-pc
echo main-pc > /etc/hostname
cat /etc/hostname
then edit the file /etc/hosts
vim /etc/hosts
add the following lines:
127.0.0.1 localhost
::1 localhost
127.0.1.1 Archfish.localdomain localhost
Note
if you're working with a multi-distro pc (several linux distros), dont install the grub, only run grub-update
in the other main distro
Note
os-prober only if you are dual booting with windows
pacman -S grub efibootmgr dosfstools mtools os-prober
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
grub-mkconfig -o /boot/grub/grub.cfg
install os-prober
the edit the following file vim /etc/default/grub
and uncomment the following line
#GRUB_DISABLE_OS_PROBER=false
sudo pacman -S networkmanager wpa_supplicant dhcpcd
systemctl enable dhcpcd.service
systemctl enable NetworkManager.service
# optional
systemctl enable wpa_supplicant.service
exit #exit from chroot
umount -lR /mnt
reboot
To have a graphical enviroment you must install a display manager, the most common option is xorg
, but there is other much interesting project called wayland
which is a very new project with little support
to install xorg:
set-keymap la-latin1 # set keyboard again xd
pacman -Sy archlinux-keyring && pacman -Su # solve some isues with pacman
sudo pacman -Syu # update your system
sudo pacman -S xorg-apps xorg-server xorg-xinit
sudo pacman -S gnome gdm #install your display manager, you could use the more customizable lightdm
sudo systemctl enable gdm
sudo pacman -S awesome
I'm currently using awesomewm
as my wm but you can use whatever you want.
list of de's:
- gnome, kde, lxqt, lxde
list's of window managers:
- awesomewm (beginners) (hyper-customizable)
- qtile (beginners)
- bspwm (hyper-customizable)
- i3 (hyper-customizable)
- sway (i3 for wayland)
- xmonad (written in Haskell)
- dwm
read this to get an idea of what a wm is
See my guide about post installation programs
- I Updated this personal guide base on https://github.com/QuantiniumX/Guide-to-install-Arch-Linux