On linux, connect your usb drive and run lsblk
. Assuming your usb drive is
/dev/sdb
, run
dd if=<path-to-iso> of=/dev/sdb status=progress bs=4M
as root.
WARNING: dd
is the famous d
isk d
estroyer! Don't get the output file
wrong or you could lose all your data.
See if you're connected to the internet. Try
ping almela.io
If this works for you, you can skip this section.
Get the name of your interface using
ip link
Ignoring lo
, which is the loopback address. Usually it looks like wlan0
or wlp2s0
for WiFi.
Create a config file to connect to your WiFi:
wpa_passphrase "<SSID>" "<password>" > /etc/wpa_supplicant.conf
Where <SSID>
is the name of your WiFi, and <password>
is... its password.
If you don't have the required permissions to run this, try it as root using
sudo su
.
Start wpa_supplicant
sudo wpa_supplicant -B -i <interface> -c /etc/wpa_supplicant.conf
Where <interface>
is the interface you found in step 1.
Obtain an IP Address: After wpa_supplicant is connected, you need to request an IP address using dhclient
sudo dhclient <interface>
If this fails with message
RTNETLINK answers: Operation not possible due to RF-kill
, try runningrfkill unblock <interface*>
where<interface*>
is just<interface>
without the numbered suffix. For instance if your interface iswlan0
,<interface*>
is justwlan
.
Attempt step 0 again.
On a 1Tb drive, I would do
Partition | Size | Notes |
---|---|---|
BOOT | 1G | |
ROOT | 99G | Includes swap file |
HOME | 900G |
At this stage, I like to use fdisk
.
sudo fdisk /dev/<blk>
TODO: elaborate
Modern systems use EFI, to check if you do, run
ls /sys/firmware/efi/efivars
If this returns anything, you're using EFI.
This impacts how we make the root parition. EFI systems should format the root as FAT32 instead of the usual Linux ext4.
Assuming <blk>
is your block device, I do:
mkfs.fat -F 32 /dev/<blk>X # BOOT partition for EFI
fatlabel /dev/<blk>X ESP
mkfs.ext4 -L ROOT /dev/<blk>Y # ROOT partition
mkfs.ext4 -L HOME /dev/<blk>Z # HOME partition
Most often, <blk>
will be sda
and X
, Y
, Z
will be 1
, 2
, and 3
respectively. Though on nvme ssds it's usually nvme0n1
, with X
, Y
, and Z
as
p1
, p2
, and p3
.
Mount the ROOT
partition
mount /dev/disk/by-label/ROOT /mnt
Create the BOOT
and HOME
directories
mkdir /mnt/boot
mkdir /mnt/home
Mount HOME
mount /dev/disk/by-label/HOME /mnt/home
Mount the EFI partition
mkdir /mnt/boot/efi
mount /dev/disk/by-label/ESP /mnt/boot/efi
NOTE: skip? ntpd
is not installed by default
Set up the system clock. I use runit
, so
sv up ntpd
Before we install the basic programs and kernel, there are a few steps we can take which will help us download these faster.
You can edit your mirrorlist at /etc/pacman.d/mirrorlist
and put mirrors
closer to you at the top. This should help you download things faster
You can also edit the ParallelDownloads
flag in /etc/pacman.conf
. I
usually set it to 20
.
Once this is done,
basestrap /mnt base base-devel linux linux-firmware networkmanager networkmanager-runit vim runit elogind-runit grub os-prober efibootmgr
Everything after /mnt
is programs that will be installed on the base system. I
like to keep it simple at this stage as most packages will be installed later
on.
Verify the output of
fstabgen -U /mnt
If happy, write it for real using
fstabgen -U /mnt >> /mnt/etc/fstab
Note: You may need to be root for this, use
sudo su
, andexit
when done.
artix-chroot /mnt # formerly artools-chroot
For example, if you're in the EST timezone,
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
Update the hardware clock
hwclock --systohc
Create a file at /etc/locale.conf
with contents
export LANG="en_US.UTF-8"
export LC_COLLATE="C"
Next, in /etc/locale.gen
, uncomment your locale of choice. For me that's
usually
en_US.UTF-8 UTF-8
en_US ISO-8859-1
Once done, update your locale info by running
locale-gen
For EFI systems, this is
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
grub-mkconfig -o /boot/grub/grub.cfg
passwd
Create a hostname
vim /etc/hostname
Pick a good name for your computer. Write it in the file, save, and exit.
Write hosts
vim /etc/hosts
And write
127.0.0.1 localhost
::1 localhost
127.0.1.1 <hostname>.localdomain <hostname>
Where <hostname>
is the hostname you picked in step 1.
Note: There are 3 columns in the above file, separating each of them are tabs, not spaces. It's unclear to me if this matters, but I've always done it that way.
ln -s /etc/runit/sv/NetworkManager /etc/runit/runsvdir/current
Exit the chroot environment
exit
umount -R /mnt
reboot