From owner-freebsd-hackers@freebsd.org Thu Apr 22 13:39:44 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E13705F3407 for ; Thu, 22 Apr 2021 13:39:44 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound4s.ore.mailhop.org (outbound4s.ore.mailhop.org [54.185.97.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQz743KKSz3vyQ for ; Thu, 22 Apr 2021 13:39:44 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1619098783; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=JwEZyQbk4YXs00zpKwvX0QgGR1vZNAcBTyReaLwISEfmcdXC0JW+ZVlHrWP7U48AIFlv4dht0rZbQ XJRi4EmzWalXP3aODjgqYaJiyGI1gg4zf8cholQlBk4BdZMwYe1jenjvnBPLdy/RTkhRp9O9MOXMc2 xXsNmxmEEQZBdUmWzF8RU+ZS59QBHC+XlDatLrmmAPjqkAKesLdFlvOgrX5NJceDfdTOruEMIoqXEC 4UCZqx9i4FoBgtaOCfHiZhPO8Pcl1G+2PeXtg0S1Rw/FBh1V5x6mP4kbRlx5BzxZHVaYakcYSv2C1F Fb0o40aet29BVjKZbkGhUDU+NBQZccg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=cjQuiQA020pxZKDRcri59VTyNuEODZr3akmU9DiiADk=; b=Dkw1mII45+Khxf7AbPM9yPPUI6Aa+nRy+gGaXuIZK9S4tA6nmKQbBV8PuA3TL06m4jx9PHJeZWHn/ uYqd+jGW6ZAqRif5yIkvDC8iswta5gBOW2dFcTyCxwnaiwXayidPrWzD0ayOQUOmPM5BQBJLipvGIY HklscTObMrx1P2vMvOE4kttfiUuM/rvSb7SWHo1L8w/i09Rab5wWRRM67k3zwDIljMz55LxO4lcOON DHC8otofob4gh+SC3ivk1JBxAfT4z0HbZKsq0Lqa/XA9MGy4MJtk51ZPGcHX5g5theG3EVbDwDuevF oh7IXyFJ4vyoBoWM2ku2uU4+Y8hTAig== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=cjQuiQA020pxZKDRcri59VTyNuEODZr3akmU9DiiADk=; b=xK6YhtbJlEjLYPLqoragHLDF8nJ0752FB/N1lSkPtjpcgTTMUn+jDolMEvKV89xXsDRNM1WPw7ctd rwptqxR7Bvm/QxG1E2iGaYA9v5S0bUqHNNTnS/SiJMKToB7sa85tIzwCQpB7MtjYZO8vQbDVvembBz Q7nGMfR18lRO9pSvHuSYyqhbvYlqmbNl5T9njwz8Ez6R/vtLlGKX1O/zZco9MIdeD0yviUKxKRtWQJ YXd/YuFQIIfCQmkGM671B2Vr0JcWC13tY2QG0YQ7sIN/MIQmi74NuIZpDfEttdUVdjiiumiR80/9N9 3ELDjdgc0LoTGFTxg0WY2FPcI7v0+hA== X-Originating-IP: 67.177.211.60 X-MHO-RoutePath: aGlwcGll X-MHO-User: 309efc5e-a370-11eb-a652-89389772cfc7 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 309efc5e-a370-11eb-a652-89389772cfc7; Thu, 22 Apr 2021 13:39:42 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 13MDdeVX055697; Thu, 22 Apr 2021 07:39:40 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: 32-bit jail on 64-bit host From: Ian Lepore To: Daniel Dettlaff , Peter Blok Cc: freebsd-hackers@freebsd.org Date: Thu, 22 Apr 2021 07:39:40 -0600 In-Reply-To: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> References: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> Content-Type: text/plain; charset="iso-8859-7" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4FQz743KKSz3vyQ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:54.184.0.0/15, country:US] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 13:39:44 -0000 On Thu, 2021-04-22 at 12:32 +0200, Daniel Dettlaff via freebsd-hackers wrote: > If you need to run 32bit software with 64bit base system just try > creating 64bit jail with lib32 subsystem present. Then 32bit software > should be able to run properly in such jail, but you can't run 32bit > jail on 64bit base as Eugene said. > That is not what Eugene said, and you CAN run a 32-bit jail on a 64-bit host; I do so on this machine. As Eugene said, you simply need to copy a few selected 64-bit binaries into the jail, replacing the 32-bit version of those programs. That is, install the jail from a 32-bit build or packages, and then just copy the necessary few binaries from your host root filesystem into the jail. It would be nice if there was a list somewhere of which binaries need to be replaced. I just did it by trial and error... when I ran into things that didn't work, I tried using a 64-bit copy of that program and if it worked: problem solved. -- Ian > > On 22 Apr 2021, at 10:36, Peter Blok wrote: > > > > Hi, > > > > I have created a 32-bit jail on a 64-bit running 12-STABLE. The > > jail is also build using the same source. > > > > The jail gives me a 32-bit environment. I¢m getting an IP address > > and I can ping others on the same network segment. > > > > But I can¢t set a default route. > > > > route add default 192.168.1.1 > > route: writing to routing socket: Invalid argument > > add net default: gateway 192.168.1.1 fib 0: Invalid argument > > > > # netstat -rn > > Routing tables > > (0) (0) UH > > (0) (0) U > > (0) (0) UHS > > (0) (0) UH > > (0) (0) U > > (0) (0) UHS > > > > # ifconfig -a > > lo0: flags=8049 metric 0 mtu 16384 > > options=680003 > > inet6 ::1 prefixlen 128 > > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 > > inet 127.0.0.1 netmask 0xff000000 > > groups: lo > > nd6 options=21 > > e0b_websip: flags=8843 > > metric 0 mtu 1500 > > options=8 > > ether 0e:88:d7:20:99:80 > > hwaddr 02:80:ad:6e:79:0b > > inet 192.168.1.205 netmask 0xffffff00 broadcast 192.168.1.255 > > groups: epair > > media: Ethernet 10Gbase-T (10Gbase-T ) > > status: active > > nd6 options=29 > > > > Any idea how to fix this? > > > > I¢m using vnet bridge > > > > Peter > >