From owner-freebsd-stable Thu Feb 8 11:22:47 2001 Delivered-To: freebsd-stable@freebsd.org Received: from k2.jozsef.kando.hu (k2.jozsef.kando.hu [193.224.40.3]) by hub.freebsd.org (Postfix) with SMTP id 7CC3F37B67D for ; Thu, 8 Feb 2001 11:22:25 -0800 (PST) Received: (qmail 30717 invoked by uid 1000); 8 Feb 2001 19:15:42 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 8 Feb 2001 19:15:42 -0000 Date: Thu, 8 Feb 2001 20:15:42 +0100 (CET) From: Attila Nagy X-X-Sender: To: Cc: Subject: mount_null and jail Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello, I am trying to do the following setup: /jail /jail-run The first is a directory in a filesystem and holds the necessary files to run the given application. The second directory is also a simple directory but /jail mounted into it with mount_null. The command I use to mount the first dir into the second is: mount_null -o ro /jail/something /jail-run/something The purpose of this setup is to create jails within a standard UFS filesystem and to mount the directories read-only and run jailed applications in it, on a read-only partition. This wayI don't need several partitions, mounted RO and I don't have to create loopback filesystems or to do other magic (like a mounted ISO). The problem. When I start jail I often get page faults. Also I want to chroot() in the jail (ftp daemon) but it page faults in all cases. So outside# jail /jail-run/something something 127.0.0.1 /bin/sh often works and the jail starts (/jail-run is a NULL filesystem), but inside# chroot drops me a page fault and restarts the machine in every cases. I've tried out this on 4.2-RELEASE and 4.2-STABLE (05/02/2001) -RELEASE with a GENERIC and -STABLE with a custom kernel and all of them fail to survive jail and chroot on a NULL FS. Could somebody give me hints on this? I think it's a general problem and the problem is the use of the NULL FS, but how could I avoid this kind of crashes? ps: I am subscribed only to freebsd-stable so if you write to -hackers please CC me the message... Thanks in advance, -------------------------------------------------------------------------- Attila Nagy e-mail: Attila.Nagy@fsn.hu Budapest Polytechnic (BMF.HU) @work: +361 210 1415 (194) H-1084 Budapest, Tavaszmezo u. 15-17. cell.: +3630 306 6758 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message