Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 May 2008 08:33:03 -0700
From:      Bakul Shah <bakul@bitblocks.com>
To:        Pete French <petefrench@ticketswitch.com>
Cc:        stable@freebsd.org
Subject:   Re: Changing an installed system from i386 to amd64 
Message-ID:  <20080513153303.35BFA5B55@mail.bitblocks.com>
In-Reply-To: Your message of "Tue, 13 May 2008 15:18:36 BST." <E1JvvKu-00051a-8q@dilbert.ticketswitch.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 13 May 2008 15:18:36 BST Pete French <petefrench@ticketswitch.com>  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080513153303.35BFA5B55>