A remark regarding chapter 15.6 of the handbook, "Application of Jails"

volatilevoid

Active Member

Reaction score: 23
Messages: 194

Hi,

I just tried to set up jails with the help of chapter 15.6 of the handbook, "Application of Jails".

The handbook describes the process of setting up several jails very well, but still I encountered a problem when starting the jails.

When executing # /etc/rc.d/jail start, I got the message

Code:
jail: getpwnam: root: No such file or directory
and the jails fail to start. Mikhail Goriachev already posted the solution to the freebsd-jail mailing list some time ago.

I wonder if it would be possible to include this step into the handbook. It's just executing # /usr/sbin/pwd_mkdb -d /<jaildir>/etc -p /<jaildir>/etc/master.passwd before executing # /etc/rc.d/jail start.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,268
Messages: 29,700

I've always used the jail(8) man page. One of the last steps it does (after installworld) is:
Code:
make distribution DESTDIR=/jail/dir/root
And instead of duplicating /usr/ports and /usr/src I use nullfs:
Code:
mount -t nullfs /usr/ports /jail/dir/root/usr/ports
mount -t nullfs /usr/src /jail/dir/root/usr/src
These are easily added to a /etc/fstab.myjail and it means you have only one copy of them.
 
Top