x32 -> x64

I had this crazy idea of updating my FreeBSD installation from 11.1-i386 to 11.2-amd64 by doing the following:-

pkg info to get a list of installed pkgs
tar xSf of base.txz and kernel.txz to the root partition
pkg install from the list of pkgs installed

Is there any chance of this working?
 
Since nothing is broke I would first bring it up to date for i386 with FreeBSD 11.2-RELEASE and then attempt the conversion by building from source, the entire universe as a 64bit cross compile. The cross compile will take additional steps not in the manual.
(Notably you must setup the amd64 compiling env)
https://www.freebsd.org/doc/handbook/makeworld.html

Something like this:
Code:
cd /usr/src
setenv MACHINE_ARCH=amd64
setenv MACHINE=amd64
setenv TARGET=amd64
setenv TARGET_ARCH=amd64
make buildworld TARGET=amd64
make buildkernel TARGET=amd64 KERNCONF=GENERIC
make installkernel TARGET=amd64 KERNCONF=GENERIC
shutdown -r now
cd /usr/src
make installworld TARGET=amd64
shutdown -r now
mergemaster -Ui
Rebuild/Re-Install all your Ports or Packages Now
shutdown -r now
Cleanup the old files by the above linked manual
 
Last edited by a moderator:
If you want to do that on your live system, then yes it's crazy and won't work.

Otherwise, you'll need a working system during the whole extraction process. In other words, if you don't want to use external media, you'll need a second bootable FreeBSD system (on another partition of the same disk or another disk) to work from.

First you boot the second system. Running newfs(8) on every target partition will ensure you start with a clean slate. Then you mount the partitions and extract the distribution archives. Manually creating and populating /mnt/etc/fstab will be necessary before you reboot into your new system.

Don't forget to make backups of all you need to keep (mostly configuration files).
 
If you want to do that on your live system, then yes it's crazy and won't work.

Otherwise, you'll need a working system during the whole extraction process. In other words, if you don't want to use external media, you'll need a second bootable FreeBSD system (on another partition of the same disk or another disk) to work from.

First you boot the second system. Running newfs(8) on every target partition will ensure you start with a clean slate. Then you mount the partitions and extract the distribution archives. Manually creating and populating /mnt/etc/fstab will be necessary before you reboot into your new system.

Don't forget to make backups of all you need to keep (mostly configuration files).

I was intending to boot off my network using mfsBSD over PXE, but since you advise that what I proposed is crazy and won't work , thought I'd better make a copy of the partition which I might need to restore if all goes tits up...

Now making a copy of a partition is something I struggle with... Can I just run dd if=/dev/da0p3 of=/dev/da1p4
? And restore flipping round if and of ?
 
I was intending to boot off my network using mfsBSD over PXE
This counts as "using external media". So it should work fine, if you're careful enough.

I'd better make a copy of the partition which I might need to restore if all goes tits up...
This is always recommended anyway, even if you're upgrading the regular way (from source or using freebsd-update(8)).

Now making a copy of a partition is something I struggle with... Can I just run dd if=/dev/da0p3 of=/dev/da1p4
? And restore flipping round if and of ?
Use dump(8) and restore(8).
 
This counts as "using external media". So it should work fine, if you're careful enough.

One important factor I overlooked was the existence of schg flags which meant that my extract of base.tzx did not work properly.
Those need to be cleared before the extract. I haven't yet re-installed the pkgs, but I have a saved list to use.

But the essential thing is that I managed to boot up to FreeBSD 11.2 amd64 from a system which had 11.1 i386 running previously..
 
One important factor I overlooked was the existence of schg flags which meant that my extract of base.tzx did not work properly.
Those need to be cleared before the extract. I haven't yet re-installed the pkgs, but I have a saved list to use.

But the essential thing is that I managed to boot up to FreeBSD 11.2 amd64 from a system which had 11.1 i386 running previously..
That should've been taken care of by that part:
Running newfs(8) on every target partition will ensure you start with a clean slate.
;)
 
Back
Top