[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] ezjail without /usr/src

mal content wrote:
> Hello.
> I wish to use ezjail to manage jails but due to various constraints of
> space and time, I can't and don't keep /usr/src on the server complete
> with object files (I certainly wouldn't even consider running 'make
> buildworld'
> on a machine of that size - it could take days).
> I can, however, populate a directory by using this command:
>  sysinstall \
>    nonInteractive=yes \
>    mediaSetCDROM \
>    distSetMinimum \
>    installRoot=/usr/jail/base \
>    releaseName=6.2-RELEASE \
>    installCommit
> ...and then do the equivalent (I believe) of 'make distribution' with:
>  mv /usr/jail/base/etc /usr/jail/template/etc

You can use "ezjail-admin install", it will install a basejail from a
set of distribution archives via ftp.

> Running ezjail-admin didn't give any (unexpected) errors:
> # ezjail-admin create test1
> [snip]
> /usr/jail/test1/etc/ppp
> /usr/jail/test1/etc/ppp/ppp.conf
> /usr/jail/test1/etc/rc.d
> [snip]
> Warning: IP not configured on a local interface.
> Then, however:
> # /usr/local/etc/rc.d/ezjail.sh start
> #
> Nothing.
> # jls
> Nothing.
> So I tried:
> # /usr/local/etc/rc.d/ezjail.sh forcestart

You have to enable ezjail in /etc/rc.conf!

> rcorder: could not open log: No such file or directory
> ezjailConfiguring jails:.
> Starting jails:mount: /usr/jail/test1/basejail: No such file or directory
> df: /usr/jail/test1/dev: No such file or directory
> mount: /usr/jail/test1/dev: No such file or directory
> /etc/rc.d/jail: WARNING: devfs_domount(): Unable to mount devfs on
> /usr/jail/test1/dev
> /etc/rc.d/jail: WARNING: devfs_mount_jail: devfs was not mounted on
> /usr/jail/test1/dev
> cd: can't cd to /usr/jail/test1/dev
> mount: /usr/jail/test1/dev: No such file or directory
> cannot start jail "test1":
> jail: no home directory

Seems like /dev and /basejail where not created in the jail you made
because they don't exist in your basejail which was created via
sysinstall and not the ezjail-admin utility. I strongly suggest to use
the ezjail-admin utility because it does a bit more then just throwing a
userland into the basejail.