You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trivernis 8d776f1e32 | 12 months ago | |
---|---|---|
README.md | 12 months ago |
README.md
How to install arch on the hp omen
Disk Layout
We're using the following disks
/dev/nvme0n1 - 500GiB m.2 SSD
/dev/sda - 2TB SATA SSD
Partitioning
We're creating three partitions. One EFI, one root and one home partition. The root and home partition are to be encrypted with dm-crypt.
fdisk /dev/nvme0n1
> g # gpt partition table
> n
> <Enter> # starting from the beginning
> +500M # 500 MiB
> t 1 # EFI partition
> n # new partition
> <Enter> #
> <Enter> # use the remaining size of the disk
> w
> q
fdisk /dev/sda
> g
> n
> <Enter>
> <Enter> # use the whole disk
> w
> q
# Create the encrypted root partition
cryptsetup -cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-random luksFormat /dev/nvme0n1p2
# Create the encrypted home partition
cryptsetup -cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-random luksFormat /dev/sda1
# Open the devices
cryptsetup luksOpen /dev/nvme0n1p2 cryptroot
cryptsetup luksOpen /dev/sda1 crypthome
# Create the filesystems
mkfs.fat -F 32 /dev/nvme0n1p1
mkfs.btrfs /dev/mapper/cryptroot
mkfs.btrfs /dev/mapper/crypthome
# mount the partitions in the correpsonding paths
mount /dev/mapper/cryptroot /mnt
mkdir /mnt/boot
mount /dev/nvme0n1p1 /mnt/boot
mkdir /mnt/home
mount /dev/mapper/crypthome /mnt/home
Pacstrap
# install base, kernels, firmware and utils
pacstrap -i /mnt base base-devel linux linux-zen linux-firmware intel-ucode vim nushell
Steps in Chroot
# enter new root
arch-chroot /mnt
Timezone and Time
# Uncomment at least one desired locale
vim /etc/locale.gen
locale-gen
# Use your main locale
echo LANG=en_GB.UTF-8 /etc/locale.conf
export LANG=en_GB.UTF-8
# Timezone info
ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localetime
# Configure hwclock to utc
hwclock --systohc --utc
# Set the keyboard layout
echo KEYMAP=de > /etc/vconsole.conf
Pacman
Open /etc/pacman.conf
and uncomment Color
and ParallelDownlods=5
as well
as the section containing the multilib
repository
Users
# set the root password
passwd
# Add a user (this one is called trivernis)
useradd -m -G wheel -s /bin/nu trivernis
# Change the user's password
passwd trivernis
# Enable the wheel group
EDITOR=/bin/vim visudo # uncomment the corresponding line
Bootloader (systemd-boot)
Add mkinitcpio hooks
# TODO
# Generate initrds
mkinitcpio -P
bootctl install
Create records in /boot/loader/entries/
# arch-zen.conf
title Arch Linux (linux-zen)
linux /vmlinuz-linux-zen
initrd /intel-ucode.img
initrd /initramfs-linux-zen.img
options cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot zswap.enabled=1 intel_pstate=no_hwp rootfstype=btrfs
# arch.conf
title Arch Linux (linux)
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot zswap.enabled=1 intel_pstate=no_hwp rootfstype=btrfs
# arch-fallback.conf
title Fallback Arch Linux (linux)
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux-fallback.img
options cryptdevice=/dev/nvme0n1p2:cryptroot root=/dev/mapper/cryptroot zswap.enabled=1 intel_pstate=no_hwp rootfstype=btrfs
Configure the bootloader with /boot/loader/loader.conf
timeout 2
default arch-zen.conf
console-mode max
Disks
# Create key for /home cryptdevice
mkdir /etc/keys
chmod 700 /etc/keys
dd bs=512 count=4 if=/dev/random of=/etc/keys/crypthome.key iflag=fullblock
chmod 600 /etc/key/crypthome.key
cryptsetup luksAddKey /dev/sda1 /etc/keys/crypthome.key
Edit /etc/cryptab
And add the device with the created key
Networking
# set the hostname
echo archomen > /etc/hostname
# Install the networkmanager
pacman -S networkmanager
systemctl enable NetworkManager.service --now
Bluetooth
# Install packages
pacman -S bluez bluez-utils
# Enable the bluetooth service
systemctl enable bluetooth
Desktop Environment (KDE)
# Install audio support
pacman -S pulseaudio
# install KDE. Choose
# > noto-fonts
# > pipewire-jack
# > wireplumber
# > phonon-qt5-gstreamer
# in the selection prompts
pacman -S sddm plasma plasma-wayland-session xorg-xwayland xdg-desktop-portal-kde plasma-nm plasma-pa kwallet5 kwallet-pam kwalletmanager bluedevil
# Enable sddm on startup
systemd enable sddm
PRIME Offloading
Make sure to remove kms
from the /etc/mkinitcpio.conf
HOOKS section
# Install nvidia drivers
pacman -S linux-headers linux-zen-headers dkms nvidia-dkms prime nvidia-utils lib32-nvidia-utils
Yay
pacman -S git
git clone https://aur.archlinux.org/yay.gi
cd yay
makepkg -si
Swap
See BTRFS Swap
Fonts
# Fira Code
pacman -S ttf-firacode-nerd ttf-fira-code
# CJK characters
pacman -S noto-fonts-cjk
# Vietnamese
pacman -S ttf-hannom
# Emoji
pacman -S noto-fonts-emoji