LowEndBox - Cheap VPS, Hosting and Dedicated Server Deals

Let's Try BSD, Part 3 of 7: FreeBSD, the Power to Serve

FreeBSDThis is the third part in our seven-part series on the BSD series of operating systems.

Part 3: Let’s Try BSD, Part 3 of 7: FreeBSD, the Power to Serve

FreeBSD is the most widely-used BSD operating system.  It runs on amd64, 64-bit ARM (aarch64), i386, 32-bit ARM (armv6, armv7), RISC-V, and PowerPC.  In earlier times, I thought of the three BSDs (DragonFly wasn’t around yet) as “NetBSD = runs on anything, OpenBSD = high security, FreeBSD = awesome on amd64”.

I’m going to be installing FreeBSD 14.0.

I booted off the DVD.  It takes a long time to boot – nearly 2 minutes.  Then I’m at the installer.

FreeBSD QEMU Tablet

Why is there a USB tablet connected to my VPS?

FreeBSD Start

There isn’t a graphical installer, which I believe is true of all the BSDs.

From here on out, I’m going to skip some screens that aren’t very exciting (select your keymap, set your timezone, etc.) and focus on things that make the FreeBSD installation process unique.

FreeBSD Hostname

I named my system freebsd, and used DHCP to setup the network.

FreeBSD Source

I added ports just to poke around.  FreeBSD has packages and ports.  Packages are compiled binaries, as you would get on Linux if you were using apt or yum.  Usually this is what you want, as the package will install the binaries, setup config files, etc.  However, you can all get software through ports.  Ports are source, and you compile them to install them.  There are various reasons why some software is available only as a port, and many reasons why software has both a package and a port (chiefly that you may wish to alter the compilation flags).  I know OpenBSD has a similar setup.

Here, I’ll just be using packages.

FreeBSD No ZFS

I decided not to use ZFS because this VPS has only 2GB of RAM and they recommend reading about ZFS on “low memory systems” and I didn’t need that headache.  UFS will be fine.  I think ZFS would be more useful on a system with multiple drives – whether in a dedicated server or on virtual volumes, though the latter already is presented with redundancy.

FreeBSD Partitioning

FreeBSD GUID

The default is MBR.  Didn’t we stop using MBR die a long time ago?

FreeBSD Partitioning

Looks good.  It depends how sysadminny you want to get.  In theory you may want to isolate which filesystems allow executables, maybe have the logs set to append, put all your static binaries in one partition in case /usr/bin is corrupted, maybe isolate /var and /home so someone can’t fill up the drive, etc.  But for a hobbyist VPS, I usually run “all in one partition” like this because saving space is more important and I’m the only user.

After this, I confirmed/committed, it wrote the partitions, and then it extracted those filesets I’d chosen above.

FreeBSD Install FreeBSD Extracting

Now there are a couple of system configuration options.

FreeBSD Choices

I turned on ntpd and ntpd_sync_on_start.  Looking back I should have turned off moused.

FreeBSD Choices

On multiuser shared hosting, I’d turn more of these on.  I do think clearing /tmp, randomizing PIDs, and requiring a password on the console are good ideas (the latter is not perfect protection but it is better than nothing against the bored junior sysadmin at your hosting provider).  I find not being able to dmesg whenever I want annoying so I’m leaving it on for this single-user system, as well as the other options to see uids, gids, etc.

FreeBSD User

If you’re going to ask a question that has a logical yes/no question, then it shouldn’t be a surprise when someone answers “yes”.  Sheesh.

And csh.  Why not.  We’re in the core homelands of BSD.  (OpenBSD uses ksh).

FreeBSD Reb oot  FreeBSD Logo Screen

Nice logo!

FreeBSD Prompt

And we’re booted.
I setup root’s .ssh and changed sshd_config to allow for publickey root login and tweak a few other things.  Now…how to restart ssh?
Well, this does work, though would make a FreeBSD sysadmin cringe…
root@freebsd:/etc/rc.d # ./sshd restart
Performing sanity check on sshd configuration.
Stopping sshd.
Waiting for PIDS: 82151.
Performing sanity check on sshd configuration.
Starting sshd.
root@freebsd:/etc/rc.d #
We’ll learn the correct way in a little bit.
Many things are familiar, though ps is different.
root@freebsd:~ # ps ax
PID TT STAT TIME COMMAND
0 - DLs 0:00.00 [kernel]
1 - ILs 0:00.00 /sbin/init
2 - WL 0:00.23 [clock]
3 - DL 0:00.00 [crypto]
4 - DL 0:00.01 [cam]
5 - DL 0:00.00 [busdma]
6 - DL 0:00.08 [rand_harvestq]
7 - DL 0:00.04 [pagedaemon]
8 - DL 0:00.00 [vmdaemon]
9 - DL 0:00.01 [bufdaemon]
10 - DL 0:00.00 [audit]
11 - RNL 24:35.05 [idle]
12 - WL 0:00.37 [intr]
13 - DL 0:00.00 [geom]
14 - DL 0:00.00 [sequencer 00]
15 - DL 0:00.01 [usb]
16 - DL 0:00.00 [vnlru]
17 - DL 0:00.01 [syncer]
5766 - Is 0:00.00 dhclient: system.syslog (dhclient)
6231 - Is 0:00.00 dhclient: vtnet0 [priv] (dhclient)
16963 - ICs 0:00.00 dhclient: vtnet0 (dhclient)
17110 - Ss 0:00.05 /sbin/devd
17263 - Is 0:00.00 sshd: /usr/sbin/sshd [listener] 0 of 10-100 startups (s
17834 - Ss 0:00.55 sshd: root@pts/0 (sshd)
58639 - Ss 0:00.02 /usr/sbin/syslogd -s
71089 - Ss 0:00.06 /usr/sbin/ntpd -p /var/db/ntp/ntpd.pid -c /etc/ntp.conf
75845 - Ss 0:00.00 /usr/sbin/cron -s
18973 0 Ss 0:00.03 -sh (sh)
41237 0 R+ 0:00.00 ps ax
85009 v0 Is+ 0:00.00 /usr/libexec/getty Pc ttyv0
85403 v1 Is+ 0:00.00 /usr/libexec/getty Pc ttyv1
85703 v2 Is+ 0:00.00 /usr/libexec/getty Pc ttyv2
85838 v3 Is+ 0:00.00 /usr/libexec/getty Pc ttyv3
86419 v4 Is+ 0:00.00 /usr/libexec/getty Pc ttyv4
86767 v5 Is+ 0:00.00 /usr/libexec/getty Pc ttyv5
86776 v6 Is+ 0:00.00 /usr/libexec/getty Pc ttyv6
87192 v7 Is+ 0:00.00 /usr/libexec/getty Pc ttyv7

Installing Packages

All right, so let’s install some packages.  The FreeBSD package manager is pkg(8).  The man page notes:

If pkg(8) is not installed yet, it will be fetched, have its signature verified, installed, and then have the original command forwarded to it. If already installed, the command requested will be forwarded to the real pkg(8).

How helpful!

root@freebsd:~ # pkg
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.21.2...
Extracting pkg-1.21.2: 100%
pkg: not enough arguments
Usage: pkg [-v] [-d] [-l] [-N] [-j |-c |-r ] [-C ] [-R ] [-o var=value] [-4|-6]  []

For more information on available commands and options see 'pkg help'.

root@freebsd:~ # pkg search nginx
pkg: Repository FreeBSD missing. 'pkg update' required

^Cpkg:
signal received, cleaning up

root@freebsd:~ # pkg update
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100% 178 B 0.2kB/s 00:01
Fetching data.pkg: 100% 7 MiB 7.3MB/s 00:01
Processing entries: 100%
FreeBSD repository update completed. 34072 packages processed.
All repositories are up to date.
root@freebsd:~ #

Let’s start with wget.

root@freebsd:~ # pkg search wget
wget-1.24.5 Retrieve files from the Net via HTTP(S) and FTP
wget2-2.1.0_1 File and recursive website downloader
wgetpaste-2.34 Paste to several pastebin services via bash script
root@freebsd:~ # pkg install wget
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
The following 5 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
gettext-runtime: 0.22.5
indexinfo: 0.3.1
libidn2: 2.3.7
libunistring: 1.2
wget: 1.24.5

Number of packages to be installed: 5

The process will require 8 MiB more space.
2 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/5] Fetching wget-1.24.5.pkg: 100% 774 KiB 792.9kB/s 00:01
[2/5] Fetching indexinfo-0.3.1.pkg: 100% 6 KiB 6.0kB/s 00:01
[3/5] Fetching libidn2-2.3.7.pkg: 100% 155 KiB 159.1kB/s 00:01
[4/5] Fetching libunistring-1.2.pkg: 100% 680 KiB 696.1kB/s 00:01
[5/5] Fetching gettext-runtime-0.22.5.pkg: 100% 231 KiB 236.7kB/s 00:01
Checking integrity... done (0 conflicting)
[1/5] Installing indexinfo-0.3.1...
[1/5] Extracting indexinfo-0.3.1: 100%
[2/5] Installing libunistring-1.2...
[2/5] Extracting libunistring-1.2: 100%
[3/5] Installing libidn2-2.3.7...
[3/5] Extracting libidn2-2.3.7: 100%
[4/5] Installing gettext-runtime-0.22.5...
[4/5] Extracting gettext-runtime-0.22.5: 100%
[5/5] Installing wget-1.24.5...
[5/5] Extracting wget-1.24.5: 100%
root@freebsd:~ #

root@freebsd:~ # mkdir /root/swdist
root@freebsd:~ # cd /root/swdist/
root@freebsd:~/swdist # wget https://wordpress.org/latest.zip
--2024-05-25 19:05:14-- https://wordpress.org/latest.zip
Resolving wordpress.org (wordpress.org)... 198.143.164.252
Connecting to wordpress.org (wordpress.org)|198.143.164.252|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26193148 (25M) [application/zip]
Saving to: ‘latest.zip’

latest.zip 100%[===================>] 24.98M --.-KB/s in 0.1s

2024-05-25 19:05:15 (183 MB/s) - ‘latest.zip’ saved [26193148/26193148]

root@freebsd:~/swdist #

root@freebsd:~/swdist # pkg install unzip
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
unzip: 6.0_8

Number of packages to be installed: 1

140 KiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching unzip-6.0_8.pkg: 100% 140 KiB 143.1kB/s 00:01
Checking integrity... done (0 conflicting)
[1/1] Installing unzip-6.0_8...
[1/1] Extracting unzip-6.0_8: 100%

Now we need Nginx, MariaDB, and PHP-FPM.

root@freebsd:~/swdist # pkg install nginx mariadb php-fpm
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching 'mariadb' have been found in the repositories
pkg: No packages available to install matching 'php-fpm' have been found in the repositories
root@freebsd:~/swdist # pkg search mariadb
mariadb-connector-c-3.3.8_1 MariaDB database connector for C
mariadb-connector-odbc-3.1.20 MariaDB database connector for odbc
mariadb1011-client-10.11.7 Multithreaded SQL database (client)
mariadb1011-server-10.11.7 Multithreaded SQL database (server)
mariadb105-client-10.5.23 Multithreaded SQL database (client)
mariadb105-server-10.5.23 Multithreaded SQL database (server)
mariadb106-client-10.6.17 Multithreaded SQL database (client)
mariadb106-server-10.6.17 Multithreaded SQL database (server)
p5-DBD-MariaDB-1.21 MariaDB driver for the Perl5 Database Interface (DBI)
rubygem-azure_mgmt_mariadb-0.17.4 Microsoft Azure Microsoft Azure MariaDB Library for Ruby Client Library for Ruby

So there’s no virtual package. Also, I found that there is not a separate php-fpm package, but rather that’s included in PHP. So to cut to the chase:

root@freebsd:~/swdist # pkg install mariadb106-server mariadb106-client php83
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 18 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
bash: 5.2.26_1
boost-libs: 1.84.0
galera26: 26.4.16_2
icu: 74.2_1,1
libargon2: 20190702_1
libedit: 3.1.20230828_1,1
libiconv: 1.17_1
liblz4: 1.9.4_1,1
libxml2: 2.11.7
mariadb106-client: 10.6.17
mariadb106-server: 10.6.17
pcre2: 10.43
php83: 8.3.6
readline: 8.2.10
rsync: 3.3.0
unixODBC: 2.3.12_1
xxhash: 0.8.2_1
zstd: 1.5.6

Number of packages to be installed: 18

The process will require 589 MiB more space.
87 MiB to be downloaded.

Proceed with this action? [y/N]:

Message from mariadb106-server-10.6.17:

--
MariaDB respects hier(7) and doesn't check /etc and /etc/mysql for
my.cnf. Please move existing my.cnf files from those paths to
/usr/local/etc/mysql or /usr/local/etc. Sample
configuration files are provided in /usr/local/etc/mysql
and /usr/local/etc/mysql/conf.d.
The rc(8) script no longer uses /var/db/mysql/my.cnf for configuration
nor /var/db/mysql for logs and PID-file.

This port does NOT include the mytop perl script, this is included in
the MariaDB tarball but the most recent version can be found in the
databases/mytop port

Using wsrep clustering requires adding a configuration file.
Copy /usr/local/etc/mysql/conf.d/wsrep.conf.sample to
/usr/local/etc/mysql/conf.d/wsrep.conf and change what you need there.

I also installed php83-extensions and nginx which I forgot to put in the above command.

I learned a lot form this “message from MariaDB”.  I read the hier(7) man page and learned that FreeBSD uses a system where locally installed software goes into /usr/local.  Now, I know what /usr/local is, but in the Linux world, if you install something from the distribution’s package manager, it goes in /usr/bin, etc.  If you download, build, and install your own software, usually that goes in /usr/local.  What FreeBSD is saying is that “our creator-shipped filesystems should remain pure, and you can put all your site customizations, software installs, source code, etc. in /usr/local”.

service: The Power to Serve

One way that one Unix differs from another has usually been in startup/init, and FreeBSD is no different.

To start, stop, restart, etc. a service, you call something like this:

service nginx restart

However, there is not a “service nginx enable”.  To have Nginx start at boot, you need to modify /etc/rc.conf.

In that file, you’ll see lines like this:

mysql_enable="YES"
nginx_enable="YES"

Now, it appears to me that one can just edit that file.  However, the FreeBSDsy way to do it is with the sysrc command:

sysrc nginx_enable="YES"

That “<service name>_enable” syntax seems clunky to me.  I realize it’s because some shell script is going to source this file, but creating /etc/services_enabled and listing the services to be enabled would be much more attractive.

Getting Ready to Serve WordPress

I won’t bore you with every command.  Here are things I did.

I ran mysql_secure_installation.

After installing nginx, I modified /usr/local/etc/nginx/nginx.conf to include a /usr/local/etc/nginx/sites, which is sort of like the sites-enabled/sites-available setup on Debian but a bit more quick-and-dirty.

The specific directive to do this is:

include /usr/local/etc/nginx/sites/*;

I created a blog.lowend.party nginx config.

I didn’t mess around with php-fpm tuning, and it started:

root@freebsd:/usr/local/etc # service php-fpm start
Cannot 'start' php_fpm. Set php_fpm_enable to YES in /etc/rc.conf or use 'onestart' instead of 'start'.

root@freebsd:/usr/local/etc # sysrc php_fpm_enable="YES"
php_fpm_enable: -> YES
root@freebsd:/usr/local/etc #

root@freebsd:/usr/local/etc # service php-fpm start
Performing sanity check on php-fpm configuration:
[26-May-2024 09:40:03] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful
Starting php_fpm.

If you look at /usr/local/etc/php-fpm.d/www.conf you’ll see that php-fpm is using 127.0.0.1:9000.  I prefer to use a Unix socket.  Where to put it?

root@freebsd:/usr/local/etc# find / -type s -print
/var/run/devd.pipe
/var/run/devd.seqpacket.pipe
/var/run/log
/var/run/logpriv
/var/run/mysql/mysql.sock

Seems like /var/run is the place.

Now, let’s get some directories created and our site configured, which will be blog.lowend.party.  I like to organize everything under /web.  nginx runs under user ‘www’ with group ‘www’.

root@freebsd:/usr/local/etc/nginx/sites # mkdir /var/log/nginx/blog.lowend.party/
root@freebsd:/usr/local/etc/nginx/sites # cd /var/log/nginx/blog.lowend.party/
root@freebsd:/var/log/nginx/blog.lowend.party # touch access.log error.log
root@freebsd:/var/log/nginx/blog.lowend.party # chown www:www *.log
root@freebsd:/var/log/nginx/blog.lowend.party # cd ..
root@freebsd:/var/log/nginx # chgrp www blog.lowend.party/
root@freebsd:/var/log/nginx # chmod 775 blog.lowend.party/
root@freebsd:/var/log/nginx # ls -ld blog.lowend.party/
drwxrwxr-x 2 root www 512 May 26 09:45 blog.lowend.party/
root@freebsd:/var/log/nginx # ls -lR blog.lowend.party/
total 0
-rw-r--r-- 1 www www 0 May 26 09:45 access.log
-rw-r--r-- 1 www www 0 May 26 09:45 error.log

root@freebsd:/var/log/nginx #

BTW, it’s nice when highlighting to copy something in vi, I don’t have to first do a

:mouse-=a

Like I do with vim.  This is because FreeBSD is using a BSD-derived vi.

root@freebsd:/usr/local/etc/nginx # mkdir -p /web/blog.lowend.party
root@freebsd:/usr/local/etc/nginx # vi /web/blog.lowend.party/index.html

Is it working so far?

FreeBSD Static Success

Now let’s do a couple more things.

Learning More About FreeBSD

I installed certbot.  Amusingly:

root@freebsd:/usr/local/etc/nginx # pkg install py39-certbot-nginx
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
New version of pkg detected; it needs to be installed first.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
pkg: 1.21.2 -> 1.21.3

Number of packages to be upgraded: 1

12 MiB to be downloaded.

Proceed with this action? [y/N]: y

So in the middle of working, I happened to hit a time when they pushed a new update of pkg.  And Netcraft says BSD is dying…sheesh.

The Certbot package suggested I needed to modify /etc/periodic.conf so that certs would be renewed.  It didn’t exist.  So I did the logical thing: man periodic.conf.  Therein I learned

It resides in the /etc/defaults directory and parts may be overridden by a file of the same name in /etc, which itself may be overridden by the /etc/periodic.conf.local file.

/etc/defaults/periodic.conf says:

You should not edit this file! Put any overrides into one of the
# $periodic_conf_files instead

...

# What files override these defaults ?
periodic_conf_files="/etc/periodic.conf /etc/periodic.conf.local ${_localbase}/e
tc/periodic.conf"

Now, I wanted to check that DNS was working, so I did:

# nslookup blog.lowend.party
-sh: nslookup: not found

So like on nearly every Linux distro or OS, I need to google to find which package has nslookup.  And Google misled me.  The first forum comment I found said it was part of bind, which was replaced by unbound.

However, “pkg install unbound” didn’t have it, so that was followed by “pkg remove unbound”.  Wait…is there a “bind tools” type of package?  Sure enough

pkg install bind-tools

By this point, I was missing the bash shell because I drive my shells hard.  Fortunately, it was installed, and in fact it was already setup in /etc/shells.

bash -o vi

Ah, so refreshing.  I guess it’s human nature to respond antagonistically when a cherished tool is replaced.

BTW, I didn’t change it for root, because all kinds of engineers contributing to FreeBSD have written code assuming it’s run under root’s default shell.

Final Stuff for WordPress

I created a MySQL database and user, etc.

create database wordpress;
create user 'wordpress'@'localhost' identified by 'StrongPassword';
grant all on wordpress.* to 'wordpress'@'localhost';

I did not flush privileges because that is silly.

cd /web/blog.lowend.party/
cp /root/swdist/latest.zip
unzip /root/swdist/latest.zip 
rm index.html 
mv wordpress/* .
rmdir wordpress

I think we’re ready to install.  Let’s see:

Bad Gateway

Noooooo…

So my first though was that php-fpm was down (it wasn’t) or that it was misconfigured…perhaps it was.  I’d changed it to use a Unix socket, and that was causing permission denied errors in Nginx logs.   Should I just change the permissions on /var/run/php-fpm.sock?  Hmm, instead I changed it back to use 127.0.0.1:9000 and updated the nginx site config as well.

After that:

FreeBSD Success

And at that point, we’re into WordPress.

Let’s Try Phoronix

pkg install phoronix-test-suite-php83-10.8.4_2

This succeeded, but attempts to

phoronix-test-suite install nginx

resulted in:

            The installer exited with a non-zero exit status.

            ERROR: make: Fatal errors encountered — cannot continue

            LOG: ~/.phoronix-test-suite/installed-tests/pts/nginx-3.0.1/install-failed.log

    [PROBLEM] pts/nginx-3.0.1 is not installed.

Lots of these errors in the log:

sed: 1: "nginx_/conf/nginx.conf": extra characters at the end of n command
sed: 1: "nginx_/conf/nginx.conf": extra characters at the end of n command
sed: 1: "nginx_/conf/nginx.conf": extra characters at the end of n command
sed: 1: "nginx_/conf/nginx.conf": extra characters at the end of n command
sed: 1: "nginx_/conf/nginx.conf": extra characters at the end of n command
sed: 1: "nginx_/conf/nginx.conf": extra characters at the end of n command
tar: Failed to set default locale
make: "/root/.phoronix-test-suite/installed-tests/pts/nginx-3.0.1/wrk-4.2.0/Makefile" line 6: Invalid line type
make: "/root/.phoronix-test-suite/installed-tests/pts/nginx-3.0.1/wrk-4.2.0/Makefile" line 9: Invalid line type
make: "/root/.phoronix-test-suite/installed-tests/pts/nginx-3.0.1/wrk-4.2.0/Makefile" line 10: warning: duplicate script for target "ifeq" ignored
make: "Makefile" line 8: warning: using previous script for "ifeq" defined here

That isn’t my nginx.conf that has a problem:

# nginx -t
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful

I thought about doing a pkg remove and then install from GitHub, but GitHub has the same version as FreeBSD’s pkg.  Well, I’m out of my depth.  To be fair, PTS says:

The Phoronix Test Suite is supported on Linux, *BSD, Solaris, macOS, and Windows systems. However, the most full-featured and well supported operating system for conducting the tests is Linux

Why Does It Boot So Slowly?  Or Rather, Why Did I Make It Boot So Slowly…

So when I booted off the ISO, it took a long time to boot and I figured that was because it was some kind of install kernel doing a lot of extra probing, a lot of install/discovery scripts running, etc.

But I’ve rebooted three times now and watched in the console, and see the same thing.

After the logo is up and autoboot counts down, the kernel loads.  For the first 5 or 6 seconds, things appear to be progressing rapidly, with lots of messages going by.  Then we get to this:

FreeBSD stuck

At this point, it sits for about 1 minute and 45 seconds.  Then the screen suddenly changes to this.  I say “changes to” because it’s not a scrolling but rather the entire screen is refreshed and looks like this:

FreeBSD Unstuck

The first time I thought perhaps there was some first boot/finishing setup business that was causing that hang but it’s consistent over three reboots.

I think there are two things going on.  First, there’s a display bug or reset that doesn’t update, so I’m not sure how much of that 1:45 hang is a hang and how much are taken up in showing the messages in the second screen shown above.  Second, there’s something either timing out or taking a long time on boot.  FreeBSD can’t routinely take 2 minutes to boot on enterprise-grade servers, right?

Well, let’s see if it’s FreeBSD or something I screwed up.  I created a freebsd2 VM on Vultr, same specs, this time using their FreeBSD 14.0 template.

And that VM boots in about 6.5 seconds.

OK, so one of two things are possible:

  • I screwed something up as a junior FreeBSD sysadmin
  • Some optimization is needed for FreeBSD on Vultr that Vultr knows and I don’t.  Could be that some parameters need adjusting or some hardware support should be added (or removed), or a certain kernel config, etc.  I bet if I spent time on forums and doing compares between their template and the ISO install I could track it down.

I was going to run FreeBSD on Vultr, I’d use their template.

Further Research

I’d like to learn more about these things:

  • Jails, which lie somewhere between chroot and containers, or maybe have a bit of both.
  • FreeBSD’s Mandatory Access Controls, or selinux for BSD
  • ZFS

Final Thoughts

I like the /usr/local separation a lot.  pkg seems to work as advertised.  A lot of the quirks are things that you’d encounter moving between Linux distros as well (how does the installer work, what package has nslookup, etc.)  Some finger macros would need adjusting.

Obviously, I’d have to figure out that boot issue and other things, but FreeBSD by no means feels alien and I think I could be very comfortable using FreeBSD on a regular basis.  I’ll save my other thoughts for the conclusion!

Next Up: NetBSD!

raindog308

No Comments

    Leave a Reply

    Some notes on commenting on LowEndBox:

    • Do not use LowEndBox for support issues. Go to your hosting provider and issue a ticket there. Coming here saying "my VPS is down, what do I do?!" will only have your comments removed.
    • Akismet is used for spam detection. Some comments may be held temporarily for manual approval.
    • Use <pre>...</pre> to quote the output from your terminal/console, or consider using a pastebin service.

    Your email address will not be published. Required fields are marked *