Contrary to its reputation, building an Arch installation only takes about 15 minutes. Try it in VirtualBox.
I initially took the plunge and installed Arch right on my hard drive next to Windows, using their beginner’s guide.
Most of the installation time is spent learning its glorious innards.
However, I recently had to install Arch Linux on VirtualBox to help reproduce and debug an issue I reported for the Lollypop music player. I have compiled the meat of its actual installation process just to prove it’s not the monster people think it is.
Pregaming
- Download and install VirtualBox, and get the Arch ISO
- Create a new VDI in VirtualBox, boot it, select the Arch .iso as the startup disk
Within five seconds, a root shell is born.
Installation
Initial Preparation (5 min)
- Verify Internet Connection:
ping google.com
- Update System Clock:
timedatectl set-ntp true
- Identify the “hard drive”:
lsblk
- Open “hard drive” in Parted:
parted /dev/sda
- Assign a Label:
(parted) mklabel msdos
- Create Partition:
(parted) mkpart primary ext4 1M 100%
- Set Boot Flag:
(parted) set 1 boot on
- Verify Partition:
(parted) print
- Exit Parted:
ctrl+C
- Format Partition:
mkfs.ext4 /dev/sda1
- Mount Partition:
mount /dev/sda1 /mnt
Package Installation (5 min of waiting)
- Install Base Packages:
pacstrap -i /mnt base base-devel
- Hit
enter
,enter
,Y
Configuration (5 min)
- Generate fstab:
genfstab -U /mnt > /mnt/etc/fstab
- Change to Root in New System:
arch-chroot /mnt /bin/bash
- Set Locale:
echo "LANG=en_US.UTF-8" > /etc/local.conf
- Download Boot Loader:
pacman -S grub os-prober
- Install Boot Loader:
grub-install --target=i386-pc --recheck /dev/sda
- Generate Boot Config:
grub-mkconfig -o /boot/grub/grub.cfg
- Set Some Hostname:
echo "myhostname" > /etc/hostname
- Get NIC Name:
ip link
- Autostart Internet Connectivity:
systemctl enable dhcpcd@xxx.service
- Where xxx is the NIC name from
ip link
- Where xxx is the NIC name from
- Set Root Password:
passwd
- Exit New System:
exit
- Reboot:
reboot
- Select option 3 “Boot existing OS” to boot into Arch
- Login as root
GUI (10 min, of mostly waiting)
- Install OpenGL Drivers
- Enable Multilib
- Edit the pacman config:
vi /etc/pacman.conf
- Uncomment the two multilib lines:
#[multilib] #Include = /etc/pacman.d/mirrorlist
- To:
[multilib] Include = /etc/pacman.d/mirrorlist
- Edit the pacman config:
- Update Pacman:
pacman -Syu
- Install OpenGL:
pacman -S mesa-libgl
- Install 32 bit OpenGL:
pacman -S lib32-mesa-libgl
- Enable Multilib
- Install VirtualBox Guest Utilities:
pacman -S virtualbox-guest-utils
- Install Gnome:
pacman -S gnome gnome-extra
- Hit
enter
,enter
,enter
,enter
,Y
- Hit
- Enable GDM:
systemctl enable gdm.service
- Install Gnome Tweak Tool:
pacman -S gnome-tweak-tool
- The Final Reboot Before Things Become Civilized:
reboot
And that’s all there is to it.