Link to this headingArch Linux Tips

Link to this headingMac stuff

https://loicpefferkorn.net/2015/01/arch-linux-on-macbook-pro-retina-2014-with-dm-crypt-lvm-and-suspend-to-disk/
https://mchladek.me/post/arch-mbp/

Link to this headingInstallation

Better InitFS

Make Bootable USB:

sudo dd bs=4M if=/path/to/arch.iso of=/dev/sdx

Setup Installer:

#Launch Archlinux ios #install ssh pacman -Sy openssh #Change password passwd #Copy Install scripts scp -r arch-install/ [email protected]:/root/ #Run Stage 1 cd /root/arch-install && ./install.sh #Chroot and install stage 2 ./010-copy-scripts.sh && arch-chroot /mnt cd /root/arch-install && ./install.sh --stage2

Install List:

#Generate List of installed packages pacman -Qqen > pkglist.txt #Install List of packages pacman -S - < pkglist.txt

Link to this headingRecover from bad boot

Mount encrypted Drive:

cryptsetup open /dev/sda3 root mount /dev/mapper/lvm-root /mnt arch-chroot /mnt mount /sda1 /boot bootctl update

Link to this headingUpdate microcode

Install Intel Package:

yay install intel-ucode

Update Bootloader:

>>> cat /boot/loader/entries/arch-mac-enc-lvm.conf title ArchLinux Encrypted linux /vmlinuz-linux-macbook initrd /intel-ucode.img initrd /initramfs-linux-macbook.img options cryptdevice=UUID=df915784-8700-4718-a4d9-7112e6bb7fbf:root root=/dev/mapper/lvm-root quiet rw hid_apple.iso_layout=0 libata.force=noncq resume=/dev/mapper/lvm-swap processor.ignore_ppc=1

Link to this headingEnable Hibernation

Enable Swap space:

sudo swapon --show # or `cat /proc/swaps` sudo swapoff -a sudo fallocate -l <SIZE>G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile sudo swapon --show # to verify changed size

Get UUID:

sudo swap-offset /swapfile > <OFFSET> sudo findmnt -no SOURCE,UUID -T /swapfile > <UUID>

Update GRUB:

#Update /etc/default/grub `GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=<UUID> resume_offset=<OFFSET>"` # Create /etc/initramfs-tools/conf.d/resume sudo update-grub sudo update-initramfs -u -k all

Link to this headingWayland

Full Wayland Setup on Arch Linux

https://github.com/swaywm/sway/wiki/i3-Migration-Guide
https://github.com/Alexays/Waybar/wiki/Examples

MOZ_ENABLE_WAYLAND=1

Link to this headingOld Installer

#Create parted mklabel gpt parted mkpart primary 1MB 2048MB parted mkpart primary 2048MB 100% parted print #Create encrypted volume cryptsetup --batch-mode --verbose --type luks2 --pbkdf argon2id --hash sha512 --iter-time 1000 --use-urandom luksFormat /dev/sda2 cryptsetup luksOpen /dev/sda2 crypt #Create lvm swap and root pvcreate /dev/mapper/crypt vgcreate lvm /dev/mapper/crypt lvcreate -n swap -L 32GB lvm lvcreate -n root -l 100%FREE lvm #Make swap and root mkswap /dev/mapper/lvm-swap mkfs.ext4 /dev/mapper/lvm-root #Edit the mkinitcpio.conf #HOOKS="base udev autodetect modconf block keyboard encrypt lvm2 filesystems fsck" mkinitcpio -p linux #Install bootloader bootctl --path=/boot/ install cat /boot/loader/loader.conf cat /boot/loader/entries/arch.conf title Arch Linux linux /vmlinuz-linux initrd /initramfs-linux.img options cryptdevice=UUID={UUID}:crypt root=/dev/lvm/root quiet rw #in vim use :read ! blkid /dev/sda2 #reboot exit umount -R /mnt reboot

Link to this headingFix Plex Acl issue

sudo setfacl -m "g:plex:rwx" /run/media/generalzero sudo usermod -a -G generalzero plex

Link to this headingAutoupdate Script

#!/bin/bash [ $EUID -ne 0 ] && { echo "$0 - Error: you must be root to run this script."; exit 1; } sudo pacman -Syy [ $(sudo pacman -Su --print | wc -c) == 0 ] && { echo "No updates avaible"; exit 1; } pacman -Syy && pacman -Su --noconfirm && reboot exit 0

Link to this headingGet dotfiles

#Link files from dot-files/linux to ~/ stow -v1 --dotfiles -t ~ -d ~/.config/dot-files linux

Link to this headingReset Lockout

faillock --user generalzero --reset