From owner-freebsd-stable@FreeBSD.ORG Tue May 13 15:51:13 2008 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 805D4106564A for ; Tue, 13 May 2008 15:51:13 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (bitblocks.com [64.142.15.60]) by mx1.freebsd.org (Postfix) with ESMTP id 691068FC20 for ; Tue, 13 May 2008 15:51:13 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost.bitblocks.com [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id 35BFA5B55; Tue, 13 May 2008 08:33:03 -0700 (PDT) To: Pete French In-reply-to: Your message of "Tue, 13 May 2008 15:18:36 BST." Date: Tue, 13 May 2008 08:33:03 -0700 From: Bakul Shah Message-Id: <20080513153303.35BFA5B55@mail.bitblocks.com> Cc: stable@freebsd.org Subject: Re: Changing an installed system from i386 to amd64 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2008 15:51:13 -0000 On Tue, 13 May 2008 15:18:36 BST Pete French wrote: > I have a box currently running i386 which I want to change over to > run amd64. I have installed a second drive into the machine on which > I have put a basic install of amd64, and have compiled up the world > and kertnel from source. > > Can I simply switch the original partition over by mounting it up > and doin a 'make installworld' with an approrpiate DESTDIR set ? > I guess what I am asking is if anything else is different between > the two versions aside from the actual binaries themselves (i.e. > directory layout and the like). In the 64 bit FreeBSD world, /usr/lib32 contains libraries for the x86 binaries and /lib, /usr/lib contain 64 bit libraries so a straight install may mess things up. At the very least you should backup your 32 bit root partition -- but I have a feeling my advice is already too late :-) Ideally a simple perl script can automate most of this job. May be all you have to do is something like this: for a in lib usr/lib usr/local/lib do mv $DESTDIR/$a $DESTDIR/${a}32 done echo 'ldconfig32_paths="/usr/lib32 /usr/local/lib32"' >> $DESTIDIR/etc/rc.conf Most all old 32 bit ports should work but upgrading them can mess things up. All the new compiles will generate 64 bit binaries but any port dependencies on a shared library will be wrong. Also, not all 32 bit ports work on 64 bit. May be the trick is to save port directory names for all installed ports (e.g. shell/zsh), then blow them all away (after saving a copy somewhere) and then install them again. This really needs to be part of sysinstall. PS: the following may come in handy. Save it in ~/bin/ldd32. #!/bin/sh # ldd for i386 binaries for i in ${1+"$@"} do echo "$i": env LD_32_TRACE_LOADED_OBJECTS=1 "$i" done