Skip to content

ArchLinux installation steps

Xiangyan Sun edited this page Sep 21, 2015 · 8 revisions

NOTE: This is for advanced users only. Ordinary users should visit Beginner's Guide.

This article describes the steps to manually install a working ArchLinux distribution under Foreign Linux. Here "working" means the ArchLinux package manager pacman, along other basic utilities like bash is working. You may find other applications to fail, which is normal given the current state of Foreign Linux.

Preparation

The working directory structure used in this article is listed below.

+ archlinux
|-- ...
| busybox
| flinux.exe
| start.cmd

You should now download or compile a "flinux.exe" binary and place it in the working directory. Other files will be described below.

Setup busybox

Get a statically compiled busybox binary. For convenience you can use the busybox-static package from debian. Download the package here. Then extract the "busybox" executable from within the tarball, place it in our working directory along with flinux.exe.

Open a command line prompt at the working directory. Run the following command.

flinux busybox --help

If you see a list of supported commands of the busybox binary, things are working and you can continue.

Install ArchLinux tarball

Download the latest ArchLinux i686 (not x86-64) bootstrap tarball from an ArchLinux mirror. For example https://mirrors.kernel.org/archlinux/iso/latest/. The file should be named like "archlinux-bootstrap-2015.01.01-i686.tar.gz". Place it in the working directory. Run the following command to extract the tarball.

flinux busybox tar xvzf archlinux-bootstrap-2015.01.01-i686.tar.gz
flinux busybox mv root.i686 archlinux

Create file "start.cmd" with the following content:

@cd archlinux
@..\flinux /bin/bash

Run the batch file, you should have a working bash prompt now. All commands below are executed in bash.

Set up environment

Set up DNS server.

Add the server 8.8.8.8 (or change to whatever you prefer) to resolv.conf.

echo "nameserver 8.8.8.8" > /etc/resolv.conf
curl http://www.google.com # for test

Disable pacman signature verification

GnuPG currently does not run under Foreign Linux because of its use of threads. Hence signature verification must be disabled to get pacman working. Pick up a text editor and open "/etc/pacman.conf". Replace the following line:

SigLevel    = Required DatabaseOptional

with

SigLevel    = Never

Choose pacman mirror

Edit "/etc/pacman.d/mirrorlist", uncomment an existing server or add a local one.

Done

If things went well, pacman should be usable now. Try update database and upgrade the whole system.

pacman -Syu

Now you can use pacman -S name command to install applications. Refer to ArchLinux documentation for further information. Enjoy!