#Arch Linux installation guide
- See what disk structure there is:
$ lsblk
- Format boot partition:
$ mkfs.ext4 /dev/sda<root>
or use btrfs 😮
$ mkfs.btrfs -L "Arch" /dev/sda1
$ mount /dev/sda1 /mnt
$ btrfs subvolume create /mnt/ROOT
$ umount /dev/sda1
Note that noatime will break some applications like the venerable mutt (unless you use Maildir mailboxes).
$ mount -o ssd,compress=lzo,noatime,subvol=ROOT /dev/sda1 /mnt
$ cd /mnt
$ btrfs subvolume create home
$ btrfs subvolume create root
$ btrfs subvolume create etc
$ btrfs subvolume create mnt
$ btrfs subvolume create opt
$ btrfs subvolume create var
$ btrfs subvolume create tmp
$ btrfs subvolume create boot
- Mount:
$ mount /dev/sda<root> /mnt
$ mkdir /mnt/home
$ mount /dev/sda<home> /mnt/home
- Change mirror for pacman:
$ nano /etc/pacman.d/mirrorlist
- Install base and devel system:
$ pacstrap -i /mnt base base-devel
- Generate fstab and check it:
$ genfstab -U -p /mnt >> /mnt/etc/fstab
$ nano /mnt/etc/fstab
- Chroot to mnt:
arch-chroot /mnt /bin/bash
- Set up locale, for me uncomment en_US UTF-8 in locale.gen:
$ nano /etc/locale.gen
$ locale-gen
- Create locale.conf and export locale:
$ echo LANG=en_US.UTF-8 > /etc/locale.conf
$ export LANG=en_US.UTF-8
- Set Time Zone by linking to time zone info to localtime:
$ ln -s /usr/share/zoneinfo/Egypt /etc/localtime
- Set Hardware Clock to UTC:
$ hwclock --systohc --utc
- Set Hostname:
$ echo adham-pc > /etc/hostname
- Configure Network:
$ systemctl enable dhcpcd.service
- Set root password:
$ passwd
- Create new user that will be sudo:
$ useradd -m -g users -G wheel,video -s /bin/bash adham
- Install sudo with pacman:
$ pacman -S sudo
- Uncomment wheel group from sudoers ”%wheel ALL=(ALL)”, so that user just created can be sudo:
$ visudo
- Set password to created user:
$ passwd adham
- Since we use MBR not GPT lets install GRUB BIOS bootloader:
pacman -S grub-bios
- Install and configure GRUB to /dev/sda:
$ grub-install --recheck /dev/sda
$ grub-mkconfig -o /boot/grub/grub.cfg
- Exit chroot, unmount mounted partitions and reboot:
$ exit
$ umount -R /mnt/home
$ umount -R /mnt
$ reboot
- Install X server:
$ pacman -S xorg-server xorg-server-utils xorg-xinit
- Install mesa for 3D support:
$ pacman -S mesa
- Log or su as created user. Copy .xinitrc and add following content:
$ xinit
$ cp /etc/X11/xinit/xinitrc ~/.xinitrc
$ nano ~/.xinitrc
- Install xterm, xclock twm and awsome:
$ pacman -S awsome vicious xorg-twm xorg-xclock xterm
- Intel graphics
$ pacman -S xf86-video-intel libva-intel-driver nvidia nvidia-utils
- Config awsome:
$ echo "exec awesome" >> ~/.xinitrc
$ mkdir -p ~/.config/awesome/
$ cp /etc/xdg/awesome/rc.lua ~/.config/awesome/ # basic config
or config i3
$ pacman -S i3 dmenu
copy i3 folder in to your .config file
copy i3status.conf in to your home dir and rename it to .i3status.conf
use font awesome to get the status bar icons
font-awesome cheatsheet
https://fortawesome.github.io/Font-Awesome/cheatsheet/
-
Install Laptop touchpad:
$ pacman -S xf86-input-synaptics
-
Update with pacman:
$ pacman -Syu