Installation of the base Arch system

The larch live system will normally be built from a fresh (unmodified, unconfigured) Arch installation. The Installation stage, based on the 'larch-archin' command, handles the creation of this installation by downloading all the desired packages (if they are not already in the host's package cache) and installing them to an empty directory (by default '/home/larchbuild').

Other approaches are possible, such as using an already existing system or building a fresh installation in some other way. In that case you can skip this page.

By default the package cache on the build host will be used, so that only packages which have not already been downloaded will be fetched from the chosen mirror. But it is possible to select another cache location, which can also be on a remote machine, mounted using sshfs or NFS.

This raw installation will not normally be modified by larch, so it can be reused, or even carefully experimented with. However, note that any changes you make to this installation manually will not be reflected in the profile, so it might be difficult to reproduce what you have done at a later time, or to revert the changes. If you want to configure your system, then the raw installation is probably not the best place for it, consider rather using the 'rootoverlay' directory in the profile. All files in this directory will 'overwrite' (well, 'overlay', actually) corresponding files in the base installation, by placing them in a higher layer in the aufs mount in the live system. This makes it very easy to collect your own customizations in a way that can be applied quickly to a future build.

See GUI Tab: Installation for details of the GUI for this process.

'pacman.conf' and 'mirrorlist'

To make it a little easier to manage upstream changes to the default 'pacman.conf', a separate file ('pacman.conf.repos') is used to specify the repositories to use (the bit in 'pacman.conf' after the options). There is a default version of this file in the larch package at 'data/pacman.conf.repos', and for most simple installations this is probably adequate, but if you need to change it you can place your own version in the profile.

Note that this file does not use the standard format, but packs repository name and "server line" together on one line, separated by ':'. There is no way to supply more than one "server line". There are a couple of special 'codes', which archin will convert:

  • '*platform*' will be converted to 'i686' or 'x86_64' as appropriate (according to the host).
  • '*default*' will be converted to the standard 'Include' entry. This is normally 'Include = /etc/pacman.d/mirrorlist', but for installation (only) this will be overridden if there is a 'mirrorlist' file in the working directory - if neither exists, the fallback is 'data/mirrorlist' within the larch base directory. This latter file is not supplied in the 'larch' package, as it is not intended for use on Arch systems. When the 'larch-setup' script detects that no 'pacman' command is available, it downloads the 'pacman-allin' package and among the things that gets extracted from it is this 'mirrorlist' file.
Here is an example of a 'pacman.conf.repos' file:

# Package repository entries for pacman.conf
# '*platform*' will be replaced by 'i686' or 'x86_64' as appropriate.
# '*default*' will be replaced by 'Include = /etc/pacman.d/mirrorlist'
# (but for the installation: a 'mirrorlist' file in the working directory will
# be preferred, or - if neither exists - then 'data/mirrorlist')

# You can add your own custom repositories (anywhere).

larch:      Server = ftp://ftp.berlios.de/pub/larch/larch8/*platform*
#testing:    *default*
core:       *default*
extra:      *default*
community:  *default*

The top part of the complete 'pacman.conf' (the options) is taken from a normal default 'pacman.conf' supplied in the 'larch' package at 'data/pacman.conf'. You can override this by placing your own version in the profile, as 'pacman.conf.options' (note that any repositories you might specify in this file will be ignored). A further option is to specify a version of the file 'pacman.conf.repos' to be used only for the installation (not for the resulting live system. This is especially useful if you have a local package repository/mirror.

The complete 'pacman.conf' file is generated by combining the header part and the repository part and is saved to a temporary location for the installation. After the installation is complete a final version of this file (that for the live system) is placed at the standard location within the installation, '/etc/pacman.conf'. Note that it is not placed in the overlay, but - as an exception to the rule - directly within the installation.

Usage example: The 'dummy' mirror

During testing I found it useful to work with stable repositories. I did this without creating a proper local mirror, but by creating a sort of 'dummy' mirror containing only the ****.db.tar.gz files, relying on the cache to supply the actual package files. (The script 'repos.sh' supplied with larch in the 'scripts' directory can build these 'db' files from the current state of the pacman sync database on the host.)

If you are running the commands on the console you can pass the path to a customized repository list file with the '-r' option. Remeber this file must be constructed as detailed above.

Custom packages

It is possible to include your own 'custom' packages in the installation. Maybe ones you have compiled yourself, e.g. from the AUR, or modified versions (fixes or customizations) of standard packages. To do this you need to put your packages in a directory and run gen-repo, supplied with larch in the 'scripts' directory, on this directory (run it without arguments to get usage instructions). Then place an entry for this new repository in your 'pacman.conf.repos'. If your packages replace some in the existing repositories, your custom repository needs to come before those repositories in 'pacman.conf.repos'. Any packages you want installed now just need to be listed in addedpacks.

Selection of packages to be installed

The (compulsory) profile file 'addedpacks' contains a list of packages (just the package names, as supplied to 'pacman -S') to be installed, one package name per line (empty lines and lines starting with '#' are ignored). Also names of package groups may be included in this file, to request installation of the whole group. If a group name is preceded by '*', individual packages belonging to the group can be excluded via the 'vetopacks' file (see below) - without the '*' this exclusion is not possible. It is also possible to 'include' other files by means of lines starting with '+' - this may be followed by the absolute or relative path to the file to be included. Package dependencies are handled by pacman automatically.

The (optional) profile file 'vetopacks' allows packages to be excluded from the installation list. This can be useful if individual packages from a group should be excluded. However, note that inclusion of a package in this file does not guarantee that it will not be installed - the package is only removed from the installation list. If it is required by another package it will be installed anyway. It is also possible to 'include' other files in the veto list using '+' lines.

Certain 'required' and 'suggested' packages are included by default, these are in the file 'data/requiredpacks' in the 'larch' package. This file should generally not be edited, because an update of the 'larch' package will overwrite any changes. Packages listed in this file can be excluded by listing them in the profile 'vetopacks' file. The whole file can be overridden in 'addedpacks' by starting that with '!!!'. But only do that if you really know what you are doing.