Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Dec 2005 11:26:18 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-amd64@freebsd.org
Subject:   Re: Chroot to a 32 bits environment
Message-ID:  <200512271126.19336.jhb@freebsd.org>
In-Reply-To: <1135509244.49716.24.camel@abutre>
References:  <1135509244.49716.24.camel@abutre>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 25 December 2005 06:14 am, Flavio Pimentel Silvestrow wrote:
> Hello.
>
> I'm trying to setup a 32 bits environment on a amd64 system (6.0-STABLE
> as of Dec 18).
>
> My goal is to be able to build (and run!) ports marked as
> ONLY_FOR_ARCHS=i386. I'm not sure it's going to work, but I'm willing to
> find out.
>
> Anyway, I built the 32 bits world and installed on a different folder,
> like this:
>
> 	# cd /usr/src
> 	# make TARGET_ARCH=i386 buildworld
> 	# make TARGET_ARCH=i386 DESTDIR=/usr/32 installworld
>
> All went fine. I then mount /usr/32/dev adding the line below
> to /etc/rc.conf and restarting devd:
>
> 	devfs_set_rulesets="/usr/32/dev=devfsrules_jail"
>
> Finally, I mount /usr/32/proc and chroot the whole thing:
>
> 	# mount -t procfs proc /usr/32/proc
> 	# chroot /usr/32
>
> First error is:
>
> 	cannot stat /var/run/utmp.  Please "unset watch".
>
> Which makes commands like 'who' unhappy. On to a more important test:
>
> 	# truss ping 127.0.0.1
> [ *** SNIP *** ]
> gettimeofday({1135506828 464440},0x0)            = 0 (0x0)
> sendto(0x3,0x804ee14,0,0x0,{ AF_INET 127.0.0.1:0 },0x10) = 64 (0x40)
> gettimeofday({1135506828 468435},0x0)            = 0 (0x0)
> gettimeofday({1135506828 470434},0x0)            = 0 (0x0)
> select(4,{3},0x0,0x0,{0 998001})                 = 1 (0x1)
> recvmsg()                                        ERR#78 'Function not
> implemented'
> SIGNAL 12 (SIGSYS)
> SIGNAL 12 (SIGSYS)
> Process stopped because of:  16
> process exit, rval = 12
> Bad system call

Try backporting the changes to sys/compat/freebsd32/ from HEAD which include 
recvmsg and friends.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512271126.19336.jhb>