Arch Linux

Arch Linux is a “lightweight distribution”. Whilst ROCm on Arch Linux isn’t officially supported by AMD, Arch’s default package manager supports ROCm 6.0.

Documentation

Docs.

Install

Get Arch Linux and install.

Write to USB drive, make sure device is correct…

sudo dd if=archlinux-2024.02.01-x86_64.iso of=/dev/sdXX bs=16M status=progress oflag=sync

Boot up that drive on system. It drops into root prompt. Change root password and log in remotely via ssh or run commands on console.

Then set up disk:

fdisk /dev/nvme0n1

Set up like this or so, depending on disk size and taste. (Note, I see I did 32G for EFI here, it only needs like 32M!)

Device             Start        End    Sectors   Size Type
/dev/nvme0n1p1      2048   67108864   67106817    32G EFI System
/dev/nvme0n1p2  67110912   71305215    4194304     2G Linux filesystem
/dev/nvme0n1p3  71305216  490735615  419430400   200G Linux filesystem
/dev/nvme0n1p4 490735616 2000408575 1509672960 719.9G Linux filesystem

Format and mount partitions:

# Format
mkfs.fat -F 32 /dev/nvme0n1p1
mkfs.ext4 /dev/nvme0n1p2
mkfs.ext4 /dev/nvme0n1p3
mkfs.ext4 /dev/nvme0n1p4
# mount, making dirs where needed
# New root / dir
mount /dev/nvme0n1p3 /mnt
mkdir -p /mnt/boot
mount /dev/nvme0n1p2 /mnt/boot
mkdir -p /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi
mkdir -p /mnt/home
mount /dev/nvme0n1p4 /mnt/home

Now install Arch Linux…

pacstrap -K /mnt base linux linux-firmware
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/America/Denver /etc/localtime
hwclock --systohcopenssh
locale-gen
echo "tinyrocs-01" > /etc/hostname
passwd
mkinitcpio -P
sed -i -e 's/#ParallelDownloads = 5/ParallelDownloads = 5/g' /etc/pacman.conf
pacman -S dhcpcd efibootmgr grub man-db openssh sudo vi vim
sed -i -e 's/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers
systemctl enable systemd-networkd systemd-resolved dhcpcd sshd
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
useradd -m -G audio,kvm,render,video,wheel -s /bin/bash archuser
passwd archuser
exit
umount /mnt/home /mnt/boot/efi /mnt/boot /mnt
# reboot

Configuration

Setup, perhaps as so:

  • ssh keys.

Packages

Update and install new packages from Arch repos.

sudo pacman -S bash-completion colordiff git \
  bc bison ed flex gcc lzo m4 patch sharutils time \
  nvtop make ninja python-pip openmpi openmp gcc-fortran \
  fakeroot base-devel superlu lapack

ROCm

ROCm for Arch.

sudo pacman -S rocm-hip-sdk rocm-opencl-sdk

Build

To build packages, apparently:

git clone https://aur.archlinux.org/package.git
cd package/
makepkg
pacman -U package_file
# gklib metis parmetis superlu_dist superlu hypre