# Installing Arch on Older Hardware

First post of the New Year. Still got it in January. I moved States, bought a house, got a dog. So blogging has not been at the top of the list.

Now that I emptied my storage unit, I found my old buddy Tinman. He's a Core i7 ‘server’ with two GTX 480's and 2TB of space. He's old, but sturdy. He deserves a place of glory. And and Arch installation.

In my previous article, I installed Arch on my ThinkPad. That installation is still going strong and I'm very happy with the rolling release. I solved some maintenance issues like running out of space in this article. Running out of space is really the only problem I've had. Arch for life.

This is based off Peter Beard's awesome article on the subject. There are some things that are different and I suspect because they're just out of date.

Note: This is for a BIOS installation. My previous article was for UEFI hardware. You will know if you have UEFI at boot of the live media if you have the folder: /sys/firmware/efi. If the live media does not have that folder, then you are on a BIOS system and your partition scheme and installation will be different. This was a pain point for my current installation, so I want to make sure to call that out ahead of time.

Also Note that you should use the latest installation media because the archlinux-keyring package is updated frequently. Over time, signing keys are revoked and the keyring needs to be updated. If you're working with a 4GB installation USB stick, it may not be possible to pacman -Syu update your installation media because you will run out of space. Downloading the new ISO is the best bet.

On a Mac:

sudo dd if=/Users/admin/Downloads/archlinux-2020.01.01-x86_64.iso of=/dev/rdisk2 bs=1m


Where /dev/disk2 is the unreadable USB stick. Note the r in of=/dev/rdisk2.

## Partitioning

I took Peter's lead and followed this partition scheme goal:

• /dev/sda1 - 1 MiB for BIOS compatibility
• /dev/sda2 - 200 MiB for /boot
• /dev/sda3 - The rest of the disk

He mentioned cgdisk and that isn't mentioned in the Arch Installation Guide the way parted is mentioned. It is way easier to use than parted and I don't think I'll go back.

When you start up cgdisk it is pretty intuitive to navigate, just remember to select the free space for each new partition you want to make.

• /dev/sda1 - 1 MiB, type ef02
• /dev/sda2 - 200 MiB, type 8300
• /dev/sda3 - Remainder, type 8300

write that to the disk, then mkfs.ext2 /dev/sda2.

## Formatting

Write cryptographically secure ‘zeroes’ to the disk.

cryptsetup luksFormat -s 512 /dev/sda3


Open the drive with the passphrase.

cryptsetup luksOpen /dev/sda3 luks


pvcreate /dev/mapper/luks
vgcreate vg0 /dev/mapper/luks
vgdisplay (record size "Free PE")
lvcreate -l 32729 /dev/mapper/vg0 -n root
mkfs.ext4 /dev/mapper/vg0-root


## Installation

mount /dev/mapper/vg0-root /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot


After all these, you should have a system that is ready to strap. pacstrap everything…

pacstrap /mnt linux linux-firmware vim base-devel base lvm2 dhcpcd


Note: If you screw up something like I did, you can mount the drives in the way specified above from the live media and pacstrap additional things that are available through pacman. I missed dhcpcd, so that is exactly what I did so I didn't have to restart the installation process.

After the installation process is complete:

genfstab -p /mnt >> /mnt/etc/fstab
arch-chroot /mnt /bin/bash


You're now ‘in’ your new installation. You should set up the niceties.

vim /etc/hostname
ln -s /usr/share/zoneinfo/US/Arizona /etc/localtime
vim /etc/locale.gen
[Uncomment the one you want]
locale-gen
echo "LANG=en_us.UTF-8" > /etc/locale.conf


This part is what is different between Peter's experience and mine. In the file /etc/mkinitcpio.conf:

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


Then run this to build the initramfs image that will strap your system prior to decrypting your SDD.

mkinitcpio -p linux


Install Grub.

pacman -S grub


Edit /etc/default/grub:

GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:luks"
GRUB_DISABLE_LINUX_UUID=true


Now put Grub on the disk.

grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg


Note: cfg not conf

## Finalization

exit
umount -R /mnt
reboot


You should have a working installation now!

## Postinstall

You'll need to enable DHCP to have a happy life.

Find your ethernet device with ip link and commit the device name to memory. You'll be using it a lot in the future. To get DHCP to work, link the following for systemd.

systemctl start [email protected]
systemctl enable [email protected]


## Conclusion

I reserve the right to edit this. It is my site.