# Migrating to FreeBSD from TrueOS



## NIR (Aug 22, 2018)

I'm confused with the way TrueOS is going so I'm thinking of migration to pure FreeBSD but I'm not very experienced in it (but I have more than 10 years of Linux experience).

I'm the user of TrueOS 18.03 with FreeBSD 12.0 kernel on amd64 architecture (HP Pavilion notebook)
I use:

GOP (bootloader? functionality)
Realtek networking driver
BHyVe via chyves
scfb (for console and X Window)
webcamd
Lumina DE (especially its PDF viewer)
Boot Environments
ZFS snapshots
FreeCAD/LibreCAD
NeoVim
NeoMutt/fetchmail/procmail
JRE
Falkon web browser
QTerminal
Linphone
Wireshark
REDUCE algebra system
Inkscape/The GIMP
DrRacket/Tcl/SBCL/ABCL
SQLite3
RPM
CVS/Fossil/Git
freecolor
QTransmission
Midnight Commander
pax/tar/xz/gzip/zip
All of these packages are installed as binary packages using pkg utility.

I'm afraid I'll loose parts of functionality after migration (I understand I'll have to install X Window System manually - it's not a big problem). Could anybody tell me please if it is possible to install the same packages via pkg utility under FreeBSD OS as binary packages?

I also use pc-updatemanager to perform updates. How should I do it in FreeBSD OS?

I'm pretty sure I need FreeBSD-12.0 kernel for all the functions I like so I want to find a way to ensure that the kernel of FreeBSD installation would be the same or newer than on my TrueOS version. Is there any way to accomplish this task?

Any other migration suggestions are welcome.


----------



## Beastie (Aug 22, 2018)

Welcome to the forums.

You may get a snapshot of 12.0 here if you absolutely want/need to use the latest. Just make sure you know what this means.
Also note that CURRENT- is not supported on these forums, as per the rules.

I know for sure at least some of these applications are available on "vanilla" FreeBSD. Applications can be installed and upgraded using pkg(8). Please check the Handbook for more information.

If you're afraid of losing something, make sure you have reliable backups of your current system. Having good backups is always a good idea anyway.

You may also want to try FreeBSD without installing it on a real machine. That way you don't take any chances on borking your  current system.


----------



## phoenix (Aug 22, 2018)

While it is possible to use freebsd-update to do an inplace migration from TruOS to FreeBSD (I did this from PC-BSD 9.x to FreeBSD 10.x), I would *NOT* recommend it.  A lot of things will break, and you'll spend a long time ferreting out all the little PC-BSD-isms in the boot process, the RC scripts, the config files, and whatnot.  And you'll have a lot of PC-BSD-related files left-over to deal with.

Much better to just backup all your data and config files, make a list of your installed apps, and do a clean, fresh install of FreeBSD.  Then do clean installs of your apps.  Then manually configure everything using the saved config files as guides (don't just copy/paste the files).  It's the only way to be sure you'll have a clean, pure FreeBSD setup with working configs.


----------



## drhowarddrfine (Aug 22, 2018)

At a glance, about three fourths of those things I know are available as FreeBSD packages and ports. The rest I've never heard of so I don't know but it's easy enough to look up.


----------



## balanga (Aug 22, 2018)

NIR said:


> Any other migration suggestions are welcome.



Personally, I would suggest installing FreeBSD on a separate disk and boot it up as a USB disk. Then you don't risk losing anything and you can compare what progress you are making in migrating.


----------



## sko (Aug 23, 2018)

For a "keep everything working as good as possible"-approach I'd just install FreeBSD into a new BE and work through everything thats broken. This way you can always boot back into the working "vanilla TrueOS" BE.

Alternatively: A completely fresh install of FreeBSD while keeping only your /home directory. This might be the better approach to prevent having too many loose ends dangling around - e.g. functionalities where TrueOS relies on OpenRC or other core components they replaced - but it also means you have to rebuild every functionality you want to recreate from TrueOS.

Under no circumstances I'd just use the output of pkg info to install everything atop of FreeBSD - this would try to replace some core components and you'd end up again with e.g. OpenRC, but you will be missing all the glue TrueOS has inbetween to make a lot of things work "their way". Most of these additions/modifications are available via the "trueos-desktop" package; but I suspect this would pull in a dependency on OpenRC, so you'd either have to cherry-pick what you need from the repository, or use OpenRC in parallel to init. This works and was in fact done by TrueOS before completely transitioning to OpenRC, but it leaves you with some services managed by traditional init and some by OpenRC, so service management gets a bit messy...


We're running customized TrueOS installations on our clients; but with the required upcoming migration to Project Trident I'm really tempted to just try building a FreeBSD + Lumina installation and add our modifications instead of reverting lots of TrueOS-specifics and then adapt whats left to our needs. Especially because the most problems we had or still have come from replaced core components in TrueOS that just don't work as reliably as what they replaced. By far the most problems are/were related to OpenRC and its (often obscure, stupid and completely non-observable) startup and dependency behaviour, especially for networked services and/or services that rely on them being up and working. OpenRC often fails to fully start services or already reports them as running even if they aren't up yet and already starting dependent services, creating the weirdest and most annoying race-conditions I've ever seen from booting systems. Combined with the buggy Firmware on many Intel NUCs (blocks the NIC for up to 2 minutes after cold-boot) it makes booting completely unreliable...
The notoriously flaky dhcpcd also accounts for quite some headaches I've never experienced with the standard dhclient and the automounting toolset of TrueOS also needs quite some work to allow a system to survive e.g. transitioning from wired to wireless network without completely locking up (this seems to be related to some other weird behaivour of autofs/automountd/outounmountd on TrueOS...).


So long story short: I've planned to try such a migration and/or fresh FreeBSD+Lumina setup this weekend on my Laptop; although I'm about to try using the RELEASE branch instead of a fast-moving target like CURRENT. If there is any interest I'll share my notes on what worked for me and what pitfalls/caveats I've encountered.


----------



## drhowarddrfine (Aug 23, 2018)

sko said:


> I'd just install FreeBSD into a new BE


BE? That's not an obvious acronym to me.

I'm curious what your clients are using FreeBSD for.


----------



## xavi (Aug 23, 2018)

drhowarddrfine said:


> BE? That's not an obvious acronym to me.



Probably 'Boot Environment'.


----------



## sko (Aug 23, 2018)

Yes, BE = boot environment.
It should be possible to create a new dataset at zroot/ROOT/<name>, temporarily mount it, manually unpack the base components there and then start up a jail with that path to finish the installation/configuration. Everything in /usr/local will most likely be broken due to the different ABI when using FreeBSD RELEASE instead of CURRENT, so there might be a considerable amount of debris from ports and packages that needs to be taken care of...

Our client systems run TrueOS as the main OS, Windows is only used in VMs for legacy Software. The setup is fully automated via PXE + pc-sysinstall + ansible and some custom scripts and tools (e.g. for deploying/cloning the Windows VM). As said: currently we use TrueOS and adapt it to our needs, but since a lot of changes/additions are actually workarounds for e.g. problems with OpenRC or other TrueOS-specifics, I suspect we have already passed the point where a vanilla FreeBSD + lumina installation requires much less heavy lifting than the current approach via TrueOS.


----------



## NIR (Aug 23, 2018)

sko said:


> So long story short: I've planned to try such a migration and/or fresh FreeBSD+Lumina setup this weekend on my Laptop; although I'm about to try using the RELEASE branch instead of a fast-moving target like CURRENT. If there is any interest I'll share my notes on what worked for me and what pitfalls/caveats I've encountered.


It would be awesome if you will be able to share such kind of experience.


----------



## hsw (Sep 5, 2018)

I have just move all of my TrueOS systems to 11.2-RELEASE.  I used fresh install and just moved home directory over fixed up .xprofile and a few other things
mostly following: https://vermaden.wordpress.com/2018/03/29/freebsd-desktop-part-1-simplified-boot/ and https://cooltrainer.org/a-freebsd-desktop-howto/
I then zfs send the FreeBSD ROOT to the TrueOS and booted into in.

There is a problem with Lumina on Intel graphics in that the system tray icons generally do not show, but the exact same Lumina configuration is fine with Nvidia driver.


----------



## NIR (Sep 23, 2018)

Finally I was able to migrate from TrueOS 18.03 to FreeBSD 11.2. There are some differences I noticed:

My HP Pavilion notebook has "Generic HP Truevision HD" webcam and TrueOS installation was able to work with it out-of-the-box. FreeBSD installation needs manual adjustment.
Midnight Commander does not have issues with Russian text (TrueOS build of mc has problems).
The system startup procedure is much faster compared to OpenRC.
I'm missing SysAdm - it was a convenient way to configure the system.
The system is more stable and has much lesser amount of segfaults.
I'm glad I performed the migration despite the problems I encountered. Anyway I think I might have been unable (?, sorry for my English) to deal with problems in case I started with FreeBSD - TrueOS is still a good distro for BSD beginners - it's very friendly and simple.

I still have problems with configuring Realtek Bluetooth-WiFi module and working with eMMC cards but it's another story.

BTW, I used Fossil SCM repo as a way to store user and system settings and migrate 'em to the new OS installation. Just copied the file/repo with the settings to the temporary location and then copied it to the new system.


----------



## drhowarddrfine (Sep 23, 2018)

NIR said:


> I'm missing SysAdm - it was a convenient way to configure the system.


https://www.freshports.org/sysutils/sysadm/


----------



## hsw (Sep 26, 2018)

After the latest updates I have two remaining Lumina problems:
…. (remainder removed)

As drhowarddrfine suggests this belongs in its own thread


----------



## drhowarddrfine (Sep 26, 2018)

hsw Don't hijack the thread. Start your own.


----------

