SYSTEM CHECKS
-
UEFI boot:
ls /sys/firmware/efi/efivars
-
Internet connection:
ping google.com -c3
-
system clock accuracy:
timedatectl set-ntp true
-
review clock status:
timedatectl status
-
DISK PARTITIONING
-
view all partitions:
fdisk -l # lsblk works too
-
partition the disk:
cfdisk /dev/XXXXXX
-
create the necessary filesystems:
mkfs.fat -F32 /dev/XXXXXX # /boot/efi mkfs.ext4 /dev/XXXXXX # / mkfs.xfs /dev/XXXXXX # /home
BOOTSTRAPPING ARCH LINUX
-
mount the partitions:
mount /dev/XXXXX /mnt # / mkdir -p /mnt/boot/efi mount /dev/XXXXX /mnt/boot/efi # /boot/efi mkdir /mnt/home mount /dev/XXXXX /mnt/home # /home swapon /dev/XXXXX # swap
-
install
base
packages to system:pacstrap -i /mnt base
-
save the filesystem table:
genfstab -U -p /mnt >> /mnt/etc/fstab
POST-BOOTSTRAP OPS
-
change root to new installation:
arch-chroot /mnt
-
set root password:
passwd
-
set up a hostname for your machine:
echo XXXXXXXXXX > /etc/hostname
-
create the locale file:
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen locale-gen echo LANG=en_US.UTF-8 > /etc/locale.conf export LANG=en_US.UTF-8
-
install the bootloader:
pacman -S base mkinitcpio grub efibootmgr os-prober linux-firmware linux XXXXXX-ucode # install microcode for platform CPUs [intel/amd] grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB # install GRUB grub-mkconfig -o /boot/grub/grub.cfg
-
install and enable network manager service for managed internet connectivity:
pacman -S networkmanager systemctl enable NetworkManager systemctl enable systemd-networkd
-
exit and reboot to installed linux:
pacman -S sudo vi exit umount -R /mnt systemctl reboot
-
Disconnect Live USB now
INITIAL CONFIGURATION
-
check internet connectivity:
ping google.com -c3
-
set up your timezone:
rm /etc/localtime ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime timedatectl set-ntp true timedatectl set-local-rtc 1 --adjust-system-clock
-
create a user:
useradd -g users -G wheel,power,storage -m tm9k1 # replace tm9k1 with your username of choice passwd tm9k1 EDITOR=nano visudo
User privilege specification
root ALL=(ALL) ALL
tm9k1 ALL=(ALL) ALL
-
Log out and log in as your normal user.
ESSENTIALS
-
Set up pacman:
sudo pacman -Syu haveged sudo systemctl start haveged sudo systemctl enable haveged sudo rm -fr /etc/pacman.d/gnupg sudo pacman-key --init sudo pacman-key --populate archlinux sudo pacman -S archlinux-keyring sudo pacman -Syuu
-
Set up AUR helper [Arch User Repository]
-
install
yay
, our AUR helper:sudo pacman -S --needed base-devel git wget yajl # Y-A-J-L cd /tmp git clone https://aur.archlinux.org/yay.git && cd yay makepkg -si && cd ..
-
Include AUR repos in pacman conf (for use by AUR helper)
sudo nano /etc/pacman.conf
append this text at the end of the file:
[archlinuxfr] SigLevel = Never Server = http://repo.archlinux.fr/$arch
update the repositories' database
sudo pacman -Syu sudo pacman -Fy
-
-
Get Bluetooth Protocol Stack
sudo pacman -S pulseaudio-bluetooth
-
Get Plasma
sudo pacman -S xorg plasma konsole sudo systemctl enable sddm.service
DRIVERS | OTHER SOFTWARE
-
[DRIVER] [GRAPHICS] [intel]:
sudo pacman -S xf86-video-intel
-
[DRIVER] [GRAPHICS] [nvidia]:
sudo pacman -S nvidia
-
[DRIVER] [WIFI] [broadcom]:
pacman -S broadcom-wl
-
[SOFTWARE] [DOCKER]
sudo pacman -S docker pigz sudo usermod -aG docker $USER sudo systemctl enable docker
-
[SOFTWARE] [ESSENTIALS]
sudo pacman -S nano openssh code \ gwenview kimageformats \ kdeconnect libnotify \ firefox kdialog \ dolphin ffmpegthumbs ntfs-3g kdegraphics-thumbnailers \ ark p7zip unrar lzop lrzip \ telegram-desktop ttf-opensans noto-fonts-emoji\ spectacle yakuake screenfetch \ remmina freerdp \ discord yay -S code-marketplace code-features icu69
TIPS TRICKS TUTORIALS
-
if Wired Ethernet stops working:
nmcli connection show # DELETE ANY EXISITING ETHERNET CONNECTIONS FROM THE LIST nmcli connection add type ethernet nmcli connection up ethernet
-
if you have a ipv6 address on the network but no ipv4 address, try releasing and renewing your IP address
sudo dhclient -r wlp2s0 sudo dhclient wlp2s0
-
Enable MDNS
sudo pacman -S nss-mdns avahi --noconfirm sudo systemctl enable avahi-daemon sudo nano /etc/nsswitch.conf
-
add this piece to the hosts line:
hosts: files mymachines myhostname mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns
-
-
Refresh
pacman
keys after a long time (GPG issues)sudo pacman-key --refresh-keys
Raspberry Pi 4 extras
-
Force HDMI output
hdmi_force_hotplug=1 # hdmi_group=2 # DMT # hdmi_mode=82 # 1080p # hdmi_group=2 # DMT # hdmi_mode=85 # 720p hdmi_group=1 # CEA hdmi_mode=63 # 1080p # hdmi_group=1 # CEA # hdmi_mode=46 # 1080i
-
Add support for GPIO:
sudo groupadd -f -r gpio sudo groupadd -f -r i2c sudo groupadd -f -r spi sudo usermod -aG gpio,spi,i2c `whoami` sudo nano /etc/udev/rules.d/99-gpio.rules
SUBSYSTEM=="bcm2835-gpiomem", KERNEL=="gpiomem", GROUP="gpio", MODE="0660" SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", PROGRAM="/bin/sh -c > 'chown root:gpio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'" SUBSYSTEM=="gpio", KERNEL=="gpio*", ACTION=="add", PROGRAM="/bin/sh -c 'chown root:gpio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'"
sudo pacman -S python-pip sudo pip install wheel sudo CFLAGS="-fcommon" pip install rpi.gpio
Have Fun! o/