Assumes the machine is running in UEFI mode!
-
Boot from Archlinux ISO and wait until the root prompt appears
- Be aware that according to https://wiki.archlinux.org/index.php/VirtualBox booting inside VBox may initially take a couple of minutes after the initial boot menu for the system to display anything - i.e. the blank screen at the beginning is normal!
- Check that there's an internet connection (e.g. ping google.com should work)
-
Set timezone / clock
timedatectl set-ntp true
timedatectl status
should show a valid time/zone
-
Set keyboard map (if different from default) TODO
-
Create partitions
fdisk -l
to show available devices- e.g.
fdisk /dev/sda
to work with /dev/sda g
for new GPT partition tablen
for creating new partitions, at least two are needed: ~400MB for EFI boot and "the rest" for the root i.e./
The syntax for quickly specifying sizes is like+15G
would mean15 GBytes
from whatever "first sector" might bet
to switch partition types ->l
shows a list of available partition types. Type for EFI boot is1
, for root it is24
w
to finalize and write out the new partitions.- For the further steps below, the example is going to assume that the EFI boot partition resides on
/dev/sda1
, the swap partion - on/dev/sda2
and the root partition - on/dev/sda3
-
Create file systems
mkfs.msdos -F32 /dev/sda1
to create FAT32 on the EFI boot partitionmkswap /dev/sda2
if using a swap partition followed byswapon
(possibly a bad idea if installing on an SSD)mkfs.ext4 ./dev/sda3
to create EXT4 on the root partition
-
Temporarily mount file systems for installation
- Note: mounting partitions into
/mnt
may look a little weird, but is only during the installation process (because pacstrap needs a target to work with), and will not affect the finalfstab
mount points in any way! mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
mount /dev/sda3 /mnt
- Note: mounting partitions into
-
Bootstrap installation
pacstrap /mnt base
will initiate installation of base system packages into/
and/boot
currently mounted under/mnt
-
Create
fstab
genfstab -U /mnt >> /mnt/etc/fstab
less /mnt/etc/fstab
to make surefstab
was generated OK- Take a screenshot of
fstab
contents (or write down the mapping for the root partition, especially the partition UUID)
-
Basic configuration
arch-chroot /mnt
change root to /mntln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
to set the local timezonehwclock --systohc
to set the hardware clockvi /etc/locale.gen
and then uncomment the en_US.UTF-8locale-gen
to generate the localevi /etc/locale.conf
and add the lineLANG=en_US.UTF-8
-
Network configuration
vi /etc/hostname
and add e.g.arch-machine
vi /etc/hosts
and the lines ``127.0.0.1 arch-machine,
::1 arch-machine`, and `127.0.1.1 arch-machine.localdomain arch-machine`
-
Security configuration
passwd
and set root password (do NOT disable the root account just yet!)- Install vim by ``pacman -S vim`
- Install sudo by
pacman -S sudo
- Run
visudo
, look for the line%wheel ALL=(ALL) NOPASSWD: ALL
, uncomment it and save the changes
-
Configure systemd-boot
- Install
systemd-boot
viabootctl --path=/boot install
cd /boot/loader
- Edit
loader.conf
, changedefault
toarch-*
, adjust timeout as desired cd /boot/loader/entries
, create a file calledarch.conf
- Edit
arch.conf
and add the following lines:title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=UUID=[UUID saved in step 8.3] rw
- Install
- https://wiki.archlinux.org/index.php/installation_guide
- https://gist.github.com/kevinwright/6884737
- https://www.youtube.com/watch?v=2zciJYPwUWQ
- Encrypted Arch Setup: https://www.youtube.com/watch?v=rT7h62OYQv8
- Manual mounting of encrypted partitions: https://evilshit.wordpress.com/2012/10/29/how-to-mount-luks-encrypted-partitions-manually