(c/o https://www.ostechnix.com/adjust-size-root-partition-live-arch-linux/)
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.
# mount -o remount,size=16G /run/archiso/cowspace
# pacman -S reflector
# pushd /etc/pacman.d
# cp mirrorlist mirrorlist.bak
# reflector --protocol https --country United\ States --score 10 > mirrorlist
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
$ e2label /dev/sda1 foo
$ genfstab -L /mnt > /mnt/etc/fstab
$ pacman -S syslinux
$ cp /usr/lib/syslinux/bios/*.c32 /boot/syslinux/
$ extlinux --install /boot/syslinux/
Use: APPEND root=LABEL=foo rw
For non-stop boots, comment out all UI
entries and use PROMPT 0
.
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.
$ systemctl start systemd-networkd
$ systemctl start systemd-resolved
useradd -m -G wheel <username> ((-m creates ~))
Install, and in /etc/sudoers
, uncomment %wheel
entry.
$ pacman -S xfce4
$ pacman -S xterm ((not installed by default!))
$ echo 'exec startxfce4' > ~/.xinitrc
$ startx ((when desired))
$ pacman -S slock
$ echo 'set bell-style none' > ~/.inputrc
$ bash ((to refresh))