What Are You, Some Arch Linux User? (BTW...)

Today my imaginary friend asked me: How did you even get it installed? – It being the coveted Arch Linux. Herbert, said imaginary friend, is using Fedora for all his university work, but he wants to use Arch. Everything he has read has told him that when he uses Arch all of the world’s secrets will be known. People will bow to his prowess. He will be a bastion of knowledge and wisdom.

I had a good laugh at his expense.

Welcome to the Fanatical Arch Linux Blog

Here we do all sorts of Linux shenanigans from systems administration, virtualization, software development, and shit posting. But we’re not on any Linux operating system. We’re using Arch Linux, by the way.

This first run through is going to be how I setup my system. Is it the best way? No. Is it the correct way? I think so, but it’s not universally accepted. Do you have to use the services and packages I used? No.

I understand that some people will take issue with systemd, my window manager, my display manager, my login manager, etc. This should be cookie cutter enough to where you can swap out one service for another. You could go through the installation guide, too, and read top to bottom. But I understand the number of choices and analysis paralysis and just wanting a push in the right direction all come into play. Hopefully this run down helps you in some shape or form. If not, email @SgtAwesomesauce for troubleshooting.

There may be typos or commands entered incorrectly because I’m going from memory and my current setup. Sorry in advance.

Install the Boot Media

Download from archlinux.org and create a media. Use Rufus, use Etcher, use dd. Not important.

Run the Boot Media

Select “Arch Linux x86_64” at the prompt

Format your disk

I use cfidsk, but you have a ton of options.

lsblk -f will show you the drive.

cfdisk /dev/nvme0n1

Delete everything.

I create a 512M partition and the use the rest of the space for a second partition. The first partition is EFI system. The second is fine at Linux Filesystem.

I use LUKS because I don’t trust anyone.

cryptsetup -y -v luksFormat --type luks2 /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 cryptroot

Now I format with ext4 and fat32. You can use xfs, you can use ZFS, you can use BTRFS – I use ext4.

mkfs.ext4 /dev/mapper/cryptroot
mkfs.fat -F32 /dev/nvme0n1p1

Mount the Partitions

mount /dev/mapper/cryptroot /mnt
mkdir /mnt/boot
mount /dev/nvme0n1p1 /mnt/boot

Pacstrap

As of Summer of this year the mirrors auto sort to the closest location. But you can dig around /etc/pacman.d/mirrorlist if you want. For now, we get the base system. Remember, I work with C and C++ and Makefiles so my bootstrap might be different than the Small Linux Build VFIO Minimalist ZFS Nested VM setup

pacstrap /mnt base base-devel linux linux-firmware vim git sudo

Generate the fstab Template

Required for mounting to work properly

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

Time

timedatectl set-ntp true

Jump into the system

arch-chroot /mnt

Timezone and Locale

ln -sf /usr/share/zoneinfo/America/Chicago
hwclock --systohc
vim /etc/locale.gen
# untick UTF-8 and ISO-whatever (under UTF-8)
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf

Hosts and Networking

echo hostname > /etc/hostname
echo "127.0.0.1 hostname" >> /etc/hosts
echo "::1 hostname" >> /etc/hosts
echo "127.0.1.1 hostname.localdomain.net" >> /etc/hosts

vim /etc/systemd/network/wired.network
[Match]
Name=enp4s0
[Network]
Address=172.16.0.101/16
Gateway=172.16.0.1
DNS=172.16.0.1

systemctl enable systemd-networkd
systemctl enable systemd-resolved

Add encrypt to Linux

vim /etc/mkinitcpio.conf

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

mkinitcpio -P

Setup Root Password

passwd

Add MicroCode

pacman -S amd-ucode

Systemd Boot

bootctl install
lsblk -f | tail -n 2 | head -n 1 | awk '{ print $4 }' >> /boot/loader/entries/arch.conf
vim /boot/loader/entries/arch.conf

title  I Use Arch BTW
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux.img
options cryptdevice=UUID=string from awk:cryptroot root=/dev/mapper/cryptroot

vim /boot/loader/loader.conf
timeout 3
default arch.conf

Swapfile

dd if=/dev/zero of=/swapfile count=4096 bs=1M status=progress
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile

vim /etc/fstab
/swapfile none swap defaults 0 0

GTFO

exit
umount -a
shutdown -r now

Now you’ll want to create a user and setup some sort of GUI if you’re going to use it as a desktop:

useradd -m -G wheel chris
passwd chris
EDITOR=vim visudo
# uncomment wheel

# I also uncomment Color and multilib from /etc/pacman.conf before moving on -- You'll need to run pacman -Sy too

# Need resolve.conf to be configured too

ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

# GUI shit
pacman -S xorg-server xorg-apps xf86-video-vesa mesa
pacman -S nvidia nvidia-utils lib32-nvidia-utils
pacman -S gnome gnome-extra plasma kde-applications suckless-tools xfce4 awesomewm openbsd 
systemctl enable gdm 
r
e
b
o
o
t

You should have a fairly decent usable Arch Linux desktop. I know I do :sunglasses:

:tada:
image

The next shenanigans are going to be using LXC and KVM to run some full stack

ARE YOU FULL STACK BRO?

Because if you’re not you’re gonna be

9 Likes

Anyone who does this gets their account deleted. :stuck_out_tongue:

8 Likes

3800x and 2080 super to run i3

This is peak arch user.

3 Likes

I use Arch, by the way.

2 Likes

If I install Arch in a VM and then trash it do I get to say I’ve used Arch?

2 Likes

I also use arch btw.

I’ve been using linux for a while and got it tu run on my first try.

I did one mistake that I really wanted to try systemd-homed so instead useradd I homectl create back in days of systemd v245 the default creation method was determined to be luks home container, it should determine on its own since it was already inside luks2 container.

So I ended up with double encrypted data in Home. Egh undoing the user and recreating one under classic NSS took me longer then installing whole system.

1 Like

I about to commit an act of monumental treason.

A few years ago I was a Arch Bible Thumper. Till I saw the light and became a neck beard by moving to Gentoo. Then I went full retard. Never go full retard.

I will admit, Arch is so gud, when you use it for the first few years. But after while I got bored. My way of having fun and being productive was trying to make it secure as possible. Also Arch will make you a try hard once you experience the AUR. It’s unparalleled in terms of use and package availability. But you have to take a chance in that there is a possibility that you can be downloading something malicious. But overall it’s a good distro once you get your feet wet in Linux after a few months. And I recommend it, if you want something easy and up-to-date.

3 Likes

I use Arch only on RPis :wink:

2 Likes

Ayyyy lmfao

I USE CERTAIN PYTHON LIBRARIES OK? BACK OFF

How do you like it?

Literally what I did for years. And I used Antergos. RIP in Peace.

Damn nice I bet the NSA was jealous af lol.

I’ve been meaning to try systemd-homed to see what the hoopla was about.

I have Gentoo on my laptop :wink:

Servers?

1 Like

Nah, just fooling around.

I have an RPi zero I have been playing around with, got a 5.5" Amoled touch screen from waveshare, want to make it into a mobile Linux terminal.

I’m also building a NAS with an RPI 4 (8 GB). I want to use a HAT with 4 SATA ports, but looks like it’s not easily available in my region. Might need to get it directly from Allnet China. I’m a bit unsure if the online order and international delivery process is sufficiently trustworthy :expressionless:. After Ryzen 3 launches, I am thinking of building a workstation, I want to install this RPi NAS in that same case, powered by the same PSU.

I also have an RPi 3 running a Bitcoin node on it for a couple of years now. These are all Arch, and it was remarkably easy to install the ARM images (or maybe I’ve been using Linux for too long).

2 Likes

So Chris, when are you going to LFS or the most unpopular distro from Distrowatch?

3 Likes

I am using the Radxa SATA hat on my RPi 8GiB as a NAS. Running Raspberry OS on it in 64 bit mode but I am about to try my hand at OpenSuSe tumbleweed since they have an image for the RPi in 64bt native (no hybrid 64bit 32bit)

but I do use Arch as my SteamOS partition. I run Debian SID as my daily.

3 Likes

How does the Radxa SATA HAT perform? I’m after something that is low power, accessible over SSH, and occasional streaming over MiniDLNA. I might set it up as RAID 5 though.

BTW, I can recommend using the Arch ARM image with the RPi, super lightweight :slight_smile:

1 Like

Is there an official image of ALARM (ArchLinuxArm) now? When I got my Pi4, you had to jump through hoops. I run Arch on my OdroidN2 as well.

I flirt with SuSe over the years but never use it as a main. I want to use it on the PiNAS due to native support for BTRFS

The RADXA hat can sustain about 385MiB/s to 400MiB/s so I cannot complaint. The cooling solution is beefy but still not optimal. At full tilt, the Pi4 is running at 53.7F with 68F ambient. At Idle, it is about 40-43F with about 66-68F ambient. I think it was alittle much for what it is (I bought the tower kit) but it is all metal and it keeps everything nice and neat. You will need to open up the port holes for the HMDI though as I have not micro cables that can be fully seated otherwise (but I run it headless with no UI.)

2 Likes

Ya, I was expecting it would be a bit warm. That’s why I want to integrate it in my normal workstation case. That way it’s well ventilated. The throughput seems acceptable for what it is, thanks for the feedback :slight_smile:

You can find the Arch ARM images here. Setup is just creating the appropriate partitions. The instructions say to keep /boot to 200M, but I would recommend a bit more, maybe 300M or 500M.

Good luck playing with it!

2 Likes

Thanks, I will give it a try.

On my Gnome setup kvm and qemu were already installed, so I just setup bridge-utils and virt-install and was good to go.

Bridged networking is SO EASY with systemd-networkd

# /etc/systemd/network/bridge.netdev

[NetDev]
Name=br0
Kind=bridge

# /etc/systemd/network/bind.network
[Match]
Name=enp4s0

[Network]
Bridge=br0

# /etc/systemd/network/bridge.network

[Match]
Name=br0

[Network]
Address=172.16.0.101/16
Gateway=172.16.0.1
DNS=172.16.0.1

systemctl restart systemd-networkd and your bridged network is online.

ping -c3 www.archlinux.org

Start up libvirt

systemctl enable --now libvirtd

sudo virt-install --name linux-dev \
                  --ram 8192 \
                  --disk path=./linux-dev,size=120 \
                  --vcpus 6 \
                  --os-type linux --os-variant generic \
                  --network bridge=br0 \
                  --graphics none --console pty,target_type=serial \
                  --location '/home/chris/isos/centos8.iso' \
                  --extra-args 'console=ttyS0,115200n8 serial' -x ks=ftp://172.16.0.100/pub/ks.cfg

Viola

I stopped using Gentoo on my laptop some 10 years ago, it was about time to act to stop global warming. Though I keep remembering how I used to hear the loud fans of a MacBook Pro across the room editing text while I was working over nice emerge -upvDN @world (or was it -avuDN?..)

Then Arch, a bit more up to date for a couple of years. Then I ended up quitting arch because at the time, kernel, gcc and llvm where more up to date on Fedora.

1 Like