Date: Thu, 24 May 2012 14:46:56 -0700 From: "Thomas D. Dean" <tomdean@speakeasy.org> To: freebsd-jail@freebsd.org Subject: i386 in jail on amd64 Message-ID: <4FBEAC50.4020703@speakeasy.org>
next in thread | raw e-mail | index | archive | help
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<user> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FBEAC50.4020703>