From owner-freebsd-hackers@freebsd.org Fri Apr 23 08:41:47 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 018565E9498 for ; Fri, 23 Apr 2021 08:41:47 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (mail.bsd4all.org [88.99.169.216]) by mx1.freebsd.org (Postfix) with ESMTP id 4FRSSn5ccVz3t37; Fri, 23 Apr 2021 08:41:45 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (localhost [127.0.0.1]) by mail.bsd4all.org (Postfix) with ESMTP id AA2904C1C; Fri, 23 Apr 2021 10:41:41 +0200 (CEST) X-Virus-Scanned: amavisd-new at bsd4all.org Received: from mail.bsd4all.org ([127.0.0.1]) by mail.bsd4all.org (mail.bsd4all.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PphOBMXYcbj1; Fri, 23 Apr 2021 10:41:40 +0200 (CEST) Received: from mpro.bsd4all.local (pony_ip [82.101.198.11]) by mail.bsd4all.org (Postfix) with ESMTPSA id 158164BD5; Fri, 23 Apr 2021 10:41:39 +0200 (CEST) From: Peter Blok Message-Id: <5735CD11-0688-4C25-AE32-2D29ECA4ABD8@bsd4all.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: 32-bit jail on 64-bit host Date: Fri, 23 Apr 2021 10:41:36 +0200 In-Reply-To: Cc: Ian Lepore , Daniel Dettlaff , freebsd-hackers@freebsd.org To: Chris References: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4FRSSn5ccVz3t37 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pblok@bsd4all.org designates 88.99.169.216 as permitted sender) smtp.mailfrom=pblok@bsd4all.org X-Spamd-Result: default: False [-2.70 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[88.99.169.216:from]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[bsd4all.org]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; SPAMHAUS_ZRD(0.00)[88.99.169.216:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; FREEMAIL_CC(0.00)[freebsd.org,me.com]; MAILMAN_DEST(0.00)[freebsd-hackers]; RECEIVED_SPAMHAUS_PBL(0.00)[82.101.198.11:received] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 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: Fri, 23 Apr 2021 08:41:47 -0000 Chris, that was the right hint. I copied host /rescue/route to the jail in /amd64. Changed the = dhclient-script to use /amd64/route and it worked. Using dynamic linked version failed with /libexec/ld-elf.so.1. Peter > On 22 Apr 2021, at 21:27, Chris wrote: >=20 > On 2021-04-22 11:13, Peter Blok wrote: >> I tried to replace some of the 32-bit binaries before, but it started = to require >> shared libs as well, so I stopped. I=E2=80=99ll give it a shot later. > I'm not sure which binaries you might need either. But could /rescue = bring you > any closer? >=20 > --Chris >> I now run it with out vnet and it indeed works. I have managed to = compile >> p5-DBD-Oracle which works now. >> Because all of my other jails were vnet jails, I didn=E2=80=99t think = about doing it the >> old way without vnet. >> Peter >>> On 22 Apr 2021, at 15:39, Ian Lepore wrote: >>> 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=E2=80=99m getting an IP = address >>>>> and I can ping others on the same network segment. >>>>> But I can=E2=80=99t 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=3D8049 metric 0 mtu = 16384 >>>>> options=3D680003 >>>>> inet6 ::1 prefixlen 128 >>>>> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 >>>>> inet 127.0.0.1 netmask 0xff000000 >>>>> groups: lo >>>>> nd6 options=3D21 >>>>> e0b_websip: flags=3D8843 >>>>> metric 0 mtu 1500 >>>>> options=3D8 >>>>> 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=3D29 >>>>> Any idea how to fix this? >>>>> I=E2=80=99m using vnet bridge >>>>> Peter >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-hackers@freebsd.org = mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers = > To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org = "