From owner-freebsd-amd64@FreeBSD.ORG Sun Dec 25 11:14:14 2005 Return-Path: X-Original-To: freebsd-amd64@freebsd.org Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A926A16A41F for ; Sun, 25 Dec 2005 11:14:14 +0000 (GMT) (envelope-from bozo@abutre.homeip.net) Received: from smtp.dcc.ufmg.br (turquesa.dcc.ufmg.br [150.164.0.69]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37E7943D5E for ; Sun, 25 Dec 2005 11:14:13 +0000 (GMT) (envelope-from bozo@abutre.homeip.net) Received: from abutre.homeip.net (unknown [201.19.151.151]) by smtp.dcc.ufmg.br (Postfix) with ESMTP id 5132B78C18 for ; Sun, 25 Dec 2005 09:14:11 -0200 (BRST) Received: from localhost (localhost [127.0.0.1]) by abutre.homeip.net (Postfix) with ESMTP id 7D7862E00D for ; Sun, 25 Dec 2005 09:14:04 -0200 (BRST) From: Flavio Pimentel Silvestrow To: freebsd-amd64@freebsd.org Content-Type: text/plain Date: Sun, 25 Dec 2005 09:14:04 -0200 Message-Id: <1135509244.49716.24.camel@abutre> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: Chroot to a 32 bits environment X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Dec 2005 11:14:14 -0000 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 (Lines might wrap, sorry). So, recvmsg() not implemented? Something fishy... Lots of basic commands like netstat and top fail to work also (I can send the output for those if anybody wants). I have COMPAT_IA32 on my kernel. Not really sure what to do next... Sorry for the long post, and happy holidays to all! -- Flavio Pimentel Silvestrow