Skip to content

Instantly share code, notes, and snippets.

@PedroZappa
Last active April 4, 2025 20:20
Show Gist options
  • Save PedroZappa/3a366b3b488ec231e6fcb624f8dbcbc5 to your computer and use it in GitHub Desktop.
Save PedroZappa/3a366b3b488ec231e6fcb624f8dbcbc5 to your computer and use it in GitHub Desktop.
Intructions to manually install Arch Linux

Arch Linux Manual Install


Get on a Network

  • Check IP Address Information
ip addr show
  • Connect to WIFI Network (Get IP)
iwctl

Drops you into iwctl's prompt

  • List all available networks (in Ex.: wlon0)
[iwd]# station wlon0 get-networks

Ctrl+C out of iwctl

  • Connect to chosen
iwctl --passphrase "networkPassphrase" station wlon0 connect <network>

Setup Drives

  • Check local drives information
lsblk

Setup Partitions

  • Open chosen device with fdisk partitioniong utility (Ex.: nvme0n1)
fdisk /dev/nvme0n1

Gives Command (m for help): promnpt.

  • Print partition layout
p
  • Create empty partition table
g
  • Create new partition (boot)
n

Set: Default, Default, +1G Accept: y

  • Create new partition (EFI)
n

Set: Default, Default, +1G Accept: y

  • Create new partition (SWAP)
n

Set: Default, Default, +34G (System RAM + 2 GB) Accept: y

  • Create new partition (/)
n

Set: Default, Default, Default Accept: y

  • Save and exit fdisk
w

Format Partitions

  • Format boot partition
mkfs.fat -F32 /dev/nvme0n1p1
  • Format EFI partition
mkfs.ext4 /dev/nvme0n1p2
  • Format SWAP partition
mkfs.ext4 /dev/nvme0n1p3
mkswap /dev/nvme0n1p3 
swapon /dev/nvme0n1p3
  • Format / partition
mkfs.ext4 /dev/nvme0n1p3

Install Kernel Modules

  • Get Advanced Storage Configuration support (just to be safe)
modprobe dm_mod

Mount Partitions

Handle / (root)

  • Mount / (root)
mount /dev/nvme0n1p3 /mnt

Handle boot

  • Create /mnt/boot/ directory
mkdir /mnt/boot
  • Mount boot
mount /dev/nvme0n1p2 /mnt/boot

Install Minimal Required Packages

pacstrap -i /mnt base

Generate fstab file

Tell the file system filesystems to mount

genfstab -U /mnt >> /mnt/etc/fstab
  • To check the current filesystems
cat /mnt/etc/fstab

Log into Arch Linux installation

arch-chroot /mnt

Set root password

passwd

Create user (ex.: zedro) & set user password

useradd -m -g users -G wheel zedro
passwd zedro

Get User Aditional Packages

pacman -S base-devel dosfstools grub efibootmgr gnome gnome-tweaks mtools vim git firefox networkmanager openssh sudo 

Get Linux Kernels (bleeding edge & lts)

pacman -S linux linux-headers linux-lts linux-lts-headers

Get Optional Firmware (Recommended)

pacman -S linux-firmware

Setup Video Card Driver (Ex.: NVidia)

pacman -S nvidia nvidia-utils nvidia-lts

Generate Kernel Utils

mkinitcpio -p linux     # for bleeding-edge kernel
mkinitcpio -p linux-lts # for lts kernel

Set Locale Information

vim /etc/locale.gen

Uncomment the desired local UTF-8 option

Generate Selected Locale

locale-gen

Setup EFI Partition

mkdir /boot/EFI
mount /dev/nvme0n1p1 /boot/EFI

Setup GRUB

Install GRUB

grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck

Setup boot Directory

cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

Generate GRUB configuration file

grub-mkconfig -o /boot/grub/grub.cfg

Enable Services

Enable OpenSSH

systemctl enable sshd

Enable gdm

systemctl enable gdm

Enable Network Manager

systemctl enable NetworkManager

Finish & Reboot

exit      # Leave chroot
umount -a # Unmount
reboot    # Reboot system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment