Arch Linux Installation UEFI ext4 - LeandroTheDev/arch_linux GitHub Wiki
Load keyboard language
- loadkeys br-abnt2
Connect to the internet (wifi)
- iwctl
- device list
- station wlan0 scan
This will show the intenets in your area.
- station wlan0 get-networks
- station wlan0 connect "INTERNET NAME"
Test internet connectivity
- ping google.com
Update time date (fix inconsistence with online packages and certificates)
- timedatectl set-ntp true
- timedatectl set-timezone America/Sao_Paulo
Partitions
Creating the partition Show a list of available devices
- lsblk
Opens partition, ? means the disk letter
- cfdisk /dev/sd?
Select the disk you wanted The first partition needs 300 MB is the EFI system partition
- 300M / EFI System
The other partition should be the Linux system
- Default / Linux filesystem
Save
- write
- quit
Active the UEFI boot partition (EFI System)
- mkfs.fat -F32 /dev/sd?1
Active linux partition (Linux System)
- mkfs.ext4 /dev/sd?2
Mount the Linux System to install linux inside
- mount /dev/sd?2 /mnt
Download keyring to safely download packages from the repository
- pacman -Sy archlinux-keyring
Use pacstrap command to automatically install inside the /mnt (/dev/sd?2)
- pacstrap -i /mnt base-devel base
linux or linux-zen
linux-firmware vim
Generating file systems table for the Linux System
- genfstab -U /mnt >> /mnt/etc/fstab
Linux should be installed, now you need to login inside as root
- arch-chroot /mnt
Language
- vim /etc/locale.gen
- en_US.UTF-8 -> remove the #
Install the language
- locale-gen
Naming the machine
- vim /etc/hostname
Configuring localhost (to softwares easily resolve the system name)
- vim /etc/hosts
Rembember to use Tab Spaces
127.0.0.1 localhost
::1 localhost
127.0.1.1 machinename.localdomain machinename
Change root password
- passwd
Create user
- useradd -m username
Create user password
- passwd username
Give access to user
- usermod -aG wheel username
Edit visudo to grant previleges to users
- visudo
- In cases the editor for some reason is not set as
vim
- export EDITOR=vim
Remove the #
#%wheel ALL=(ALL) ALL
Download grub as boot manager
- pacman -S grub efibootmgr dosfstools os-prober mtools ntfs-3g
- mkdir /boot/EFI
- mount /dev/sd?1 /boot/EFI
Installing boot loader
- grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
Generating entries
- grub-mkconfig -o /boot/grub/grub.cfg
Script for updating grub
- vim /usr/sbin/update-grub
Add
#!/bin/sh
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"
Update settings
- chown root:root /usr/sbin/update-grub
- chmod 755 /usr/sbin/update-grub
- update-grub
Install a network manager to use internet
- pacman -S networkmanager
- systemctl enable NetworkManager
Finishing installing
- exit umount -R /mnt
- reboot
Configuring Arch Linux
Permanent loadkeys for terminal
- sudo vim /etc/vconsole.conf
Add
KEYMAP=br-abnt2
Load numlock on startup
- sudo vim /usr/local/bin/numlock
Add
#!/bin/bash
for tty in /dev/tty{1..6}
do
/usr/bin/setleds -D +num < "$tty";
done
-
chmod +x /usr/local/bin/numlock
-
sudo vim /etc/systemd/system/numlock.service
Add
[Unit]
Description=numlock
[Service]
ExecStart=/usr/local/bin/numlock
StandardInput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
- sudo systemctl enable numlock
Creating Swap File
- mkswap -U clear --size 4G --file /swapfile
Active Swap
- swapon /swapfile
Add any Entry for Swap File
- sudo vim /etc/fstab
Add
/swapfile none swap defaults 0 0
Connect to the internet (wifi)
- sudo nmcli device wifi connect "INTRNETNAME" password "password"
Active some Librarys for pacman
- sudo vim /etc/pacman.conf
Remove the #
#[multilib]
#Include = /etc/pacman blablablabla
Arch logs when entering
- sudo vim /etc/default/grub
Implement
GRUB_CMDLINE_LINUX="loglevel=2 nowatchdog"
# Remove the hashtag
GRUB_DISABLE_OS_PROBER=false
Disable Stop Job
- sudo vim /etc/systemd/system.conf
Remove the #
DefaultTimeoutStopSec=1s
Reload daemon after changing system.conf
- sudo systemctl daemon-reload
Get Windows in Grub
- sudo vim /etc/default/grub
Freezes and Improvements Workaround
AMD Users
- sudo pacman -S amd-ucode
Intel Users
- sudo pacman -S intel-ucode
Update Grub to run amd-ucode or intel-ucode
- sudo update-grub
- reboot
Finish
- Have Fun