ArchBSD in a FreeBSD 10 jail

Speak
Clear All

ArchBSD can be installed in a jail on a host FreeBSD very easily because very close. Indeed, where Debian GNU/kFreeBSD is a Debian using a FreeBSD kernel, ArchBSD can be summed up in the following equation: ArchBSD = FreeBSD + pacman. On ArchBSD there a rc.conf (with the daemon_enable = “YES”) and operation requires no Linux compatibility layer.
Creation of the jail

Unfortunately ArchBSD does not image all ready that would suffice to decompress. He’ll use pacman and tweak a bit to make it work.

# pkg install pacman

Then create a file /etc/Pacman.conf (in the current directory) with the following content:

[options]
SigLevel = Never
[core]
Server = ftp://ftp.archbsd.net/core/os/x86_64

Note: x86_64 is replaced by i686 if your system is 32-bit.

Create the directory of the jail as well as two directories necessary to pacman:

# mkdir/usr/jails/archbsd
# mkdir-p/usr/jails/archbsd/var/lib/pacman
# mkdir-p/usr/jails/archbsd/var/cache/pacman/pkg

Proceed with the installation:

Pacman – Sy base.
-r/usr/jails/archbsd \.
-cachedir/usr/jails/archbsd/var/cache/pacman.
-arch x86_64.
-config /etc/Pacman.conf

Configuration of the jail

Edit your /etc/jail.conf to add your archbsd jail. Example:

# DEFAULT PARAMETERS
#
exec.start = “/ bin/sh/etc/rc”;
exec.stop = “/ bin/sh /etc/rc.shutdown”;
exec.clean;
Mount.devfs;
path = “/ usr/jails/$name”;
host.hostname = “$name”;

# INDIVIDUAL JAIL PARAMETERS
#
archbsd {}
ip4.addr @description re0|192.168.0.13.
persist;
}

Then start the jail:

# service jail start

Configure ArchBSD

Enter the ArchBSD jail:

# jexec archbsd bash

Firstly, we have a concern with pacman. Indeed architecture detection does not work well (FreeBSD uses amd64 for 64 bit systems, while the deposits of ArchBSD x86_64), therefore the force. Edit the file /etc/pacman.conf and change as following:

Architecture = x86_64

Note: Of course if you are on of 32 bits, it is i686 that should be seized.

Then you need to initiate the pacman keyring with the following commands:

# pacman-key – init
# pacman – key – populate archbsd

And now ArchBSD is ready!