Experience the thrill ! systemd-boot looks less bloated than grub while graphically horrible
Machine has 2 hard drives:
The concept will be to put all system on sda and and data/VMs on sdb
Dowload ISO
On the live system,
systemctl start sshd.service
passwd
ip a
On a second PC, connect to the live system via SSH:
ssh root@<IP-OF-THE-LIVE-SYSTEM>
A very simple setup:
Adapt if you have only one drive with full Linux install like:
gdisk /dev/sda # tout sda en linux o [enter] n[enter] [enter x 4] w [enter]
gdisk /dev/sdb
Command (? for help): o
Command (? for help): n [enter] Partition number (1-128, default 1):[enter] First sector (34-500118158, default = 2048) or {+-}size{KMGTP}:[enter] Last sector (2048-500118158, default = 500118158) or {+-}size{KMGTP}: +550M Hex code or GUID (L to show codes, Enter = 8300): EF00
(choose size 550M and hex code EF00):
Command (? for help): n Partition number (2-128, default 2): [enter] First sector (34-500118158, default = 1128448) or {+-}size{KMGTP}:[enter] Last sector (1128448-500118158, default = 500118158) or {+-}size{KMGTP}: +10G[enter] Hex code or GUID (L to show codes, Enter = 8300): 8200 [enter]
Select default values
Command (? for help): n [enter] Partition number (3-128, default 3): [enter] First sector (34-500118158, default = 22099968) or {+-}size{KMGTP}: [enter] Last sector (22099968-500118158, default = 500118158) or {+-}size{KMGTP}: [enter] Hex code or GUID (L to show codes, Enter = 8300): [enter]
Command (? for help): w
mkfs.vfat -F32 -n EFI /dev/sdb1 ## if not already existing mkswap -L SWAP /dev/sdb2 # Adapt if necessary mkfs.btrfs -L ROOT /dev/sdb3 # Adapt if necessary mkfs.btrfs -L HOME /dev/sda1
# Adapt if necessary mount /dev/sdb3 /mnt btrfs sub create /mnt/@ btrfs sub create /mnt/@pkg btrfs sub create /mnt/@snapshots btrfs sub create /mnt/@btrfs umount /mnt mount /dev/sda1 /mnt btrfs sub create /mnt/@home umount /mnt
mount -o noatime,nodiratime,compress=zstd,space_cache,ssd,subvol=@ /dev/disk/by-label/ROOT /mnt mkdir -p /mnt/{boot,home,var/cache/pacman/pkg,.snapshots,btrfs} #mount -o noatime,nodiratime,compress=zstd,space_cache,ssd,subvol=@home /dev/disk/by-label/ROOT /mnt/home mount -o noatime,nodiratime,compress=zstd,space_cache,ssd,subvol=@home /dev/disk/by-label/HOME /mnt/home mount -o noatime,nodiratime,compress=zstd,space_cache,ssd,subvol=@pkg /dev/disk/by-label/ROOT /mnt/var/cache/pacman/pkg mount -o noatime,nodiratime,compress=zstd,space_cache,ssd,subvol=@snapshots /dev/disk/by-label/ROOT /mnt/.snapshots mount -o noatime,nodiratime,compress=zstd,space_cache,ssd,subvolid=5 /dev/disk/by-label/ROOT /mnt/btrfs
mount /dev/sdb1 /mnt/boot # Adapt if necessary swapon /dev/sdb2 # Adapt if necessary
Install Arch Linux with (adjust this list to your needs):
pacstrap /mnt linux base base-devel btrfs-progs intel-ucode vim linux-firmware dhcpcd networkmanager
Optional, for über security If Multibooting… Microsoft creates a 100MB EFI partition so you cannot have 20 linux kernel…)
Second warning
some modules need recompiling (acpi_call/tpacpi-bat):
pacstrap /mnt linux-hardened base base-devel btrfs-progs intel-ucode vim linux-firmware dhcpcd networkmanager
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt/
echo <YOUR-HOSTNAME> > /etc/hostname
echo LANG=en_US.UTF-8 > /etc/locale.conf
Uncomment the following appropriates locales in /etc/locale.gen
en_US.UTF-8
locale-gen
echo KEYMAP=us-acentos > /etc/vconsole.conf echo FONT=lat9w-16 >> /etc/vconsole.conf
ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime
#<ip-address> <hostname.domain.org> <hostname> 127.0.0.1 <YOUR-HOSTNAME>.localdomain <YOUR-HOSTNAME>
Configure the creation of initramfs by editing /etc/mkinitcpio.conf.
Change the line HOOKS=… to:
HOOKS=(base keyboard udev autodetect modconf block keymap btrfs filesystems)
mkinitcpio -p linux
bootctl --path=/boot install
Create file /boot/loader/entries/arch.conf and fill it with:
title Arch Linux linux /vmlinuz-linux initrd /intel-ucode.img initrd /initramfs-linux.img options root="LABEL=ROOT" rootflags=subvol=@ rw
Edit file /boot/loader/loader.conf and fill it with:
default arch.conf timeout 4 console-mode max #editor no
Exit chroot, unmount partitions and reboot:
passwd exit umount -R /mnt reboot
If you forgot dhcpcd… like I did first time:
ip addr add 192.168.1.116/24 dev enp0s25 ip link set enp0s25 up ip route add 192.168.1.0/24 via 192.168.1.1 dev ens0p25 echo "nameserver 192.168.1.1">> /etc/resolv.conf
pacman -S linux-firmware
To know the module:
lspci -k
Set the interface up
ip link set wlp3s0 up
Isn't that a beautiful name? so romantic and of course more simple than eth0…. Thank you Lenard
systemctl enable --now NetworkManager
If you don't want NetworkManager
systemctl enable dhcpcd@enp0s25
Start building and installing nice stuff
pacman -Sy yay git zsh htop openssh man-pages
vi /etc/pacman.conf
See: [[https://man.archlinux.org/man/pacman.conf.5| man 5 pacman.conf]
Remove the “#” in front of the line
#Color
curl -LO larbs.xyz/larbs.sh sh larbs.sh
FAILOVER method:
git clone https://github.com/LukeSmithxyz/LARBS.git cd LARBS sh larbs.sh
yay -S tp-battery-mode
Config
vi /etc/tp-battery-mode.conf
START_THRESHOLD=85 STOP_THRESHOLD=100
Enable
systemctl enable tp-battery-mode
systemctl start tp-battery-mode
pacman -S acpi acpid tpacpi-bat systemctl enable --now acpid
Then add
vm.laptop_mode = 5
in /etc/sysctl.d/laptop.conf
From aur
yay laptop-mode-tools systemctl enable --now laptop-mode
pacman -Sy i7z thermald cpupower systemctl enable --now thermald systemctl enable --now cpupower acpi -i -b
vi /etc/default/cpupower
Uncomment #ondemand
Fn+F8/F9 works when adding
acpi_backlight=vendor
to /boot/loader/entries/arch.conf
pacman -S firewalld systemctl enable --now firewalld
This requires a SWAP partition/file
resume="PARTLABEL=SWAP"
DOESN'T WORK
resume=UUID=8e3dfb9c-a8df-4312-9a7f-bf82120fb0ab
in /boot/loader/entries/arch.conf
HOOKS=(base udev autodetect modconf block keymap btrfs resume filesystems)
in /etc/mkinitcpio.conf then </code bash>mkinitcpio -P</code>
journalctl -p 3 -xb
pacman -S bluez bluez-utils modprobe btusb systemctl enable --now bluetooth yay bcm20702a bluetoothctl
systemctl disable systemd-timesyncd
pacman -S chrony
Uncomment / change iburst to offline
server 0.arch.pool.ntp.org offline server 1.arch.pool.ntp.org offline server 3.arch.pool.ntp.org offline
systemctl enable --now chronyd chronyc chronyc> online 200 OK chronyc> exit
curl -O https://blackarch.org/strap.sh chmod +x strap.sh sudo ./strap.sh
pacman -S cups cups-pdf systemctl enable --now cups
pacman -S alsa-utils alsa-plugins alsamixer speaker-test -c 2
check if suspend works on hardened linux + if reboot works after no more batteries → 5% → hibernate rule etc,,,
ccze libreoffice discord irssi newsflash kitty zsh-* starship
cpufreq ?
MISSING: backlight on battery
if using larbs:
vi ~/.local/bin/remaps
add
setxkbmap -layout us -variant intl