draft: arch linux install
All checks were successful
ci/woodpecker/push/deploy Pipeline was successful
ci/woodpecker/cron/deploy Pipeline was successful

This commit is contained in:
Felipe M 2025-03-09 18:51:55 +01:00
parent 1e0b18dba0
commit c1e01d07ff
Signed by: fmartingr
GPG key ID: CCFBC5637D4000A8

View file

@ -23,10 +23,10 @@ timedatectl set-timezone Europe/Madrid
# fdisk ...
# Prepare the filesystems and the luks encryption
mkfs.vfat -F32 /dev/nmve0n1p0
mkswap /dev/nmve0n1p1
mkfs.vfat -F32 /dev/nmve0n1p1
mkswap /dev/nmve0n1p2
cryptsetup luksFormat /dev/nvme0n1p2 # Password here
cryptsetup open /dev/nvme0n1p2 luks
cryptsetup open /dev/nvme0n1p3 luks
mkfs.btrfs -L btrfs /dev/mapper/luks
# Prepare the btrfs partition
@ -38,19 +38,19 @@ btrfs subvolume create home
btrfs subvolume create snapshots
# Mount everything under /mnt
mkdir /mnt/{home,boot}
mount -o subvol=root,compress=lzo /dev/mapper/luks /mnt
mkdir /mnt/{home,boot}
mount -o subvol=home,compress=lzo /dev/mapper/luks /mnt/home
mount /dev/nvme0n1p0 /mnt/boot
mount /dev/nvme0n1p1 /mnt/boot
# Run pacstrap with several base packages:
pacstrap /mnt \
base \
linux-lts linux-firmware \
intel-ucode \
terminus-font \ # Fonts in vconsole
terminus-font \ # Font in vconsole
man-db man-pages \ # Man pages
iwd sudo vim NetworkManager # Utilities
iwd sudo vim networkmanager # Utilities
# Generate the /etc/fstab file
genfstab -L /mnt >> /mnt/etc/fstab
@ -76,7 +76,7 @@ locale-gen
echo 'LANG=en_US.UTF-8' > /etc/locale.conf
# Setup keymap and font
echo 'KEYMAP=us\nFONT=ter-232n' > /etc/vconsole.conf
printf "KEYMAP=us\nFONT=ter-232n\n" > /etc/vconsole.conf # Not installing terminus-font
pacman -S physlock # To allow locking the computer when in VConsole
# Setup the computer hostname
@ -99,7 +99,7 @@ mkinitcpio -p linux-lts
bootctl --path=/boot install
# Create the bootloader entry for Arch
LUKS_UUID=$(cryptsetup luksUUID /dev/nvme0n1p2)
LUKS_UUID=$(cryptsetup luksUUID /dev/nvme0n1p3)
cat >/boot/loader/entries/arch.conf <<EOL
title Arch Linux (LTS)
linux /vmlinuz-linux-lts
@ -127,6 +127,13 @@ systemctl enable --now NetworkManager
# Connect to wifi if required
nmcli d wifi connntect <ssid> password <pass>
# Install and enable ssh
pacman -S openssh
vim /etc/ssh/sshd_config
# Allow root login with password if needed:
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
systemctl enable --now sshd
# Setup hibernate
# Get the swap disk UUID (double check manually)
sudo blkid | grep swap | sed -rn 's/^.* UUID=\"([a-z0-9\-]+)\".*$/\1/p'
@ -138,7 +145,7 @@ vim /boot/loader/entries/arch.conf
# Systemd should check automatically for the swap partition on GPT tables [1]
# Setup suspend-then-hibernate
vim /etc/systemd/login.conf
vim /etc/systemd/logind.conf
# My enabled options:
# HandlePowerKey=suspend-then-hibernate
# HandleLidSwitch=suspend-then-hibernate
@ -203,6 +210,7 @@ pacman -S brightnessctl
```
pacman -S otf-ipafont # Japanese
pacman -S ttf-bitstream-vera # Default
pacman -S ttf-jetbrains-mono ttf-jetbrains-mono-nerd
```
## Userspace