From owner-freebsd-emulation@FreeBSD.ORG Fri Mar 5 08:26:24 2010 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDC92106564A; Fri, 5 Mar 2010 08:26:23 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 74C598FC0A; Fri, 5 Mar 2010 08:26:23 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2D45A.dip.t-dialin.net [217.226.212.90]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 74E5A84535C; Fri, 5 Mar 2010 09:26:17 +0100 (CET) Received: from unknown (unknown [192.168.2.110]) by outgoing.leidinger.net (Postfix) with ESMTP id 239C94F2F; Fri, 5 Mar 2010 09:26:14 +0100 (CET) Date: Fri, 5 Mar 2010 09:26:11 +0100 From: Alexander Leidinger To: freebsd-emulation@freebsd.org, ed@freebsd.org Message-ID: <20100305092611.0000772c@unknown> In-Reply-To: <201003041322.57875.lists@jnielsen.net> References: <201003021325.27197.lists@jnielsen.net> <20100303180636.GA31551@freebsd.org> <20100304114050.00007a59@unknown> <201003041322.57875.lists@jnielsen.net> X-Mailer: Claws Mail 3.7.2cvs15 (GTK+ 2.16.0; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 74E5A84535C.087C5 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.686, required 6, autolearn=disabled, ALL_TRUSTED -1.44, J_CHICKENPOX_27 0.60, TW_EV 0.08, TW_ZJ 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1268382378.66813@2A7I13fehuil7XKYXRzlqg X-EBL-Spam-Status: No Cc: Subject: Re: linux-only jail possible? X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 08:26:24 -0000 On Thu, 4 Mar 2010 13:22:57 -0500 John Nielsen wrote: Ed, I Cced you because of a ttyname thing below. It's the linuxulator ttyname call. > I went ahead and gave this a try with some encouraging results. > Comments below. > > On Thursday 04 March 2010 05:40:50 Alexander Leidinger wrote: > > Now you just need to configure a jail. It does not matter much if > > you use the jail stuff in the base system or a framework like > > ezjail or similar, as long as you configure an appropriate startup > > script in the linux-jail. The linux-startup part you need to do > > yourself, I do not think the default linux startup stuff is > > approrpiate. I suggest to start at least a sshd before you start > > the software you want to use. This way you can login into the > > linux-jail and investigate issues like it is a real system. > > I actually did install the init scripts, etc. I was pleasantly > surprised to find (after reading through them) that rc.sysinit can be > skipped entirely while rc itself will do the right thing for the rest > of the init scripts (starting services, etc). Here's what I'm using: > > jail_centos_exec_start="/bin/sh /etc/rc.d/rc 3" > jail_centos_exec_stop="/bin/sh /etc/rc.d/rc 0" > > > I suggest to monitor the kernel messages on the FreeBSD host. There > > may be linux-syscalls which are not implemented (e.g. epoll stuff). > > Thanks, I had forgotten about that. So far nothing seems to have > blown up too terribly. > > The "consoletype" utility runs despite this message: > linux: pid 2100 (consoletype): ioctl fd=0, cmd=0x541c ('T',28) is not > implemented Dokumented in the wiki. If someone knows what ioctl this is, that's some info which is needed in the wiki, so feel free to edit the page or tell me. > And sshd and crond both run despite this one: > linux: pid 2221 (sshd): syscall keyctl not implemented > linux: pid 2240 (crond): syscall keyctl not implemented That's docuemnted in the wiki. I added a note that it is used by cron and sshd. > Syslogd ran without complaint as well but didn't actually log > anything. I had to run it with "-p /var/run/log" (inside the jail via > /etc/sysconfig/syslog) and create a symlink to the socket in the > jail's /dev/log (outside the jail via exec_poststart). That's not > ideal since there's a period of time between when syslogd starts in > the jail and the symlink is created, but it works after that. It > would be better in the exec_prestart RC knob but the jail's devfs > isn't necessarily mounted at that point. Why don't you add a script into rc3 on the linux side which does the link? > My current hurdle is sshd: > Mar 3 22:20:51 centos sshd[88836]: fatal: openpty returns device for > which ttyname fails. > > Apparently the Linux sshd isn't using /dev/ptmx appropriately. I'll > probably just have to replace it with one that does.. Ed, can it be that the linuxulator ttyname stuff needs to be fixed after your tty changes? Bye, Alexander.