misc

During setup

Live CD copy-on-write partition too small

(c/o https://www.ostechnix.com/adjust-size-root-partition-live-arch-linux/)

Option 1: At boot

When you boot the Arch Linux livecd, press e or hit tab key to edit the kernel parameters. Go to the end of the line that says “…. linux=… initrd=….” something like that and append cow_spacesize=16G at the end to get 16GB size root partition or whatever space left from RAM.

Option 2: Live

# mount -o remount,size=16G /run/archiso/cowspace

mirrorlist

# pacman -S reflector
# pushd /etc/pacman.d
# cp mirrorlist mirrorlist.bak
# reflector --protocol https --country United\ States --score 10 > mirrorlist

If using syslinux for the bootloader

syslinux can’t use ext4 with the 64bit feature, which is now the default in mkfs.ext4. Instead, create without the 64bit feature:

$ mkfs.ext4 -O \^64bit /dev/sda1

Use fs labels instead of uuids

$ e2label /dev/sda1 foo
$ genfstab -L /mnt > /mnt/etc/fstab

Bootloader: syslinux

$ pacman -S syslinux
$ cp /usr/lib/syslinux/bios/*.c32 /boot/syslinux/
$ extlinux --install /boot/syslinux/

Edit /boot/syslinux/syslinux.cfg

Use: APPEND root=LABEL=foo rw

For non-stop boots, comment out all UI entries and use PROMPT 0.

altmbr

An alternative MBR which Syslinux provides is: altmbr.bin. This MBR does not scan for bootable partitions; instead, the last byte of the MBR is set to a value indicating which partition to boot from. Here is an example of how altmbr.bin can be copied into position:

$ printf '\x5' | cat /usr/lib/syslinux/bios/altmbr.bin - | dd bs=440 count=1 iflag=fullblock of=/dev/sda

In this case, a single byte of value 5 (hexadecimal) is appended to the contents of altmbr.bin and the resulting 440 bytes are written to the MBR on device sda. Syslinux was installed on the first logical partition (/dev/sda5) of the disk.

After first boot

No ethernet on first start, so setup networkd. (netctl is no longer installed by default :( )

$ systemctl start systemd-networkd
$ systemctl start systemd-resolved

Create a user

useradd -m -G wheel <username> ((-m creates ~))

sudo

Install, and in /etc/sudoers, uncomment %wheel entry.

GUI

$ pacman -S xfce4
$ pacman -S xterm ((not installed by default!))
$ echo 'exec startxfce4' > ~/.xinitrc
$ startx ((when desired))

Lockscreen

$ pacman -S slock

Disable terminal beep

$ echo 'set bell-style none' > ~/.inputrc
$ bash ((to refresh))