# Upgrade FreeBSD from 32bit to 64bit



## kr651129 (Jun 27, 2012)

I guess this could go in "Installation and Upgrading" but I don't want to litter that forum with hypotheticals...is it possible to "upgrade" a 32bit FreeBSD 9 install to 64bit?  I know there would be some issues with software that's already been installed on the 32bit install, I was just thinking about this last night...


----------



## SirDice (Jun 27, 2012)

Possible but definitely not easy and certainly not recommended. Back up your data and do a clean install.


----------



## pboehmer (Jun 27, 2012)

Definitely not worth the headaches to do an 32bit to 64bit in-place upgrade.  We had a test box set up and spent a little over a week trying different ways to accomplish this.  We could never get it to work.

Like SirDice said above, your best bet is to backup, reload, and restore your configs.

Good luck.

That said, if anyone has a working procedure, I'd love to see it.


----------



## kpa (Jun 27, 2012)

I can think of a way to do this and it involves extracting the base and kernel distributions from a 64-bit installation disk over a 32-bit system. You would have to exclude things like /etc/master.passwd or you would overwrite your user database.

Backing up configuration and reinstalling is probably equal amount of work though.


----------



## phoenix (Jun 27, 2012)

If you have extra disks lying around, it's pretty easy.  I've toyed with it at home, although never completed it.  It was on a machine with a 2 GB USB stick for / and /usr with pretty much everything else on a ZFS pool.

Download the 64-bit sources, compile the 64-bit sources, installworkd with DESTDIR pointing to the new disk, installkernel with KODIR pointing to the new disk, reboot to the new disk, without the ZFS pool imported.  Make sure everything works.  That's as far as I got, but the theory is that you'd import the pool to a new root, make a list of the apps installed, do some ZFS trickery to save the old data and create new filesystems, and install the 64-bit versions of the apps.

At the time I was playing with it, an up-to-date KDE install was a multi-day affair (pkgng wasn't out yet) so never finished the process.  It's not all that different from a backup, re-install, restore process, except the "backup" is live.  

Could probably do some trickery with freebsd-update(8) to install onto a new disk, and then use pkgng to install the binary packages.  I'm still tempted to do this at home, as running 32-bit FreeBSD with ZFS and only 2 GB of RAM can be touch-and-go sometimes.


----------

