Arch Linux install & config how to

Make ISO USB

plug in the USB
tail dmesg to get the device name at /dev/sd[n]
dd if=input.iso of=/dev/sd[n] bs=1MB

Check internet connection

dhcpcd to start connection
ip a
ping -c 5 8.8.8.8 (Google’s DNS server)

Networking workaround

dhcpcd was timing out. Checked the router. It had assigned:
archiso    LAN    192.168.1.2    78:AC:C0:AD:48:CD
In arch did the commands:
ip link set enp0s25 up
ip addr add 192.168.1.2/24 broadcast 192.168.1.255 dev enp0s25
ip route add default via 192.168.1.1 dev enp0s25
Then I added a line referencing a DNS server to /etc/resolv.conf

Partition the hard drive

boot into live media. see root@archiso ~ #
fdisk -l
fdisk /dev/sda
o # create a new empty DOS partition table, creates an MBR (master boot record) style blank partition layout.
n # add a new partition
accept default primary and accept default first sector
for last sector, enter +30G
a # (toggle bootable flag on)
n + enter + enter # create another section
Last sector +
command t (type), then 2 for partition 2
type 82
create another partion: n, take defaults to take rest of drive
w to write changes to disk

Create file system and mount

fdisk -l to see disk
create a file system on two of the partitions: mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda3
Mount partitions with mount /dev/sda1 /mnt
mkdir /mnt/home
mount /dev/sda3 /mnt/home
mount command to see results
pacstrap -i /mnt base, take defaults
genfstab -U -p /mnt >> /mnt/etc/fstab

chroot into new system and add packages

arch-chroot /mnt
pacman -S openssh grub-bios linux-headers linux-lts linux-lts-headers wpa_suplication wireless_tools
Setup locale: nano /etc/locale.gen, uncomment locale, write and exit
locale-gen
ln -s /usr/share/zoneinfo/Canada/Eastern /etc/localtime
hwclock –systohc –utc
start ssh: systemctl enable sshd.service
passwd

Install grub and reboot

grub-install –target=i386-pc –recheck /dev/sda
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
grub-mkconfig -o /boot/grub/grub.cfg
exit // exit chroot back to live media
umount /mnt/home
umount /mnt
reboot
login as root with passw set above
df -h to check that partitions are present

Post-install

localectl set-locale LANG=”en_US.UTF-8” // some kludge or Gnome apps don’t work
free -m // no swap memory
fdisk -l to find swap disk
mkswap /dev/sda2 // as created above, output is UUID
add UUID none swap defaults 0 0 to /etc/fstab
reboot, then free -m, swap should be used
activate network with dhcpcd if necessary (this seems to cause a time out at shutdown which can be prevented with a tweak to /etc/systemd/system.conf
pacman -Sy networkmanager network-manager-applet // setup network manager, the enable and start with systemctl
pacman -Sy xorg-server xorg-xinit xorg-apps mesa
lspci to get hardware info. pacman -Syu nvidia
Optionally edit /etc/pacman.conf and comment out multilib testing to enable 32-bit packages. I did not.
pacman -Sy sudo
visudo // uncomment to allow members of group wheel to sudo
useradd -m -G wheel -s /bin/bash john
passw
hostnamectl set-hostname jf

Pacman hints

pacman -Ss vim|less // to search for packages
pacman -Syu vim //install vim
pacman -R vim // remove vim
pacman -Syu // no package, updates everything, once had to do pacman -S archlinux-keyring because of failed updates error: error: failed to commit transaction (invalid or corrupted package (PGP signature))

systemd hints

systemctl is-enabled sshd
systemctl enable sshd
systemctl start sshd
systemctl restart sshd
systemctl disable sshd
systemctl list-units
systemctl status sshd
journalctl // instead of var/log
journalctl -b // boot log
journalctl -f // live view of journal
journalctl -f // live logging

Install display manager / login manager

pacman -Sy lxdm
systemctl enable lxdm, reboot
install MATE