From owner-freebsd-hackers Mon Mar 25 2: 3:49 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.tvcom.ru (ns.tvcom.ru [80.246.64.2]) by hub.freebsd.org (Postfix) with ESMTP id 01CFB37B419 for ; Mon, 25 Mar 2002 02:03:32 -0800 (PST) Received: from niokr2 (niokr2.tvcom.ru [80.246.64.107]) by ns.tvcom.ru (8.11.6/8.11.6) with SMTP id g2PA3Ub51048 for ; Mon, 25 Mar 2002 13:03:31 +0300 (MSK) Message-ID: <002601c1d3e4$f448cae0$6b40f650@niokr2> From: "Victor Polyakov" To: Subject: jail + mount_union problem Date: Mon, 25 Mar 2002 13:08:04 +0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0023_01C1D3FE.1938EEC0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_NextPart_000_0023_01C1D3FE.1938EEC0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable We have a system with some jails. First jail's home directory is = /data/jails/ref. Then, we are running script "crash" under root: ----------- #! /usr/local/bin/bash SRC=3D/data/jails/ref DEST=3D/data/jails/$1 mkdir $DEST mkdir $DEST/usr mount_union -b $SRC/usr $DEST/usr mkdir $DEST/bin mount_union -b $SRC/bin $DEST/bin mkdir $DEST/root mount_union -b $SRC/root $DEST/root jail /data/jails/$1 jail$1 $2 /bin/csh /root/scripts/runjail mount_union -b $SRC/usr $DEST/usr mount_union -b $SRC/bin $DEST/bin mount_union -b $SRC/root $DEST/root -------------- Originally, this script was designed to make a clone of the first jail. = Contents of /root/scripts/runjail: ------------- sshd /usr/local/apache/bin/apachectl start cd /usr/local/mysql bin/safe_mysqld --user=3Dmysql & cron ------------- After this, system hangs up. When trying to reboot with "boot -sv" we = see: ... ... trying /sbin/init... and freebsd halts again. There is no way to boot up. Of course, fsck = reports "no problem" and checksum of /sbin/init is correct. The only way = to continue working is to run "upgrade" from the instalation CD. We are using freebsd 4.5. May be anybody knows solution for this problem? Victor Polyakov (victor@tvcom.ru) ------=_NextPart_000_0023_01C1D3FE.1938EEC0 Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable
 
    We have a system = with some=20 jails. First jail's home directory is /data/jails/ref. Then, we are = running=20 script "crash" under root:
 
-----------
 
#! /usr/local/bin/bash
 
SRC=3D/data/jails/ref
DEST=3D/data/jails/$1
mkdir $DEST
 
mkdir $DEST/usr
mount_union -b = $SRC/usr=20 $DEST/usr
 
mkdir $DEST/bin
mount_union -b = $SRC/bin=20 $DEST/bin
 
mkdir $DEST/root
mount_union -b = $SRC/root=20 $DEST/root
 
jail /data/jails/$1 jail$1 $2 /bin/csh=20 /root/scripts/runjail
 
mount_union -b $SRC/usr = $DEST/usr
 
mount_union -b $SRC/bin = $DEST/bin
 
mount_union -b $SRC/root=20 $DEST/root
--------------
 
Originally, this script was designed to = make a=20 clone of the first jail. Contents of /root/scripts/runjail:
 
-------------
 
sshd
/usr/local/apache/bin/apachectl = start
cd=20 /usr/local/mysql
bin/safe_mysqld --user=3Dmysql = &
cron
 
-------------
 
After this, system hangs up. When = trying to reboot=20 with "boot -sv" we see:
 
...
...
trying /sbin/init...
 
and freebsd halts again. There is no = way to boot=20 up. Of course, fsck reports "no problem" and checksum of /sbin/init = is=20 correct. The only way to continue working is to run=20 "upgrade" from the instalation CD.
 
We are using freebsd 4.5.
 
May be anybody knows solution for this=20 problem?
 
Victor Polyakov (victor@tvcom.ru)
 
------=_NextPart_000_0023_01C1D3FE.1938EEC0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message