I created my first jail tonight.
My goal was to build NanoBSD images from source with -CURRENT in a jail on a FreeBSD 11.1 server.
Is this possible? I got it up and running and configured ssh but when I run uname I get FreeBSD 11.1 not -CURRENT
So can I run -CURRENT in a Jail and compile software with -CURRENT in a jail on FreeBSD 11.1?
I used this for my base.txz and source.txz
http://ftp.freebsd.org/pub/FreeBSD/snapshots/amd64/12.0-CURRENT/
This was my instruction guide:
https://clinta.github.io/freebsd-jails-the-hard-way/
Command prompt to configure jail and create root passwd:
Start Jail
SSH into the jail:
Should I be using Bhyve instead of a Jail?
My goal was to build NanoBSD images from source with -CURRENT in a jail on a FreeBSD 11.1 server.
Is this possible? I got it up and running and configured ssh but when I run uname I get FreeBSD 11.1 not -CURRENT
So can I run -CURRENT in a Jail and compile software with -CURRENT in a jail on FreeBSD 11.1?
I used this for my base.txz and source.txz
http://ftp.freebsd.org/pub/FreeBSD/snapshots/amd64/12.0-CURRENT/
This was my instruction guide:
https://clinta.github.io/freebsd-jails-the-hard-way/
mkdir /jails && mkdir /jails/current
fetch ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/amd64/12.0-CURRENT/base.txz -o /tmp/base.txz
tar -xvf /tmp/base.txz -C /jails/current
cp /etc/resolv.conf /jails/current/etc/resolv.conf
cp /etc/localtime /jails/current/etc/localtime
echo hostname=\"current-jail\" >> /jails/current/etc/rc.conf
Code:
# /etc/jail.conf
# Global settings applied to all jails.
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.clean;
mount.devfs;
# The jail definition for my jail
current {
host.hostname = "current-jail.domain.local";
path = "/jails/current";
interface = "igb0";
ip4.addr = 10.0.0.100;
}
Command prompt to configure jail and create root passwd:
jail -c path=/jails/current mount.devfs \host.hostname=current-jail ip4.addr=10.0.0.100 \command=/bin/sh
Start Jail
jail -c current
Code:
root@gigabyte:~ # jail -c current
current: created
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
32-bit compatibility ldconfig path: /usr/lib32
Setting hostname: current-jail.
Creating and/or trimming log files.
Starting syslogd.
Clearing /tmp.
Updating motd:.
Performing sanity check on sshd configuration.
Starting sshd.
Starting cron.
Mon Nov 6 01:04:23 EST 2017
root@gigabyte:~ #
SSH into the jail:
ssh 10.0.0.100
root@current-jail:~ # uname -a
FreeBSD current-jail 11.1-RELEASE-p1 FreeBSD 11.1-RELEASE-p1 #0: Wed Aug 9 11:55:48 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64
Should I be using Bhyve instead of a Jail?