0% found this document useful (0 votes)
200 views

Archlinux Btrfs-Snapshots Installation Guide

This document provides instructions for installing Arch Linux using BTRFS filesystem with subvolumes and snapshotting capabilities. It outlines the steps to partition and format the disks, install essential packages, configure bootloader, network connectivity and set various system options. Snapshots are enabled using Snapper to easily rollback changes and maintain a timeline of the system states. Configuration files and dotfiles are managed and synced using Git.

Uploaded by

Many Isla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
200 views

Archlinux Btrfs-Snapshots Installation Guide

This document provides instructions for installing Arch Linux using BTRFS filesystem with subvolumes and snapshotting capabilities. It outlines the steps to partition and format the disks, install essential packages, configure bootloader, network connectivity and set various system options. Snapshots are enabled using Snapper to easily rollback changes and maintain a timeline of the system states. Configuration files and dotfiles are managed and synced using Git.

Uploaded by

Many Isla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Archlinux installation guide btrfs snapshots

# loadkeys la-latin1
# setfont Lat2-Terminus16
# ls /sys/class/net

Visible red

IWD
# iwctl --passphrase PASSWORD station wlan0 connect 'Familia Hernández’

Hidden red

WPA-SUPPLICANT
# cat > /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid=”Familia Hernández”
scan_ssid=1
key_mgmt=WPA-PSK
psk=”password”
}
# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
# ping -c3 archlinux.org
# ls /sys/firmware/efi/efivars
# vim /etc/locale.gen
# locale-gen
# export LANG=es_CO.UTF-8
# timedatectl set-ntp true
# lsblk -Spo NAME,MODEL,SIZE,VENDOR,RM
# parted /dev/sda print | egrep "Model|msdos|gpt"
# cfdisk /dev/sda
# lsblk -po NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE /dev/sda

BIOS
# mkfs.ext4 -F -L "boot" /dev/sda5

UEFI
# mkfs.fat -F32 -n "UEFI" /dev/sda5

# mkswap -L "swap" /dev/sda6


# swapon /dev/sda6
# mkfs.btrfs -f -L "root" -n 32k /dev/sda7
# lsblk -po NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE /dev/sda

SUBVOLUMES
# mount /dev/sda7 /mnt
# btrfs subvolume create /mnt/@
# btrfs subvolume create /mnt/@home
# btrfs subvolume create /mnt/@var_log
# btrfs subvolume create /mnt/@var_tmp
# btrfs subvolume create /mnt/@snapshots
# btrfs subvolume list -p /mnt
# umount /mnt

System mounting options


# mount -o noatime,compress=lzo,space_cache,subvol=@ /dev/sda7 /mnt

# mkdir -p /mnt/{boot,home,var/{log,tmp},.snapshots}
# mount /dev/sda5 /mnt/boot

# mount -o noatime,compress=lzo,space_cache,subvol=@home /dev/sda7 /mnt/home


# mount -o noatime,compress=lzo,space_cache,subvol=@var_log /dev/sda7 /mnt/var/log
# mount -o noatime,compress=lzo,space_cache,subvol=@var_tmp /dev/sda7 /mnt/var/tmp
# mount -o noatime,compress=lzo,space_cache,subvol=@snapshots /dev/sda7
/mnt/.snapshots

# lsblk -po NAME,FSTYPE,LABEL,MOUNTPOINT /dev/sda


# reflector --verbose -l 20 --sort rate --save /etc/pacman.d/mirrorlist
# vim /etc/pacman.d/mirrorlist

## Colombia
Server = http://mirrors.udenar.edu.co/archlinux/$repo/os/$arch
# vim /etc/pacman.conf

BIOS
# pacstrap /mnt base base-devel linux linux-lts linux-headers linux-firmware grub
ntfs-3g networkmanager dhcpcd gvfs-mtp gvfs-afc gvfs-gphoto2 vim git grub-btrfs
snapper

UEFI
# pacstrap /mnt base{,-devel} linux{,-firmware} efibootmgr ntfs-3g networkmanager
dhcpcd gvfs-{mtp,afc,gphoto2} vim git grub{,-btrfs} snapper

# pacstrap /mnt os-prober 🡨----------------------------------WINDOWS


# genfstab -U /mnt >> /mnt/etc/fstab
# cat /mnt/etc/fstab
# arch-chroot /mnt
# ln -sf /usr/share/zoneinfo/America/Bogota /etc/localtime
# hwclock -w
# timedatectl set-ntp true
# timedatectl set-local-rtc 0 🡨------------------------------WINDOWS
# vim /etc/locale.gen
# locale-gen
# cat > /etc/locale.conf
LANG=es_CO.UTF-8
# export LANG=es_CO.UTF-8
# locale
# cat > /etc/vconsole.conf
KEYMAP=la-latin1
FONT=Lat2-Terminus16
# echo "arch" > /etc/hostname
# cat >> /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 arch.localdomain arch
# vim /etc/mkinitcpio.conf
# mkinitcpio -P
# passwd

BIOS/Legacy
# grub-install --target=i386-pc /dev/sda

UEFI
# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch

# vim /etc/default/grub
# grub-mkconfig -o /boot/grub/grub.cfg
# useradd -mg users -G audio,storage,video,wheel,lp,power,input -s /bin/bash dakataca
# passwd dakataca
# vim /etc/sudoers

# vim /etc/pacman.conf
# pacman -Syu xdg-user-dirs ttf-{dejavu,hack,roboto,liberation} wqy-microhei
bdf-unifont unicode-character-database noto-fonts-emoji --needed –noconfirm
# xdg-user-dirs-update

AMD
# pacman -S amd-ucode --noconfirm

INTEL
# pacman -S intel-ucode --noconfirm

# systemctl enable {dhcpcd,NetworkManager}.service


# exit
# swapoff -a
# umount -R /mnt
# reboot
# vim /etc/resolv.conf
# chattr +i /etc/resolv.conf

Visible red

IWD
# systemctl enable --now iwd.service
# iwctl --passphrase <PASSWORD> station wlan0 connect ‘Familia Hernández’
NMCLI
# nmcli dev wifi -a connect 'Familia Hernández' password <PASSWORD>

Hidden red
# nmcli c add type wifi con-name "Familia Hernández" ifname wlp2s0 wifi-sec.key-mgmt
wpa-psk ssid "Familia Hernández" wifi-sec.psk <PASSWORD>

# nmcli con up ‘Familia Hernández’


# umount /.snapshots
# rm -r /.snapshots
# snapper -c config create-config /
# /etc/snapper/configs/config

TIMELINE_MIN_AGE="1800"
TIMELINE_LIMIT_HOURLY="5"
TIMELINE_LIMIT_DAILY="7"
TIMELINE_LIMIT_WEEKLY="0"
TIMELINE_LIMIT_MONTHLY="0"
TIMELINE_LIMIT_YEARLY="0"

# systemctl enable --now snapper-timeline.timer


# systemctl enable --now snapper-cleanup.timer
# systemctl enable --now grub-btrfs.path

$ mkdir Git && cd Git/

$ git clone https:/gitlab.com/dakataca/dotfiles.git

$ cd dotfiles/

# source dotfiles.sh

# git checkout -b test origin/test

# git checkout -b dev origin/dev

# source dotfiles.sh

You might also like