AIF Configuration File
- 1 What is AIF
- 2 The AIF Configuration File
What is AIF
The Arch Installation Framework is the backbone to the ArchLinux distribution installer. The AIF executes all of the routines used to install Arch. More information about AIF proper can be found in the ArchLinux Installation Guide.
The AIF Configuration File
The aif command can be executed with a configuration file which defines how Arch is to be installed. This is a similar concept to Red Hat's kickstart and Debian's preseed. But the similarities end with the concept, thanks to the Arch KISS philosophy the pain involved in automated installs is swept away. AIF is written entirely in bash, and the AIF configuration file is just that, bash. All of the variables and function definitions in the AIF configuration file are sourced shortly after the install begins and applied to the install.
With this in mind, the AIF configuration file is simply a representation of all of that data which can be defined in the global scope of the AIF. This means that available variables can be found in the aif source code.
The following variables are available in the AIF configuration file:
The source variable will be either cd or net, and will define whether the packages used are locally availabe or found over the network/internet.
for local files:
or for a source over the network/internet
The local directory containing Archlinux packages, used if SOURCE=cd
The network location used to sync packages over the network. What is important about this variable is that it is the same line that is placed in /etc/pacman.d/mirrorlist. So it is wise to use the $repo variable:
The groups to install, like base
Packages to exclude from the install
Packages to include in the install
These variables are the hard ones, and honestly the primary reason for this wiki entry, because they, like the hard drives they configure, can be complicated
The GRUB_DEVICE variable is a simple one, it is the device that will hold the grub mbr. This is almost always the primary hard drive.
The partitions line is used to load up sfdisk for disk carving. It is a space delimited list which begins with the device to carve up and then a set of colon delimited arguments which define the device sizes, type and options.
PARTITIONS='/dev/sda 100:ext2:+ 512:swap *:ext4'
Here the disk to be carved up is /dev/sda, 3 partitions will be created, /dev/sda1 will be 100 Megabytes, Linux type, and the "+" sets the grub bootable flag. /dev/sda2 is 512 Megabytes and the swap type, /dev/sda3 will take up the rest of the space, and have the type Linux.
The BLOCKDATA variable is used to determine which partitions are formatted and how they are to be mounted. While static partitions are simple and straightforward, LVM and crypt setups on the other hand can get somewhat messy.
Since AIF translates components of the variables into arguments for commands, understanding what the commands are and how the arguments are passed will greatly assist in understanding how to use the variables.
Simple File Systems
Simple file systems can be defined on top of partitions derived from the PARTITIONS variable.
A simple example:
BLOCKDATA='/dev/vda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_params /dev/vda2 raw no_label swap;yes;no_mountpoint;target;no_opts;no_label;no_params /dev/vda3 raw no_label ext4;yes;/;target;no_opts;no_label;no_params'
In this scenario, /dev/vda1 is a raw block device with no label, it is to be formatted with the ext2 file system, yes verifies that it will be formatted, /boot is the mount point, target <Not sure what target means yet>, no_opts is where file system mount options are placed, no_label can be replaced with a file system label. The parameters section is used by more advanced partitioning mechanisms.