Files
hpr-knowledge-base/hpr_transcripts/hpr4388.txt

348 lines
30 KiB
Plaintext
Raw Normal View History

Episode: 4388
Title: HPR4388: BSD Overview
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr4388/hpr4388.mp3
Transcribed: 2025-10-26 00:05:46
---
This is Hacker Public Radio Episode 4388 for Wednesday the 28th of May 2025.
Today's show is entitled BSD Overview.
It is hosted by Norrist and is about 43 minutes long.
It carries a clean flag.
The summary is Norrist describes how you can be a real hacker and run BSD.
So I wanted to give kind of an intro or an overview of the BSDs and maybe a little bit
about how I know BSDs.
Personally I use free BSD and open BSD around the house quite a bit.
I've never had a job where I'm used either one but I use them at home a lot.
There's also net BSD, I don't use that very much.
I've installed it a few times just to kind of mess around with it but it never really
stuck around.
That doesn't have anything to do with the capabilities of net BSD.
It's just not something that stuck around for me.
And then there's another kind of a big BSD called Dragonfly BSD.
I'm going to kind of intentionally leave that one out of the discussion mostly because
the development on that project has really slowed down in the last few years.
It had some momentum for several years and had some really cool technologies kind of
coming out of it, especially the file system.
There's a hammer file system.
But like I said, that's slowed down and I don't really know the feature of the Dragonfly
BSD.
So other than what we just talked about, I'll probably leave that one out.
So there's been a handful of HPR episodes already on BSDs.
Probably the quickest way to find some is to look at the tags page on HPR.
There's several BSD related tags.
And there's been a few hosts that have done several BSD related podcasts.
Claudio Miranda's got a few.
I've got a few where in episode 3, 7, 9, 9, I talked about my home routers and I mentioned
that I used Open BSD there.
In 3, 1, 8, 7, I talked about using Ansible to manage my home routers that run Open BSD.
That was like Swakad ad host to the DHCP configs and to the local DNS.
What else?
3, 1, 6, 8.
I did an episode on using 3 BSD Jails.
3 BSD Jails or it's like Jails are like a container technology.
If you're familiar with Docker, it's not exactly like Docker, but it's the same kind of virtualization.
But it's a good way to run applications in isolation.
So that was, I talked about that in 3, 1, 6, 8, and then lay back in 21-81, I talked
about launching the Open BSD installer from Grub, I don't.
The point of that episode was if you had a Linux, that you wanted to install Open BSD on,
this was kind of a shortcut to loading up the installer, I don't think it works anymore
though, the Grub supports loading BSD kernels, but I think for a few years now that hasn't
been turned on by default in the Linux distributions, I don't know specifically if you look at
like the Red Hat, Enterprise Linux, and its derivatives, it worked in Rail 7 and
it's into S7, but it hasn't worked in like 8 or non, so that episode probably deserves
an update, but anyway that's sort of a quick overview of my experience, and we'll talk
a little bit more about how I use BSD, so just kind of a really quick, I'm going to touch
just briefly on, very briefly on the history of BSD and what it is and kind of where it
comes from, I've got a couple of Wikipedia links in the show notes, the first one is
a history of BSD, and it's pretty long, kind of the key takeaway and I'll read a quote,
it's the history of the Berkeley software distribution, began in the 70s when at UC Berkeley
received a copy of Unix, the professors and students at the university began adding
software to the OS and released it as BSD to select universities, so what that means
is that the original Unix was given to these universities and they started adding things
to it, little bits here and there, and the little bits here and there turned into BSD,
so BSD is a direct descendent of the original Unix, then the other Wikipedia article I have
listed in the show notes is a comparison of the BSDs, and it's a good place to start
if you want to know more or learn more about the BSDs because one gives kind of a quick
intro to each of the BSDs and then it's like the page says it gives comparisons between
the BSDs and also it lists some of the derivatives, so for the free BSD project it will list some
other projects that have been based on free BSD, it's an interesting read, even if you
don't intend to install or use BSD, so because I'm pretty sure for the most part, HPR listeners
are familiar with Linux, I'll kind of start with Linux and make some comparisons of the BSDs
to Linux and just this kind of a jumping off point to talk about what BSD is, so when I make
some comparisons I want to be sure and emphasize that me personally, I'm not saying one is better
than the other, so when I talk about licensing I'm trying really hard not to say that
one type of license is better than another type of license or one type of way to manage
network cars is better than another type of way, I'm just pointing out the differences if it sounds
like expressing a preference that one is better over the other, I'm not, so the first thing
that's kind of different between BSD and Linux is, like I already mentioned, BSD is a direct
descendant of the original Unix, where Linux and sort of the typical pieces of software we
think about in a Linux distribution, like the kernel, the Linux kernel and the GNU
utilities and other bits that make up that operating system, you know those things were
written to be compatible with and to emulate the original Unix, but the BSDs are direct descendants
of the original Unix, the next thing we'll talk about with the BSDs is the, when we talk about
free BSD or open BSD, these aren't distributions like you would think about a Linux distribution,
it's not the free BSD versus open BSD, it's very different than comparing
Fedora to Ubuntu, so the BSDs longed, they started as a singular project coming out of Berkeley
and long, long time ago they split and split a couple more times and we have kind of the
three main projects today and they're all sort of direct descendants from the same place, but
they're very different projects now and they're not, you know free BSD is not a BSD distribution,
open BSD is not a BSD distribution, they're just, they're different projects with similar names
similar but the same origin, kind of the next compare some of the Linux we'll talk about is the
license, you've probably heard the term BSD style license before, if you haven't, the BSD
software license, there's not, well first there's not like a singular BSD license, there's several
licenses under different names, they're all a little bit different, but sort of the key to a BSD
licenses, one they're really simple, they're usually will fit on a page, you know if you're looking
at it, you can kind of see the whole thing at once and then sort of just to kind of quickly
summarize what a BSD license is, it basically says you can take this code and do anything you want
as long as you don't say that you wrote it, that's really, most of the time that's really the
only restrictions with a BSD license and I'm going to compare that to a copy left license,
something like the GPL, which Linux and most of the kind of Linux related software is released
under the copy left license, typically the GPL version two or three, and with that you know it's
similar to the BSD license where you can take the code, you can do anything you want with it,
as long as sort of the real key with these licenses is if you make any additions or derivative
works, those have to be under the same license, under the same copy left license, so just to kind
of put a fun point on it, if you have a, if you take a BSD license project and you make some changes
to it, those changes are yours and they belong to you and you don't necessarily have to license them
in a certain way or make them public or anything like that, whereas with a copy left license,
any additions or derivative works have to come under the copy left license,
so all right that's enough about license, another kind of key difference between the BSD projects
and what we typically think of as a Linux project is the BSD projects are,
everything is developed together under a single project and what I mean by that is the same project
and the same team will be doing work on the kernel, but they'll also be doing you know the same team
and the same project might be working on the C libraries or the kind of a core utility like
Grapor said, all these things, the kernel and all the things we typically think of as part of an operating
system, all these things are developed together in a single project, so the free BSD, open BSD,
net BSD, they're all doing all of the operating system work together and kind of compare that to
something like Fedora or Ubuntu, you know you've got a team doing the kernel and you've got another team
doing Grapor and another team doing said and it's the job of the distribution is to take all
these different parts and put them together into something we we think of as like a Linux distribution.
Most of the software that you typically think about has been able to run on Linux is going to be
available on most of the BSDs, there's going to be exceptions just like there are to everything,
but you know things like LibreOffice and Firefox and GNOME, KDE, BLC, FFMPEG, all these things are
that you're used to working with are available and can be built on a BSD. Speaking of software,
I'll mention ports and packages real quick, all of the BSDs have something called ports
or you may hear to it refer to as a port tree, what that is is ports or a port tree is a collection
of instructions to build software and if you're familiar with Gentoo or some other Linux
distribution that's source-based it's kind of like that where if you want to install some software
using a ports package you would find the specific instructions for that and the ports are in a
big giant directory it's kind of divided up by purpose so let's say you wanted to install something
like VLC you could find the VLC directory CD into the VLC directory and type of command something
like make install or something like that and then that would download the software and build
it and install it for you and any dependency would check for dependencies and if there's some
dependencies that it needs it would download and install those too so that is ports I'll compare
that to something called packages and this is more typical of what a Linux system would have
where the development team would do the compilation step for you and just give you the output or
make the output available for you to install so if you're on Fedora or Ubuntu or something like
that you want to install VLC you can just type DNF install VLC or apt install VLC so that is ports versus
packages all of the BSDs have ports and all of the BSDs also have packages so if you're on
pre BSD and you want to install VLC you got two ways to do it you can download the ports
CD into the ports directory for VLC and type make install and it'll do all the work for you
or you can do it the easy way into type package install VLC so that's ports versus packages
or ports as instructions for installing software packages are like pre-built software like
we used to with AfterYum something like that kind of the final comparison I'll make to Linux is
how some devices are named it might catch you by surprise specifically with network adapters
and disks so in the BSDs typically the network adapters are named after the driver
that that network adapter is using for example a very common driver is called the EM echo mic
EM driver that's the driver for Intel network cards so if you have two Intel network cards the
first one is going to be called EM0 and the second one is going to be called EM1 and if you got
another one named that uses the RAD driver I'm just making stuff up RAD if you got two of those it'll
be RAD0 and RAD1 and if you've got one EM and one RAD there'll be RAD0 and EM0 and that's different
you know used to be with Linux everything was ETH0 now I don't know I can't really keep up with
I don't know where the NENS 160 I don't know where they come from anymore but
the network card the names will be different between BSD and Linux so that's just something to look
out for the other thing to look out for is disks and partitions and file systems
just to give you a warning they are under the hood it's the same but they frequently refer to
them differently and it's very easy to get yourself in trouble if you have some Linux knowledge
and you're trying to apply that to a BSD system so it's not impossible to learn the BSD
disk management commands but I'll just say if you're going to work with disks and BSD be careful
do it somewhere where it doesn't matter do it on a spare disk or somewhere that you don't have
to back up you can destroy the disk so now I'll dig into each of the BSDs a little bit maybe talk
about like what what kind of separates them a little bit maybe what's what's unique or distinctive
about open versus free versus net BSD what are some standouts so first is free BSD it is
generally accepted to be the most popular and most widely used you know there's really no
real way to know that but most people assume probably correctly that most BSD usage is free BSD
free BSD has a lot of commercial projects that are based on free BSD and I won't name them because
I'll probably if I tried to I'll probably get it wrong but there's a lot of commercial projects that
are if it's based on BSD it's probably based on free BSD and most of that is due to the you know
we were talking about earlier with the license the premise of license one thing that's really
really stands out about free BSD a big feature is it's tightly integrated with ZFS the kind of
next generation file system it is it natively supports free BSD natively supports ZFS or the ZFS
supports built into the kernel with you know Linux projects there's some debate about whether or not
you can include the ZFS code because of the license if you can include it with the kernel some people
again not it's not for me to know or decide but there does seem to be some incompatibilities
between them ZFS license and the DPL that's not an issue with free BSD because it's not under
the DPL so the ZFS code is right in free BSD so you don't there's no extra work or anything you have
to do to get ZFS work in and then a lot of the tools will have ZFS integration for example whenever
you if you do if you stick to the defaults when you do the installation you'll be using ZFS
partitions and then whenever you do something like updates it will automatically ZFS will automatically
take a snapshot and there will be something called a boot environment so when you reboot
you'll be given the option to delete into an old an old snapshot if you need to
another feature that really stands out with free BSD or jails I mentioned jails a little bit already
but it's a virtualization it's a way to virtualize and separate processes so it's like you get
if you're running if you have free BSD and use jails it's like you can have a second copy
of free BSD running inside of free BSD and that's what a jail is it's just like another
free BSD system that runs in charge or main free BSD system and it's really useful for
experimenting or running applications and there's a few tools I use IO cage that's a good tool
you don't you don't necessarily need an extra tool to manage free BSD jails but it can help
and then the other notable thing about free BSD is it's the base for a lot of
open source sort of appliance like distributions so primarily I'm thinking about firewall
appliances like pfSense and openSense and then previously it's changing now but free NAS and true NAS
NAS obviously NAS based operating systems with built-in features for like
making it really easy to set up file shares or things like that now they're newer versions are
not based on free BSD anymore but that's sort of the heritage of that project is free BSD based
next on the list is open BSD it is probably most well-known for us it's focus on security
that is almost a little backwards because it is a very secure OS but and the developers do focus
on security but their kind of main focus is on writing a correct operating system so
you know just it's a downstream effect of writing correct code and doing things the right way
downstream effect of that is that it's also a very secure operating system so the open BSD project is
a lot of times they're the first OS to introduce new features specifically around security
so things like ASLR or address space layout randomization it's something that all the operating
systems do now but open BSD is the one that's sort of developed and paved the way sort of proved out
that that technology can be implemented operating system wide and they'll do other things like
kernel relinking every time you reboot it sort of rearranges the kernel so the next time you
reboot it'll be the same kernel but everything's in a slightly different place in memory so it
makes it basically impossible to do to take advantage of security vulnerabilities that depend on
specific pieces of code being in specific places in memory open BSD does a lot of things to sort of
mitigate those types of vulnerabilities open BSD is the home of several projects
that have sort of made their way out into the wider ecosystem most notable is open SSH I know
everybody that's listening to me right now has used SSH or open SSH and that the open SSH you are
using is comes from the open BSD project they develop it for themselves and then make it available
to everyone else something else that's kind of distinctive about open BSD is it in the base
installation it includes Xorg and a very minimal window manager so with the other BSDs and with a
lot of Linuxes when you do kind of the base install you just get a console and a bunch of utilities
but with open BSD it comes with like I said Xorg and a display log-in manager and I think
it's FVWM is the one it ships with but it's not it's not pretty to look at but sort of the
default install like I said includes if you choose if you choose to enable it or and boot it sort
of comes with a log-in manager and a window manager and then finally for open BSD the last thing
I'll say about it is that its documentation is extraordinarily good and specifically the man
pages if you're someone who struggles reading man pages or has a hard time bonding information
in man pages that's just because a lot of man pages aren't easy to read they're not easy for
users to read open BSD man pages are an exception of that they're very straightforward very easy to
use very easy to understand and the key is they always have examples at the bottom so if you're
looking for some new software you want to try out and you're not quite sure how to do it or how to
use it you open the man page and you read through it and you still you're not any closer to actually
being able to use it than you were before if you can look at an open BSD man page it's just so
refreshing to see an example that's probably what you want to do probably the reason you open
the man page is to learn how to do something and that something is probably going to be spelled out
at the end of the man page exactly what you want so that's the last thing I'll say about
open BSD the document all of the BSD projects have good documentation the open BSD documentation is
phenomenal the last one on the list is net BSD and unfortunately I don't have a lot to say about it
because like I said earlier very minimal exposure to it it's not something of a brand
with any for any real purpose other than just when installing that BSD you just kind of see what it
is that's really all I've ever done with it the two things I know they really stand out about it one
is that it's one of the project goals is to support the widest amount of hardware available
so net BSD will run on things that no other operating system will run on if it's a computer with
a CPU and RAM regardless of the architecture when it was built who built it how unique it is there's
a pretty good chance that net BSD won't run on it the other thing it's kind of a standout for
net BSD is the packaging system it's called package src package src it is built to be portable so
what that means is even though it's it's intended for net BSD it's the default on net BSD you can
also install it on other unixes so if for some reason you're not happy with the package manager on
your flavor of unix you can go to the the net BSD site has instructions for using their packages
and their package manager on your flavor of unix including Linux or sleras or several others but
they build their packages with the intent of making it available to not just their project but to
other projects so next I'll talk about how me personally how I use BSD where I use it sometimes
the wires sometimes the wires are just arbitrary but maybe it'll help help you kind of figure out
if you want to use BSD and how and where you might want to use it so the first thing I'll mention
is my home router I go in a little more detail in the hpr episode I mentioned earlier but
my network is sort of the entry into my home network is bounded by a router historically it's
ran open BSD and I have to recently migrate from open BSD to free BSD and really the only
reason I've had to updone that is because the I needed to upgrade the hardware from a home router
wanted to get some like 2.5 gigabit networking and open BSD supports 2.5 gigabit networking but
I kept buying these cheap firewall appliances I'll AliExpress and I bought a couple different ones
and they both have the same problem where the on paper open BSD supports them but in reality I
ran to a lot of problems doing the installation and getting the keeping the network adapters working
through through the installation process and then after but with free BSD they worked just
on so I was able to port all of my configs and everything from open BSD to free BSD haven't had
any trouble that was about a year ago so for years and years I ran open BSD as sort of my home
gateway firewall appliance and recently switched to free BSD.
So the next place I use BSD at home is like workstation so I've got a laptop and a desktop
the laptop dual boots arch Linux and open BSD I've given you some warnings about dual
booting and I'll probably mention it one more time it's definitely possible to dual boot
BSD and Linux or BSD and Windows but you just need to be really careful if you do it
so having given having given you that warning one of the ways I use open BSD is on a laptop
like I said I'll dual boot just kind of go back and forth between the two one downside using open BSD
is that because they focus on code correctness they weren't happy with their implementation of
the Bluetooth stack and they didn't really they didn't have the developer to work on it
and it was the code was getting kind of old and they weren't happy with it anyway so
instead of leaving something there that they didn't like they just took it out so open BSD doesn't
have any Bluetooth support which on a laptop is a little limiting especially if you're using
like Bluetooth headphones and stuff but otherwise open BSD runs just on a it's on a think pad it's
well supported on open BSD as well supported on think pads the other way I use open BSD is I'm
going to as a workstation is I've got a look at a kind of old desktop form factor PC that I use
to do my banking and financial kind of stuff on and I do that mostly because I like having a
separate system for doing sensitive work I just don't want to risk accidentally leaking some
banking credentials or something like that and since I'm going to have something separate it may
as well be something that I feel good about the security so I have an open BSD system I turn it on
just you know maybe once a week log in do whatever financial or baking work I need to do and then
turn it off and you know like I said earlier all of the kind of all of the software that you're
used to on Linux is probably going to be available on BSD so I'm able to use Firefox and
LibreOffice and all these all these things work just fine on open BSD so I don't have any trouble
using open BSD to take care of my kind of everyday everyday sort of normal work
and then last place I use BSD at home is with like my home NAS runs free BSD
sort of a quick history many many years ago I bought like an old HP micro server it's a
roast kind of a small form factor server it's got four disk bays in the front when I bought it
I put originally put a true NAS on it and then decided to just bite the bullet and go just like
straight plain old free BSD and so I would use it like I said for a NAS so lots of storage and
network shares and then out of jails on it for running like self hosted apps run those things
inside BSD jails and I'm going to use the ZFS pools for the storage at some point a couple of
years ago I wanted to upgrade my home server hardware and when I when I did that I decided to use
Proxmox instead of as sort of on the bare metal that way I could do you know I have some other
virtual machines and stuff so what I did was installed free BSD you know Proxmox VM and then
just took the disks out of the HP micro server put them in the Proxmox server and just did
like a disk pass through so the VM sees it as just just sees the raw disks and it's the same
disk that I was using before and I was able to copy the configs over so my free BSD NAS even though
it's a virtual machine it's just running free BSD directly connected to drives and I use it the same
way just NAS storage CFS NFS Samba as well as having some self hosted home lab kind of applications
running in free BSD jails so a few recommendations if you want to try out BSD what what these are some
I'd recommend you try one if you want to try out a building your own home router I would go two
different ways if you really want to dig in and learn and write some configs and do a bunch of
DIY stuff I'd personally I'd start with open BSD just because the documentation is so good if
you don't want to do that any of the BSDs will work just fine and then if you want something a little
easier to manage a little more familiar to manage if you started with something like open
sense or PF sense these are appliances that are based on free BSD that have like a web management
UI and it would be really similar to like man if you have a home router with DDW RT or something
like that you could basically get the same experience just getting some old computer hardware put a
couple of network adapters in it and install open sense and then they would give you sort of some
easy exposure to BSD as a home router next recommendation is if you have a think pad that you're
not really doing anything else with try open BSD on it open BSD is very well supported on think pads
because the open BSD project is the developers make that project for themselves and then they
just kind of share it with everyone else so because of that they do a lot of dog fooding they all
work on open BSD to develop open BSD so and a lot of the developers have think pads so think pads
good laptops everything is going to work just fine on them but they're particularly open BSD is
particularly well suited for think pads because that's what a lot of the developers have
if you have some other hardware or you don't want to use open BSD as a workstation or desktop or
laptop the next thing I'd recommend is one of there's two derivatives of free BSD that are sort of
desktop focused ghost BSD or midnight BSD or the two that I'm thinking about I've never used
either one but I haven't heard anything about them and they are just sort of um
they're free BSD based they're really the free BSD true free BSD under the hood
they just come with some little some extras and some uh it help you get
desktops going so if you want to try um free BSD or any of the BSDs on a desktop
either ghost or midnight BSD or you know free BSD isn't by itself isn't all that hard to
get going on a desktop or workstation but might be a little easier to start with something like
ghost BSD or midnight BSD then if you've got a server or something like that you want to set up
um free BSD is a great server OS I've talked about how I use it with zfs and jails
um if you've got a kind of a little weird piece of hardware maybe like a raspberry power or
something all the BSDs that will support it but um it'll be a good chance to try net BSD because
they'll have really good support for all kinds of warehouse hardware um and then the last thing
I'll leave you with is I think this is the third time I've given you the warning um disc management
on BSD um is it's not harder to do is just different so um if you're used to managing disk
with Linux or using the Linux commands um that might not help you um managing disk and
partitions and dual booting and things like that might not help you do those things on BSD so
just keep that in mind um if you want to try BSD I encourage you to use real hardware um but at the
same time I'll say uh when you do the installation if you can uh install it on a disk uh just maybe
you have a spare disk or a spare laptop or something like that or if you uh make a mistake and
override a partition or override a disk you you want to do that on some hardware where it doesn't
matter um it's not impossible to dual boot uh BSD and Linux I do it uh but like I said it's
it can be tricky uh so avoid it if you can use real hardware if you can but avoid dual booting
again uh and with that warning I think that's all uh had to talk about so try BSD it's um it's a
little different than Linux it's a little um uh like an uncanny valley kind of situation where it's
familiar but just a little different but um it's worth trying out it's worth using um then you
can always claim to be a real hacker uh if you can run open BSD or free BSD all right that's it
I'll see you on the next one
you have been listening to Hacker Public Radio at Hacker Public Radio does work
today's show was contributed by a HBR listener like yourself if you ever thought of recording
and click on our contribute link to find out how easy it really is hosting for HBR has been
kindly provided by an onsthost.com the internet archive and our synch.net on the Sadois status
today's show is released on our creative commons attribution 4.0 international license