- btrfs root with snapper
- luks encrytpion on root partition
- systemd-boot
- hyprland
- zram + swap
- using dd
sudo dd if=</path/to/arch_iso.img> of=</dev/sdX> bs=4M status=progress oflags=sync
- or just copy iso to a ventoy drive
- ensure its booted in uefi
ls /sys/firmware/efi/efivars
- 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
- Ethernet
- wifi
iwctl
station <adaptor> connect <SSID>
- Partition the disk appropriatly
lsblk # list partitions
Im going to use `/dev/sda` as my starting point
make 2 part
-> efi dir
gdisk Code: `ef00`
FS Type: fat32 (mkfs.fat -F32)
Mount: `/boot/`
-> root part
gdisk Code: <def>
Mount: /
FS Type: btrfs
i will be using luks
cryptsetup --cipher aes-xts-plain64 --hash sha512 --use-random --verify-passphrase luksFormat <device>
YES > pass > verify > will take abit;```
now open the encrypted device
cryptsetup luksOpen mappeer_name[/dev/mapper/]
make FS and mount it
```bash
mkfs.btrfs <encrypted_device>
mount it to /mnt
cd /mnt
btrfs su cr @<subvol_name>
btrfs su li # to list
cd ~
umount /mnt
# now mount the subvol
export sv_opts="rw,noatime,compress-force=zstd:1,space_cache=v2,ssd,noatime,nodiratime,discard=async,subvol=@"
mount /dev/sdaX -o ${sv_opts},subvol=@<name> /mnt/<mount_point>
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
# fix up mirrorlist
pacman -Syy
reflector -c India -a 6 --sort rate --save /etc/pacman.d/mirrorlist
pacman -Syyy
# fix pacman
ParallelDownloads = 15
# pacstrap
pacstrap /mnt base linux-zen linux-zen-headers linux-firmware git neovim amd-ucode wget base-devel btrfs-progs bash-completion htop mandb mlocate networkmanager openssh pacman-contrib pkgfile reflector terminus-font efibootmgr efitools lsd reflector networkmanager zsh sudo
# gen fstab
genfstab -U /mnt >> /mnt/etc/fstab
# finally chroot
arch-chroot /mnt
- generate initramfs
# fix mkinitcpio
nvim /etc/mkinitcpio.conf
# modules add 'btrfs'
# hooks before filesystems add encrypt
# :wq
mkinitcpio -p linux-zen
- time
#disable rtc if its a dual boot or else widnows will mess yp ur linux time
# google it and u will easily find the reason behind it
ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
hwclock --systohc
- hostname
echo 'iris' > /etc/hostname
echo > /etc/hosts <<EOF
127.0.0.1 localhost
::1 localhost
127.0.0.1 iris.localdomain iris
EOF
- locale
export locale='en_US.UTF-8'
sed -i "s/^#\(${locale}\)/\1/" /etc/locale.gen
echo 'LANG=${locale}' > /etc/locale.conf
locale-gen
- env
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
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
- enable service
systemctl enable NetworkManager
systemctl enable reflector.service
systemctl enable bluetooth
systemctl enable sshd
systemctl enable tlp
systemctl enable reflector.timer
systemctl enable fstrim.timer
systemctl enable acpid
- pacman
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 tlp acpi_call
- fix pacman
# for pacman
Color
ILoveCandy
VerbosePkgList
ParallelDownloads = 15
- bootloader
# bootloader time
bootctl --path=/boot install
edit /boot/loader/loader.conf
`
default arch.conf
timeout 0
console-mode max
editor no
`
edit /boot/loader/entries/arch.conf
`
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
-- options cryptdevice=UUID=<UUID-OF-ROOT-PARTITION>:luks:allow-discards root=/dev/mapper/luks rootflags=subvol=@ rd.luks.options=discard rw resume=/dev/mapper/luks resume_offset=<YOUR-OFFSET>
options cryptdevice=UUID=<UUID>:root root=UUID=<mapper_uuid> rootflags=subvol=@ rw resume=UUID=<uuid>
`
add bootflag me `video=1920x1080`
- zram
git clone https://aur.archlinux.org/yay-bin.git
cd git
makepkg -si
yay -S zramd
zramd start
# enable service
# see keys
cryptsetup luksDump <dev>
#mk key
dd if=/dev/random bs=32 count=1 of=<key_loc>
# add key
cryptsetup luksAddKey <dev> <key_loc>
# add in /etc/crypttab
<mapper_dev_name> <dev> <key_loc>
#add in /etc/fstab
<mapper_dev> <mount_loc> <fstype> <opt> <dump> <fsck_pass>
/usr/lib/systemd/systemd/generators/systemd-fstab-generator /run/systemd/generator '' ''
todo
add hyprland install + dots copy
add partition + subvol layout
add swap part