Re: 32-bit jails on a 64-bit system?

2010-03-05 Thread Kostik Belousov
On Fri, Mar 05, 2010 at 01:06:10PM +0100, Mark Huizer wrote:
 On 1/21/2010 10:12, Miroslav Lachman wrote:
 
 I think it is nothing new to 8.0, it is the same as release note for 7.2.
 
 I didn't test it, but I think you can install (copy) i386 jail (or 
 whole system) in to amd64 host and just run it as any other jail.
 
 
 Actually, that's what I tried, since I want to move a server to new 
 hardware, but with serious time constraints on my side :-( So my plan 
 is/was: rsync the entire machine, build a script that fixes IP 
 addresses here and there in the copy, run the jail.
 
 I did have to fix a few little things, stuff like copy a few binaries 
 over (netstat, ps, ifconfig, w, top, ldd, ldd32) and of course the ld* 
 files in /libexec. Furthermore I moved /usr/lib to /usr/lib32 and copied 
 /usr/lib from the amd64 install.
 So far so good, I start jail, I see ssh, apache etc running, I start to 
 get happy.
My own experience is that just moving 32bit i386 image onto amd64 host
is better now then trying to make a hybrid with 32bit binaries and
both 32 and 64 bit libraries.

You have to disable all management operations in the startup, of course.
I do not recommend to touch /libexec. You may put statically linked
64bit ps/top/netstat etc into the jail for convenience.

Having amd64 bit kernel that can be configured and managed by 32bit
binaries is the long road. On the other hand, user 32bit applications
working very good.

 
 But... a few things don't seem to work as intended, although I haven't 
 checked each and every detail:
 
 * cronolog seems to ignore part of the arguments, so if you tell it to 
 log to /data/logs/%Y/%m/%d/access.log it will log to 
 /data/logs/access.log ; didn't investigate yet
 
 * postfix won't start. This I looked at a little more, but without success.
 
 On the count of postfix:
 
 # ldd /usr/local/sbin/postfix
 /usr/local/sbin/postfix:
 libpcre.so.0 = /usr/local/lib/libpcre.so.0 (0x2809d000)
 libsasl2.so.2 = /usr/local/lib/libsasl2.so.2 (0x280cf000)
 libpam.so.5 = not found (0x0)
 libcrypt.so.5 = /usr/lib32/libcrypt.so.5 (0x280e6000)
 libssl.so.6 = not found (0x0)
 libcrypto.so.6 = /usr/lib32/libcrypto.so.6 (0x280ff000)
 libc.so.7 = /usr/lib32/libc.so.7 (0x2825a000)
 
 # ls -la /usr/lib*/libpam.so.5
 -r--r--r--  1 root  wheel  35848 Mar  3 23:31 /usr/lib/libpam.so.5
 -r--r--r--  1 root  wheel  28296 Mar  3 23:33 /usr/lib32/libpam.so.5
 
 You'd say it should work, but it doesn't. The best I've got so far is 
 not copy /usr/lib from the amd64 host but make it a symlink to 
 /usr/lib32. Then postfix works, but netstat etc won't, of course.
 While typing this, this brought me to another idea.
 - make /usr/lib symlink to /usr/lib32, mkdir /usr/lib64 filled with the 
 libs from the hostmachine's /usr/lib, and then edit /etc/rc.d/ldconfig, 
 change _LDC's /usr/lib to /usr/lib64, restart, and presto postfix works. 
 It's dirty but it seems to work for now, time for testing.
 
 But I don't really understand why apache etc works, and postfix doesn't. 
 So far I see the issues with libpam and libssl, which both are in 
 /usr/lib, where libc.so.7 is symlinked to /lib. Anyone who can explain 
 the difference to me? And is this intended behaviour?
 
 And now off to cronolog's not working %Y :-)
 
 mark
 
 ___
 freebsd-jail@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-jail
 To unsubscribe, send any mail to freebsd-jail-unsubscr...@freebsd.org


pgpv6spRo5DVq.pgp
Description: PGP signature


RE: 32-bit jails on a 64-bit system?

2010-01-21 Thread Andrew Hotlab


 Date: Thu, 21 Jan 2010 10:12:20 +0100
 From: 000.f...@quip.cz
 To: sp...@bway.net
 CC: freebsd-jail@FreeBSD.org; freebsd-sta...@freebsd.org
 Subject: Re: 32-bit jails on a 64-bit system?

 The jail(8) subsystem has been updated. Changes include:

 Compatibility support which permits 32-bit jail binaries to be used on
 64-bit systems to manage jails has been added.
 

 I know prior to 8.0 with some fancy footwork you could do some
 interesting things (for example, I have a jail running a bunch of 32-bit
 4.11 stuff on a 7.2 amd64 box), but it was not easy.

 Looking at the jail manpage and handbook entries, I'm not seeing
 anything that further explains the changes. I've been able to get some
 things working in a test setup, but not everything. Any pointers to what
 exactly that blurb in the release notes actually means? Google is
 getting me nowhere.


 (freebsd-jail@ was added in to Cc:)

 I think it is nothing new to 8.0, it is the same as release note for 7.2.

 I didn't test it, but I think you can install (copy) i386 jail (or whole
 system) in to amd64 host and just run it as any other jail.


It might be useful this thread about 32-bit jail on 64-bit host:
http://lists.freebsd.org/pipermail/freebsd-i386/2009-January/007553.html

Regards.

Andrew

  
_
Windows Live Hotmail: Your friends can get your Facebook updates, right from 
HotmailĀ®.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_4:092009___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to freebsd-jail-unsubscr...@freebsd.org