basejails functionality and usage

21 views
Skip to first unread message

to...@chief.de

unread,
Jan 31, 2019, 7:44:03 AM1/31/19
to iocage
Hi,

I started to play around with iocage for jail management a few days ago. It works excellently so far - therefore big thanks!

Installation was very easy and documentation is good for most uses (shared IP, templates) but I wasn't able to figure out how basejails are working. The documentation regarding this is a little bit slim.
The only thing I know is that they exist and can be created with the -b option and work a little bit different than that of ezjails

Could you please shortly explain the functionality and usage of basejails? What do they provide and share with other jails and how to create jails based on them?

Many thanks in advance

Brandon Schneider

unread,
Jan 31, 2019, 1:30:27 PM1/31/19
to to...@chief.de, iocage
Hey Torge,

So you are confusing templates and basejails a bit here. Let me try to unpack the concepts.

Templates - Use these to create jails from (including basejails), they funcion like a RELEASE for all intents and purposes
Basejails - These will nullfs mount all the necessary directories from a RELEASE to inherit any changes to that RELEASE (updates).  You could create a jail from a basejail if you set that basejail to a template. As for what they share, you can do iocage fstab -l JAIL to see which directories are shared exactly.

Here's a paste from my 'foo' jail:
root@freenas[~]# iocage fstab -lh foo
0       /mnt/tank/iocage/releases/11.2-RELEASE/root/bin /mnt/tank/iocage/jails/foo/root/bin nullfs ro 0 0
1       /mnt/tank/iocage/releases/11.2-RELEASE/root/boot /mnt/tank/iocage/jails/foo/root/boot nullfs ro 0 0
2       /mnt/tank/iocage/releases/11.2-RELEASE/root/lib /mnt/tank/iocage/jails/foo/root/lib nullfs ro 0 0
3       /mnt/tank/iocage/releases/11.2-RELEASE/root/libexec /mnt/tank/iocage/jails/foo/root/libexec nullfs ro 0 0
4       /mnt/tank/iocage/releases/11.2-RELEASE/root/rescue /mnt/tank/iocage/jails/foo/root/rescue nullfs ro 0 0
5       /mnt/tank/iocage/releases/11.2-RELEASE/root/sbin /mnt/tank/iocage/jails/foo/root/sbin nullfs ro 0 0
6       /mnt/tank/iocage/releases/11.2-RELEASE/root/usr/bin /mnt/tank/iocage/jails/foo/root/usr/bin nullfs ro 0 0
7       /mnt/tank/iocage/releases/11.2-RELEASE/root/usr/include /mnt/tank/iocage/jails/foo/root/usr/include nullfs ro 0 0
8       /mnt/tank/iocage/releases/11.2-RELEASE/root/usr/lib /mnt/tank/iocage/jails/foo/root/usr/lib nullfs ro 0 0
9       /mnt/tank/iocage/releases/11.2-RELEASE/root/usr/libexec /mnt/tank/iocage/jails/foo/root/usr/libexec nullfs ro 0 0
10      /mnt/tank/iocage/releases/11.2-RELEASE/root/usr/sbin /mnt/tank/iocage/jails/foo/root/usr/sbin nullfs ro 0 0
11      /mnt/tank/iocage/releases/11.2-RELEASE/root/usr/share /mnt/tank/iocage/jails/foo/root/usr/share nullfs ro 0 0
12      /mnt/tank/iocage/releases/11.2-RELEASE/root/usr/libdata /mnt/tank/iocage/jails/foo/root/usr/libdata nullfs ro 0 0
13      /mnt/tank/iocage/releases/11.2-RELEASE/root/usr/lib32 /mnt/tank/iocage/jails/foo/root/usr/lib32 nullfs ro 0 0


-Brandon


--
You received this message because you are subscribed to the Google Groups "iocage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iocage+un...@googlegroups.com.
To post to this group, send email to ioc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iocage/775e306e-b546-4d06-a8f1-136709499356%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

to...@chief.de

unread,
Feb 2, 2019, 9:29:40 AM2/2/19
to iocage
Hi Brandon,

many thanks for your fast reply!
Yes you're right - I was a little bit confused about basejails and
templates and their differences. Think I got it now, it works similar
to ezjails which also use mount_nullfs(8).

I will keep on playing around with some testjails before put it in
production.

Keep on great work!

Best regards,
Torge

Brandon Schneider

unread,
Feb 2, 2019, 2:27:49 PM2/2/19
to to...@chief.de, iocage
Thanks Torge! Good luck :)


For more options, visit https://groups.google.com/d/optout.
--
-Brandon
Reply all
Reply to author
Forward
0 new messages