Installing Arch Linux typically begins with booting from official installation media. However, it is also possible to bootstrap an Arch Linux installation from within a running Debian-based system (Ubuntu, Debian, Linux Mint, etc.). This method is advantageous in environments where rebooting into live media is impractical or when remote installation is desired.
This article outlines a workflow for installing Arch Linux from a Debian-based system using pacman, pacstrap, arch-chroot, and pacman-key.
Prerequisites
Ensure your Debian system has the necessary tools to begin the installation process:
apt-get install arch-install-scripts pacman-package-manager archlinux-keyring makepkg
This command installs the Arch Linux bootstrap tools, makepkg, the pacman package manager, and required keyrings.
Configure the pacman keyring
Initialize the pacman keyring:
pacman-key --init
Install the latest Arch Linux keyring using pacman without resolving dependencies (to avoid conflicts with Debian packages):
pacman -S --nodeps archlinux-keyring
Replace the outdated Debian’s pacman keyrings with Arch’s:
cp /usr/share/pacman/keyrings/* /usr/share/keyrings/
Delete the archlinux-keyring pacman package:
pacman -Rsc archlinux-keyring
Populate the keyring again:
pacman-key --populate archlinux
Configure pacman
Modify the /etc/pacman.d/mirrorlist file to include a valid Arch Linux mirror:
Server = http://mirror.csclub.uwaterloo.ca/archlinux/$repo/os/$arch
Next, create the /etc/pacman.conf file with the following configuration:
[options]
HoldPkg = pacman glibc
Architecture = auto
CheckSpace
ParallelDownloads = 5
SigLevel = Required DatabaseOptional
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
# [community]
# Include = /etc/pacman.d/mirrorlist
Prepare the installation target
Assuming you have an existing partition or logical volume prepared (e.g., /dev/vg1/arch), mount it:
mount /dev/vg1/arch arch
mkdir -p /mnt/arch/boot
mount -o bind /boot /mnt/arch/boot
Install the base system
Use pacstrap to install the base Arch system:
pacstrap /mnt/arch base sudo nano
This command installs a minimal yet functional base system.
Chroot into the new environment
Finally, change root into the newly installed Arch system:
arch-chroot /mnt/arch
From this point, you may proceed with system configuration as per a standard Arch Linux installation (e.g., locale, hostname, users, packages, bootloader, etc.).
Follow the official Arch Linux installation guide.
Conclusion
Bootstrapping Arch Linux from a Debian system is an efficient method to deploy Arch without the need for traditional installation media. This workflow is suited for advanced users managing systems remotely or automating deployments.
Related links
- Arch Linux: Preserving the kernel modules of the currently running kernel during and after an upgrade
- Installing Debian onto a separate partition from an existing distribution, such as Arch Linux or Gentoo, without using the Debian installer
- Alternative way to install Arch Linux from another distribution (official documentation)
