Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2008 18:02:26 -0800
From:      "Kurt Buff" <kurt.buff@gmail.com>
To:        "Jon Passki" <jon.passki@hursk.com>
Cc:        freebsd-jail@freebsd.org
Subject:   Re: Newb alert...
Message-ID:  <a9f4a3860801301802m5d3ca62l3aaa510a6097c708@mail.gmail.com>
In-Reply-To: <cc6847e40801301338h1d021399j8e1bb3b1475ea5fb@mail.gmail.com>
References:  <a9f4a3860801301248s46f15254r8676478b8c0fc9dd@mail.gmail.com> <cc6847e40801301338h1d021399j8e1bb3b1475ea5fb@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 30, 2008 1:38 PM, Jon Passki <jon.passki@hursk.com> wrote:
> On 1/30/08, Kurt Buff <kurt.buff@gmail.com> wrote:
> > All,
> >
> > I'm trying to set up my first jail, and have been following the
> > handbook, Chapter 15, and a printout of 'man 8 jail' from the
> > freebsd.org web site.
> >
> > I've followed the steps in the handbook through 15.4 (the 'make
> > distribution' step got an error, which I ignored after reading the
> > notes) up to the point where I entered the following in my
> > /etc/rc.conf.
>
> If possible, can you post all of the steps?


# mkdir -p /jails/wotan

# setenv D /jails/wotan

# cd /usr/src

# makeworld DESTDIR=$D && make distribution DESTDIR=$D && mount_devfs
devfs $D $D/dev

I then edited /etc/rc.conf to include the lines below.

> > jail_enable="YES"
> > jail_list="wotan"
> > jail_wotan_rootdir="/jails/wotan"
> > jail_wotan_hostname="wotan.mycompany.com"
> > jail_wotan_ip="192.168.24.123"
> > jail_wotan_devfs_enable="YES"
> > jail_wotan_devfs_ruleset="wotan_ruleset"
> >
> > I then did /etc/rc.d/jail /start wotan
>
> `/etc/rc.d/jail start wotan`  # notice no forward slash in front of 'start'

Yes - that's a typo on my part - I did actually omit the slash at the
command line.

> Also, I don't see a "jail_exec_start" statement nor a
> "jail_wotan_exec_start" statement anywhere.  This could easily cause
> problems.  You should have something like:
>
> jail_wotan_exec_start="/bin/sh /etc/rc"              # command to
> execute in jail for starting
> jail_wotan_exec_stop="/bin/sh /etc/rc.shutdown"      # command to
> execute in jail for stopping
>
> Somewhere.  If you remove the "wotan" from the above, then that will
> be the default setting.

Good to know. I'm assuming that they can be put in with the rest of
the lines in /etc/rc.conf?

> >
> > and that didn't work, giving the following lines:
> >
> >      Starting jails: cannot start jail "wotan":
> >      jail: getpwnam: root: no such file or directory
>
> Does /jails/wotan/etc/passwd, /jails/wotan/etc/master.passwd,
> /jails/wotan/etc/pwd.db, and /jails/wotan/etc/spwd.db exist?

No, I'm afraid not.

> > I googled a bit, but only find a reference to this on the -current
> > list, regarding ZFS, which I'm not using.
>
> Red herring, methinks.
>
> Jon
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a9f4a3860801301802m5d3ca62l3aaa510a6097c708>