This manual describes the needed commands for a new Artix/Arch Linux installation from USB
For further information read
Download an up-to-date image from the links below
The preferred medium is an USB flash drive
Find out the name of your USB drive
lsblk
Copy the iso to the USB stick, replacing /dev/sdx
with your drive, e.g. /dev/sdb
. (Do not append a partition number, so do not use something like /dev/sdb1
):
dd bs=4M if=path/to/archlinux-version-x86_64.iso of=/dev/sdx conv=fsync oflag=direct status=progress
Restart your computer and select the bootable usb drive from the boot menu (F12 / F2 / Del)
- ArtixLinux:
Username: root Password: artix
- ArchLinux: Automatic login as
root
without password
To check the available layout types:
ls -R /usr/share/kbd/keymaps
Load the preferred layout
loadkeys de
If the following command returns something, you are using UEFI
ls /sys/firmware/efi/efivars/
ping artixlinux.org
If this fails follow the ArchLinux wiki
If reinstalling linux you have to first turn off the old swap partition (in this example /dev/sda2
)
swapoff /dev/sda2
List available disks
lsblk # or use fdisk -l
Then repartition the drive (in this example /dev/sda
is used)
- ArtixLinux (fdisk):
# Create new partition fdisk /dev/sda p # Print the partition table d # Delete previous partitions n, +512M, # Create EFI partition n, +18G, # Create Swap partition n, Enter # Create Linux filesystem t, 1, uefi # Assign the type to 'EFI System' t, 2, swap # Assign the type to 'Linux swap' w # write table to disk and exit
- ArchLinux (gdisk):
# Create new partition gdisk /dev/sda p # Print the partition table d # Delete previous partitions n, +512M, EF00 # Create EFI partition n, +18G, 8200 # Create Swap partition n, Enter, 8300 # Create Linux filesystem w # write table to disk and exit
Afterwards make the file system and mount the partitions
# Make the file system (Legacy Bios would have a ext4 EFI partition):
mkfs.fat -F 32 -n BOOT /dev/sda1 # EFI
mkswap -L SWAP /dev/sda2 # Swap
mkfs.ext4 -L ROOT /dev/sda3 # Root
# Mount the partitions
mount -L ROOT /mnt # Root
mkdir -p /mnt/boot
mount -L BOOT /mnt/boot # EFI
swapon -L SWAP # Swap
- ArtixLinux:
# Install base system basestrap /mnt base base-devel runit elogind-runit linux linux-firmware vim git bash-completion # Generate an fstab file fstabgen -U /mnt >> /mnt/etc/fstab # Change root into the new system artix-chroot /mnt
- ArchLinux:
# Install base system pacstrap -K /mnt base base-devel linux linux-firmware vim git bash-completion # Generate an fstab file genfstab -U /mnt >> /mnt/etc/fstab # Change root into the new system arch-chroot /mnt