make installworld/kernel of an amd64 system into an i386 system

Trond Endrestøl Trond.Endrestol at fagskolen.gjovik.no
Wed Jan 21 14:55:38 UTC 2015


On Wed, 21 Jan 2015 13:11+0100, Matthias Apitz wrote:

> 
> Hello,
> 
> I actually run on one of my laptops (Acer C720) a very fresh -HEAD
> (r276659), but in 32bit; I want to change this to amd64; I produced a
> amd64 memstick which boots fine and also has the sources and obj tree which
> was used to create the memstick in
> 
> 	/usr/local/acerc720/src
> 	/usr/local/acerc720/obj-amd64
> 
> What I now think as update procedure to install amd64 into the laptop
> is:
> 
> - boot the amd64 system from USB
> - mount the old i386 root in /dev/ada0p2 as /mnt (there is only this one big
>   file system, /dev/ada0p1 is boot and /dev/ada0p3 is swap)
> - run
>   cd /usr/local/acerc720/src
>   MAKEOBJDIRPREFIX=/usr/local/acerc720/obj-amd64 export MAKEOBJDIRPREFIX
>   make installworld  DESTDIR=/mnt
>   make installkernel DESTDIR=/mnt
>   make distrib-dirs  DESTDIR=/mnt
>   make distribution  DESTDIR=/mnt
>   mv /mnt/usr/local/lib /mnt/usr/local/lib32
>   cp /etc/rc.conf  /mnt/etc
>   cp /boot/loader.conf /mnt/boot
>   echo 'ldconfig32_paths="/usr/lib32 /usr/local/lib32"' >> /mnt/etc/rc.conf
>   reboot
> 
> I know that it may happen that not all of the installed packages (with the shared
> objects now in /usr/local/lib32) will work, and I have to recompile
> some (or even all) of them, but the system should come up, I think.
> 
> Any comments about the procedure or something I missed out?

I experimented with migrating i386 to amd64 earlier this January. I 
used the official snapshots to do the main part of the transition, and 
that route is a timesaver in my book. Be sure to omit /boot, /etc, 
/root, and /var from the base distribution (base.txz).

I ensured all ports were up-to-date before committing the transition 
to amd64. And I never messed with /usr/local/lib, since I instantly 
rebuilt all ports.

Using ports-mgmt/portmaster is better than using 
ports-mgmt/portupgrade, at least until all ports are 64-bit native 
executables/libraries.

My writeup is available for anyone interested:

http://ximalas.info/2015/01/17/migrating-freebsd-from-i386-to-amd64/

Use at your own risk.

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+


More information about the freebsd-hackers mailing list