Date: Sun, 20 Jul 2008 04:20:12 -0400 From: Mikhail Goriachev <mikhailg@webanoide.org> To: =?UTF-8?B?0JXQstCz0LXQvdC40Lkg0KjQsNC/0L7QstCw0Ls=?= <jeno.kiev@gmail.com>, freebsd-jail@freebsd.org Subject: Re: getpwnam: root: No such file or directory Message-ID: <4882F53C.6060604@webanoide.org> In-Reply-To: <f1eca1b20807192302t4b322dcdr2d26b684817ddb5f@mail.gmail.com> References: <f1eca1b20807190529i523c22bbp7f20bfc2561d11bc@mail.gmail.com> <488233B0.1000904@webanoide.org> <f1eca1b20807191319t4969901aya8c7b06c8f81c9dc@mail.gmail.com> <48825D18.1010001@webanoide.org> <f1eca1b20807191455w1deddd63jb63a4ea049647b2c@mail.gmail.com> <48828965.5000802@webanoide.org> <f1eca1b20807192302t4b322dcdr2d26b684817ddb5f@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Евгений Шаповал wrote: > Thanks! > >> You can't just add the root account. The jail/system should already come >> with everything. It seems like you didn't populate the jail, that is why >> there are many missing pieces. >> >> What steps did you take to make your jail? > > 1. download freebsd sources > 2. build jail, I use this script: > =================================================== > #!/bin/sh > > case "$2" in > create) > jail_dir="$1" > mkdir -p ${jail_dir} > cd /usr/src > mkdir -p ${jail_dir} > make world DESTDIR=${jail_dir} > cd /usr/src/etc ^^^^^^^^^^^^^^^ You should not change into /usr/src/etc. Remove that line from the script. > make distribution DESTDIR=${jail_dir} This is the line that populates most of your jail but it fails because it is executed from /usr/src/etc instead of /usr/src. That is why you get missing pieces. So part of your script should look something like: mkdir -p ${jail_dir} cd /usr/src make installworld DESTDIR=${jail_dir} make distribution DESTDIR=${jail_dir} mount_devfs devfs ${jail_dir}/dev You should read the Jails section in the Handbook and also the man page for jail for further details. http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails.html Regards, Mikhail. -- Mikhail Goriachev Webanoide
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4882F53C.6060604>