Using template of a basejail to create new jail

20 views
Skip to first unread message

Vinoth Deivasigamani

unread,
Feb 19, 2023, 10:12:21 AM2/19/23
to iocage
I created a jail of type basejail and name "test_template". Then I set the template attribute to yes. I created a new jail called "test" based on the template "test_template". I could not start the newjail. It looks like the reason is that the new jail's (name test) fstab does not have the nullfs entries pointing to the RELEASE. However, test_template's fstab has those entries. What am I doing wrong? Here are some, and outputs to illustrate what I'm describing here:

% iocage list -t
+------+---------------+-------+--------------+------+
| JID  |     NAME      | STATE |   RELEASE    | IP4  |
+======+===============+=======+==============+======+
| None | test_template | down  | 13.1-RELEASE | DHCP |
+------+---------------+-------+--------------+------+

+------+---------------+-------+--------------+------+
% iocage fstab -l test_template
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| INDEX |                                                                FSTAB ENTRY                                                                |
+=======+===========================================================================================================================================+
| 0     | /mnt/Tank/iocage/releases/13.1-RELEASE/root/bin /mnt/Tank/iocage/jails/test_template/root/bin   nullfs  ro      0       0                 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 1     | /mnt/Tank/iocage/releases/13.1-RELEASE/root/boot        /mnt/Tank/iocage/jails/test_template/root/boot  nullfs  ro      0       0         |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 2     | /mnt/Tank/iocage/releases/13.1-RELEASE/root/lib /mnt/Tank/iocage/jails/test_template/root/lib   nullfs  ro      0       0                 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 3     | /mnt/Tank/iocage/releases/13.1-RELEASE/root/libexec     /mnt/Tank/iocage/jails/test_template/root/libexec       nullfs  ro      0       0 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 4     | /mnt/Tank/iocage/releases/13.1-RELEASE/root/rescue      /mnt/Tank/iocage/jails/test_template/root/rescue        nullfs  ro      0       0 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 5     | /mnt/Tank/iocage/releases/13.1-RELEASE/root/sbin        /mnt/Tank/iocage/jails/test_template/root/sbin  nullfs  ro      0       0         |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 6     | /mnt/Tank/iocage/releases/13.1-RELEASE/root/usr/bin     /mnt/Tank/iocage/jails/test_template/root/usr/bin       nullfs  ro      0       0 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 7     | /mnt/Tank/iocage/releases/13.1-RELEASE/root/usr/include /mnt/Tank/iocage/jails/test_template/root/usr/include   nullfs  ro      0       0 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 8     | /mnt/Tank/iocage/releases/13.1-RELEASE/root/usr/lib     /mnt/Tank/iocage/jails/test_template/root/usr/lib       nullfs  ro      0       0 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 9     | /mnt/Tank/iocage/releases/13.1-RELEASE/root/usr/libexec /mnt/Tank/iocage/jails/test_template/root/usr/libexec   nullfs  ro      0       0 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 10    | /mnt/Tank/iocage/releases/13.1-RELEASE/root/usr/sbin    /mnt/Tank/iocage/jails/test_template/root/usr/sbin      nullfs  ro      0       0 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 11    | /mnt/Tank/iocage/releases/13.1-RELEASE/root/usr/share   /mnt/Tank/iocage/jails/test_template/root/usr/share     nullfs  ro      0       0 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 12    | /mnt/Tank/iocage/releases/13.1-RELEASE/root/usr/libdata /mnt/Tank/iocage/jails/test_template/root/usr/libdata   nullfs  ro      0       0 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+
| 13    | /mnt/Tank/iocage/releases/13.1-RELEASE/root/usr/lib32   /mnt/Tank/iocage/jails/test_template/root/usr/lib32     nullfs  ro      0       0 |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------+

% iocage create -t test_template -n test
<I no longer have the console output, but command and was successful>

% iocage start test
* Starting test
  + Started OK
  + Using devfs_ruleset: 1006 (iocage generated default)
  + Using IP options: ip4.saddrsel=1 ip4=new ip6.saddrsel=1 ip6=new
  + Starting services FAILED
ERROR:
[b'jexec: execvp: /bin/sh: No such file or directory\n', b'', b'']

Refusing to start test: exec_start failed

% iocage fstab -l test
+-------+-------------+
| INDEX | FSTAB ENTRY |
+=======+=============+
+-------+-------------+


Reply all
Reply to author
Forward
0 new messages