Classic Dev

My preferred Arch Linux install reference

Here is a quick reference to my preffered Arch Linux setup. If you like what you see I assume you know what you are doing and if it breaks you get to keep the pieces. As I am setting this up on an OG Lattepanda Alpha you will see some unusual steps, such as using the onboard MMC in its entirety as the system partition. You can get a similar model on dfrobot where I picked up mine.

On a single disk setup I would expect this to be the first partition of your main disk instead. In simpler times I used to perform gentoo installs from memory without referencing the handbook so if you use this quick reference it is expected to be comfortable remixing it as you go as you see fit. If in doubt reference the official wiki at

Now with that disclaimer out of the way lets get started.

cgdisk /dev/mmcblk0

Create one new partition

Accept defaults for the rest


                                       Disk Drive: /dev/mmcblk0
                                       Size: 122142720, 58.2 GiB

Part. #     Size        Partition Type            Partition Name
            1007.0 KiB  free space
   1        58.2 GiB    EFI system partition      boot
            1007.5 KiB  free space

cgdisk /dev/sda

On the boot drive create one main partition.

You can pick whatever label you like, just remember to replace later instances.


                                         Disk Drive: /dev/sda
                                      Size: 1953525168, 931.5 GiB

Part. #     Size        Partition Type            Partition Name
            1007.0 KiB  free space
   1        931.5 GiB   Linux filesystem          salty
            711.5 KiB   free space

Anymore I always encrypt as a default. If you decide to use a keyfile method I leave that as an exercise to the user, refer to the wiki for that.

cryptsetup luksFormat /dev/disk/by-partlabel/salty

This will overwrite data on /dev/disk/by-partlabel/salty irrevocably.

Are you sure? (Type 'yes' in capital letters): YES
Enter passphrase for /dev/disk/by-partlabel/salty: 
Verify passphrase: 
cryptsetup luksFormat /dev/disk/by-partlabel/salty

Open sesame.

cryptsetup luksOpen /dev/disk/by-partlabel/salty decrypt0

Create the volume group. I'd recommend picking unique names when installing on multiple machines here especially if you are in a pinch and expect to drive this in another machine with a similar setup. That will avoid any name collision weirdness.

vgcreate panda0 /dev/mapper/decrypt0
Physical volume "/dev/mapper/decrypt0" successfully created.
Volume group "panda0" successfully created

Prepare for swap and root. Size swap to your liking. I expect to do some really silly things and want to keep the backwards cow at bay for as long as possible.

lvcreate -C y -L 16G panda0 -n swap
lvcreate -l +100%FREE panda0 -n root

Check our work:

pvdisplay -C && vgdisplay -C && lvdisplay -C
  PV                   VG     Fmt  Attr PSize   PFree
  /dev/mapper/decrypt0 panda0 lvm2 a--  931.49g    0 
  VG     #PV #LV #SN Attr   VSize   VFree
  panda0   1   2   0 wz--n- 931.49g    0 
  LV   VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root panda0 -wi-a----- 915.49g                                                    
  swap panda0 -wc-a-----  16.00g

Format all the things

mkfs.fat -F32 /dev/disk/by-partlabel/boot
mkfs.ext4 /dev/mapper/panda0-root
mkswap /dev/mapper/panda0-swap
swapon /dev/mapper/panda0-swap

Mount for strapping

mount /dev/mapper/panda0-root /mnt
mkdir /mnt/boot
mount /dev/disk/by-partlabel/boot /mnt/boot

pacstrap time! If you want to follow the latest stable kernel just remove -lts

pacstrap -K /mnt base linux-lts linux-firmware

Generate a proper fstab and chroot

genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt

Install the microcode for your processor, this will be amd-ucode on AMD processors respectively.

pacman -S intel-ucode

Set timezone. I'll leave setting up ntp automatic updates as an exercise for the user.

ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
hwclock --systohc

Install nano and edit /etc/locale.gen

Uncomment en_US.UTF-8 UTF-8

For simplified Chinese uncomment zh_CN.UTF-8 UTF-8 If you end up doing that I expect you know what fonts you need there.


Create a locale.conf

echo 'LANG=en_US.UTF-8' > /etc/locale.conf

Set your preffered console font.

echo 'FONT=Lat2-Terminus16' > /etc/vconsole.conf

Update /etc/mkinitcpio.conf lines for modules and hooks.

HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block encrypt lvm2 filesystems fsck)

Run mkinitcpio, again drop the -lts if needed here. Ensure lvm2 is installed.

pacman -S lvm2
mkinitcpio -p linux-lts

Set the root password.


Install NetworkManager.

pacman -S networkmanager

Install efibootmgr.

pacman -S efibootmgr

Configure our EFISTUB. Note that while I show resume here as an example all attempts to suspend on this machine. I haven't hand a stable resume for awhile on this particular piece of hardware.

efibootmgr --create --disk /dev/mmcblk0 --part 1 --label "Arch Linux" --loader /vmlinuz-linux-lts --unicode \
"root=/dev/mapper/panda0-root rw cryptdevice=PARTLABEL=salty:decrypt0:allow-discards resume=/dev/mapper/panda0-swap initrd=/intel-ucode.img initrd=/initramfs-linux-lts.img quiet"

Lets exit the chroot, unmount, reboot, and hold onto your butts.

umount -R /mnt

Enter your credentials to get back to root and lets finish our initial setup.

Start NetworkManager and enable at boot.

systemctl enable NetworkManager
systemctl start NetworkManager

Install openssh, enable and run. Note that you must set PermitRootLogin yes in /etc/ssh/sshd_config if you are using this to finish up the install without pubkey auth like I am.

pacman -S openssh
systemctl enable sshd
systemctl start sshd

At this point you probably notice archiso is the current hostname as we haven't set that yet. We can use hostnamectl to fix that now.

hostnamectl hostname lattepanda

If you have an open shell, exit and reconnect.

[root@lattepanda ~]#

Much better.

Install gnome and add our intial user.

pacman -S gnome
useradd -m -G wheel graywind
passwd graywind

If you want to play 32-bit games or have a stable steam setup, uncomment multilib in /etc/pacman.conf and sync with pacman -Syu. I have older notes referring to lib32-intel-dri. This is apparently what you want now.

pacman -S lib32-mesa lib32-vulkan-intel lib32-libva-mesa-driver libva-mesa-driver xf86-video-intel

Setup sudo

pacman -S sudo

Uncomment %wheel line in /etc/sudoers

Start and enable gdm (after confirming that there are no errors, a separate ssh session works great for this.

systemctl start gdm
systemctl enable gdm