i've written this on obsidian so the format may be a bit weird on github
- set font
setfont ter-124n
all fonts can be found in /usr/share/kbd/consolefonts/
- check internet
ip a
ping google.com -c 2
- Update system clock
timedatectl set-ntp true
timedatectl status
- Partition the disk appropriatly
lsblk # list partitionss
#im doing to use /dev/sda as my starting point
cfdisk # use cfdisk to make a single partition spanning whole disk
mkfs.btrfs /dev/sda1 # mount
- Making subvolumes
DISK LAYOUT
/dev/sda
|-> @ -> /
|-> @home -> /home
|-> @snapshots -> /.snapshots
|-> @cache -> /var/cache
|-> @tmp -> /var/tmp
|-> @log -> /var/log
|-> @swap -> /.swap
mount /dev/sda1 /mnt # mount disk
cd /mnt # to make it easier to type
btrfs subvolume create @
btrfs subvolume create @home
btrfs subvolume create @snapshots
btrfs subvolume create @swap
btrfs subvolume create @cache
btrfs subvolume create @tmp
btrfs subvolume create @log
cd ~ # important or it will keep the disk busy
umount /mnt
- Mounting SubVolumes
export M_OPT="noatime,space_cache=v2,compress=zstd,ssd,discard=async"
mount -o ${M_OPT},subvol=@ /dev/sda /mnt
mkdir -p /mnt/{home,var/cache,var/tmp,var/log,.snapshots,.swap}
mount -o ${M_OPT},subvol=@home /dev/sda /mnt/home
mount -o ${M_OPT},subvol=@snapshots /dev/sda /mnt/.snapshots
mount -o ${M_OPT},subvol=@swap /dev/sda /mnt/.swap
mount -o ${M_OPT},subvol=@tmp /dev/sda /mnt/var/tmp
mount -o ${M_OPT},subvol=@cache /dev/sda /mnt/var/cache
mount -o ${M_OPT},subvol=@log /dev/sda /mnt/var/log
- Enabling Swap On BTRFS Without Additional Partitions
cd /.swap
truncate -s 0 ./swapfile
chattr +C ./swapfile
dd if=/dev/zero of=./swapfile bs=1M count=<FILE-SIZE-IN-MiB> status=progress
chmod 600 ./swapfile
mkswap ./swapfile
swapon ./swapfile
- install base/essential packages
pacman -Syy
reflector -c India -a 6 --sort rate --save /etc/pacman.d/mirrorlist
pacman -Syyy
pacstrap /mnt base base-devel linux-zen linux-firmware neovim git intel-ucode btrfs-progs bash-completion htop mandb mlocate networkmanager openssh pacman-contrib pkgfile reflector sudo terminus-font
- Generate Fstab And Chroot Into System
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
hwclock --systohc
echo 'iris' > /etc/hostname
echo > /etc/hosts <<EOF
127.0.0.1 localhost
::1 localhost
127.0.0.1 iris.localdomain iris
EOF
export locale='en_US.UTF-8'
sed -i "s/^#\(${locale}\)/\1/" /etc/locale.gen
echo 'LANG=${locale}' > /etc/locale.conf
locale-gen
or manually do it with nvim
echo 'FONT=ter-124n' > /etc/vconsole.conf
#optional
echo 'KEYMAP=colemak' >> /etc/vconsole.conf
echo 'EDITOR=nvim' > /etc/environment
echo 'VISUAL=nvim' >> /etc/environment
passwd # to change the root passwd
useradd -m -G wheel felix
passwd felix
sed -i "s/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/" /etc/sudoers
systemctl enable NetworkManager
systemctl enable reflector.service
# edit appropriatly
MODULES=(btrfs)
HOOKS=(base udev keyboard autodetect keymap consolefont modconf block btrfs filesystems resume fsck)
after editing /etc/mkinitcpio.conf
mkinitcpio -P linux-zen
pacman -S grub
grub-install --target=i386-pc /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
pacman -S --needed linux-zen-headers network-manager-applet mtools dialog reflector xdg-user-dirs xdg-utils inetutils bluez bluez-utils bash-completion openssh rsync alsa-utils pipewire pipewire-alsa pipewire-pulse pipewire-jack
systemctl enable bluetooth
exit # exit arch-chroot
cd
umount -R /mnt
systemctl --failed
journal -p 3 -xb
echo "felix ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/sudoer_felix
Color
ILoveCandy
VerbosePkgList
ParallelDownloads = 15
sudo pacman -Syu
yay -S zramd
zramd start
systemctl enable zramd.service
sudo pacman -S mlocate
sudo updatedb
sudo systemctl enable fstrim.timer
git clone https://aur.archlinux.org/yay-git.git
cd yay-git
makepkg -si
yay -S timeshift \
timeshift-autosnap