|Zap's Digital Lighthouse|
Mon, 31 Dec 2018
Recently, the little Soekris net6501 machine that I use as a home server for DNS and other similar functions decided to die after many years of useful service (it's a known problem of net6501 machines unfortunately; at some point they just self-brick and refuse to reboot :-(
So I took the Gigabyte Brix GB-BXi3-4010 that I had been using on my TV in the living room and simply removed the Windows 10 mSATA drive from it and inserted the mSATA drive from my net6501 into it and Poof! FreeBSD booted fine and It Just Worked.
Therefore in no time at all, poterne (my little home server) was back in action and no one at home even noticed, since we haven't been using the little Brix much since we bought a 4K TV that has Netflix and Youtube in firmware (maybe more on this some other day).
However, the Intel Core i3-4010U Processor at the heart of the little Brix computer is a 64-bit part, so I'd like to move FreeBSD on poterne from i386 to amd64 so that it can use all of its 8GB of RAM, since I've noticed that dmesg presently says:
So I searched the Internet for "freebsd upgrade i386 to amd64" and I found a few pages describing successful upgrades. Actually, most of them recommended not to do it and just reinstall, but I decided to go for it anyway.
The methods I found recommended upgrading by recompiling, so I fetched the FreeBSD 12.0-RELEASE installation media and installed the source code onto my little server. Then I started to recompile, but it took ages (maybe because I put the source and object files on the external USB disk?), so I decided to redeploy from RELEASE binaries:
The release tarballs are in /mnt/usr/freebsd-dist/ (such as src.txz, base.txz, etc.)
Of course, I then used rsync to make a backup of my server onto my local NAS machine, in case anything went wrong.
Then, I proceeded with the migration process based on recipes from various websites (notably https://wiki.freebsd.org/amd64/i386Migration).
Turning the swap partition into a 'miniroot' seemed like a good idea, so I did that... My swap partition is is 6GB, so that worked well (6GB was enough for the 2GB of RAM I had on the Soekris net6501, but may could a bit short with the 8GB of RAM from the Brix... but then again, I probably won't need any swap space on the new machine with 8GB of RAM for a little headless server like poterne).
After setting up the miniroot on /dev/ada0p2, I rebooted from there and mounted the real filesystems onto /mnt and copied over the files from the miniroot to /mnt.
I then rebooted with the new system and cleared the pkg cache and reinstalled all of my packages.
In the end, it worked fine and poterne.rax.org is now running in 64-bit mode.