From owner-freebsd-jail@FreeBSD.ORG Thu May 24 21:47:00 2012 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3003C106566C for ; Thu, 24 May 2012 21:47:00 +0000 (UTC) (envelope-from tomdean@speakeasy.org) Received: from asbnvacz-mailrelay01.megapath.net (asbnvacz-mailrelay01.megapath.net [207.145.128.243]) by mx1.freebsd.org (Postfix) with ESMTP id E44F78FC08 for ; Thu, 24 May 2012 21:46:59 +0000 (UTC) Received: from mail1.sea5.speakeasy.net (mail1.sea5.speakeasy.net [69.17.117.39]) by asbnvacz-mailrelay01.megapath.net (Postfix) with ESMTP id 127C9A70586 for ; Thu, 24 May 2012 17:46:58 -0400 (EDT) Received: (qmail 2871 invoked from network); 24 May 2012 21:46:58 -0000 Received: by simscan 1.4.0 ppid: 2328, pid: 19519, t: 1.3019s scanners: clamav: m: Received: from unknown (HELO P9X79.tddhome) (tomdean@[24.113.107.31]) (envelope-sender ) by mail1.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 24 May 2012 21:46:57 -0000 Message-ID: <4FBEAC50.4020703@speakeasy.org> Date: Thu, 24 May 2012 14:46:56 -0700 From: "Thomas D. Dean" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120310 Thunderbird/10.0.2 MIME-Version: 1.0 To: freebsd-jail@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail1.sea5 X-Spam-Level: X-Spam-Status: No, score=0.9 required=8.0 tests=FORGED_RCVD_HELO, RATWARE_GECKO_BUILD autolearn=disabled version=3.0.4 Subject: i386 in jail on amd64 X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2012 21:47:00 -0000 I have i386 running in jail on amd64, sort of. I need the i386 environment to develop for a nanoBSD installaion on an ELAN SC520. I am very inexperienced with jail (both kinds, I hope). Setting all this up was not easy. Or, maybe I am slow. How do I get a writeup into the handbook of building the i386 distribution on amd64 and using jail to run the i386 system? I can create a text file of what I did if someone can do the insert into the handbook. There seem to be some problems. Often things are just flaky. No problem I can describe, just things are 'off'. For example, in the jail, I had etc/rc.conf. When I tried to edit it with vi, I got something completely different. A very old version of rc.conf. But, cat etc/rc.conf shows the new one. I rebooted the host and that problem cleared itself. But, after some time other funny things happen. I can use emacs on the host to write code for the i386 jail, compile in the jail and execute in the nanoBSD system. I can launch an xterm from within the jail on the host display. I can access the network, for example, to fetch ports. I can use emacs on the host to write code for the i386 jail, compile in the jail and execute in the nanoBSD system. However, emacs from within the jail warns of problems and frequently exits without warning or error. > emacs (emacs:90036): GLib-WARNING **: In call to g_spawn_sync(), exit status of a child process was requested but SIGCHLD action was set to SIG_IGN and ECHILD was received by waitpid(), so exit status can't be returned. This is a bug in the program calling g_spawn_sync(); either don't request the exit status, or don't set the SIGCHLD action. GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details - 1: Failed to get connection to session: Command line `dbus-launch --autolaunch=9376113602d18a766c6d6bf100035e9d --binary-syntax --close-stderr' exited with non-zero exit status 2655172: Unable to create /root/.dbus\nUnable to create /root/.dbus/session-bus\n) (emacs:90036): GLib-WARNING **: In call to g_spawn_sync(), exit status of a child process was requested but SIGCHLD action was set to SIG_IGN and ECHILD was received by waitpid(), so exit status can't be returned. This is a bug in the program calling g_spawn_sync(); either don't request the exit status, or don't set the SIGCHLD action. (emacs:90036): GdkPixbuf-WARNING **: Cannot open pixbuf loader modu # exit from sh will terminate the jail le file '/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory (emacs:90036): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory (emacs:90036): GdkPixbuf-WARNING **: Error loading XPM image loader: Image type 'xpm' is not supported (emacs:90036): Gdk-WARNING **: shmget failed: error 78 (Function not implemented) (emacs:90036): Gdk-WARNING **: XID collision, trouble ahead (emacs:90036): Gdk-WARNING **: XID collision, trouble ahead Tom Dean I built the i386 system on amd64 and it seems to be Ok. Here is what I did Prepare i386KRNCFG and place in /usr/src/sys/i386/conf env -i MACHINE_ARCH=amd64 \ MACHINE=amd64 \ DESTDIR=/diskless/i386 \ make TARGET=i386 buildworld env -i MACHINE_ARCH=amd64 \ MACHINE=amd64 \ DESTDIR=/diskless/i386 \ make TARGET=i386 KERNCONF=GENERIC buildkernel env -i MACHINE_ARCH=amd64 \ MACHINE=amd64 \ DESTDIR=/diskless/i386 \ make installworld env -i MACHINE_ARCH=amd64 \ MACHINE=amd64 \ DESTDIR=/diskless/i386 \ make installkernel KERNCONF=GENERIC env -i MACHINE_ARCH=amd64 \ MACHINE=amd64 \ DESTDIR=/diskless/i386 \ make TARGET=i386 distribution mergemaster -A i386 -D /diskless/i386 ======================================= start the jail sudo mount -t devfs devfs /diskless/i386/dev sudo sudo ifconfig em0 inet alias 192.168.2.23 sudo mount -t procfs proc /diskless/i386/proc sudo jail -c -U path=/diskless/i386 \ host.hostname=p9x79 ip4.addr=192.168.2.23 command=/bin/tcsh from within the jail, execute /etc/rc > su > sh /etc/rc on the host: xhost +192.168.2.23 in the jail xterm, emacs, etc emacs is funny.