Offline installation
This article provides instructions on installing Arch Linux on a system without an Internet connection. To do this, another system with a working Internet connection is required.
First, follow the Installation guide, skipping the Installation guide#Connect to the internet section, until the Installation guide#Install essential packages step.
airootfs.sfs
) from the ISO or copying the live environment's root file system is not a supported installation method.Prepare local repository
Follow Pacman/Tips and tricks#Installing packages from a CD/DVD or USB stick for instructions on preparing a local repository with the necessary files on a separate host installation.
At the very least, for a functioning system, the following packages are recommended:
# pacman -Syw --cachedir . --dbpath /tmp/blankdb base base-devel linux linux-firmware systemd mkinitcpio vim
Create your custom offline repository
# repo-add ./custom.db.tar.gz ./*[^sig]
Mount and configure
Once the repository is prepared, connect the external media to the new installation, and mount it on the newly created root filesystem:
# mount --mkdir /dev/sdxy /mnt/repo
Edit your archiso /etc/pacman.conf
and add a new section:
/etc/pacman.conf
[custom] SigLevel = Optional Server = file:///mnt/repo/
Comment out [core]
, [extra]
and [community]
so that pacman does not fail on the default repositories.
Pacstrap
You can now continue to pacstrap your locally-available packages to the new installation:
# pacstrap -K /mnt base base-devel linux linux-firmware mkinitcpio systemd vim
Chroot
In case the new system is expected to remain offline or airgapped, it should be configured to expect local repositories only.
After chrooting into your new installation, edit the new /etc/pacman.conf
in the same way as previously (but without the prefix):
Comment out all other repositories and save. Continue configuring the new system as usual.
From now on any updates to the offline system can be made by bringing an up to date copy of the local repository, mounting it to and running pacman commands as usual.