Skip to content

Instantly share code, notes, and snippets.

@aonemd
Last active October 9, 2020 16:30
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aonemd/96fd9bf2e42df4869a099f433c074907 to your computer and use it in GitHub Desktop.
Save aonemd/96fd9bf2e42df4869a099f433c074907 to your computer and use it in GitHub Desktop.
  • Connect to wifi: wifi-menu
  • Partition the disk:
    1. list all disks: fdisk -l
    2. partition the disk: gdisk /dev/disk_name:
    • o: clear all partitions, n: create new partition, p: list partitions, w: save partitions, q: quit
    • create 4 partitions each with their equivalent code for partition type, boot: EF00, system: 8300, home: 8300, and swap: 8200
  • Format the partitions:
    • boot partition: mkfs.vfat /dev/boot_partition_name
    • system and home partitions: mkfs.ext4 /dev/system_partition_name && mkfs.ext4 /dev/home_partition_name
    • swap partition: mkswap /dev/swap_partition_name && swapon /dev/swap_partition_name
  • Mount the partitions:
    • system partition: mount /dev/system_partition_name /mnt
    • mkdir /mnt/boot
    • mkdir /mnt/home
    • boot partition: mount /dev/boot_partition_name /mnt/boot
    • home partition: mount /dev/home_partition_name /mnt/home
  • Install the base system:
    • pacstrap /mnt base base-devel
  • Save the mounted partitions to automount them later: genfstab -U /mnt >> /mnt/etc/fstab
  • Change root into the new system arch-chroot /mnt
  • Setup the bootloader:
    1. bootctl install
    2. add the main entry:
    • cd /boot/loader/entries
    • vi arch.conf and add this:
    title Arch Linux
    linux /vmlinuz-linux
    initrd /intel-ucode.img
    initrd /initramfs-linux.img
    options root=PARTUUID=8cce1cdf-3a6e-4d34-0143e-04305a556409 rw
    
    • get the PARTUUID in vi using :r !blkid, and use the entry of the main system partition (/dev/system_partition_nam2)
    1. add the main config and point to the entry:
    • cd /boot/loader
    • vi loader.conf and add this:
    default arch
    timeout 3
    
  • Setup the system
    1. install these packages: pacman -S sudo vim zsh linux-headers intel-ucode mesa xf86-video-intel
    2. set a password for the root account: passwd
    3. create a new user:
    • useradd -m -a wheel,storage,power -s $(which zsh) your_username
    • chown -R your_username:your_username /home/your_username
    • passwd your_username
    • add the user to the sudoers using visudo and add this line:
    your_username ALL=(ALL) ALL
    
    1. setup the timezone: ln -sf /usr/share/zoneinfo/path/to/city /etc/localtime
    2. sync the hardware clock: hwclock --systohc
    3. setup the system locale:
    • in /etc/locale.gen, uncomment en_US.UTF-8
    • locale-gen
    • in /etc/locale.conf, add LANG=en_US.UTF-8
    1. add a hostname: echo your_computer_name >> /etc/hostname
  • Prepare the desktop:
    1. install a display server (we will use xorg): pacman -S xorg-server xorg-apps xorg-xinit
    2. install a desktop environment or a window manager
  • Install any packages you may need
  • Install trizen to access AUR (this should be done after you reboot and access the system):
    • cd /tmp
    • git clone https://aur.archlinux.org/trizen.git
    • cd trizen
    • makepkg -si
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment