Posted by jaypatelani 2 days ago
proplib (property list library for kernel-userspace communication), RUMP (Rump Kernel - anykernel framework allowing kernel code to run in userspace), Veriexec (verified exec integrity subsystem using cryptographic fingerprints), LFS (Log-structured File System - NetBSD maintains the only production LFS implementation), WAPBL (Write Ahead Physical Block Logging - metadata journaling), ATF (Automated Testing Framework - originated from NetBSD, now used across BSDs), etc. Feel free to check them out! Each one of them is interesting, IMO.
Beyond these specific features, NetBSD's real strength is its extreme portability (runs on over 50 hardware platforms, from VAX to ARM to obscure embedded systems), exceptionally clean and readable codebase, and pkgsrc (a portable package system that works across BSDs, Linux, and other Unix-like systems). I believe it makes NetBSD valuable not just as an OS, but as a reference implementation and research platform. The code quality and documentation are outstanding for anyone studying OS internals as well. :)
I noticed someone asked what NetBSD is. I am happy to break down the different BSD flavors (NetBSD, OpenBSD, FreeBSD, DragonflyBSD) and their unique features if that would be helpful!
OpenBSD has great man pages as well. :)
I left out FreeBSD from that comment, which has its own set of innovations: Capsicum (capability-based security framework), Jails (OS-level virtualization/containerization which predates Docker by over a decade), MAC Framework (Mandatory Access Control for fine-grained security policies), GEOM (modular disk I/O framework), Linuxulator (Linux binary compatibility layer), ZFS (FreeBSD has arguably the best ZFS implementation outside of Solaris), bhyve (type-2 hypervisor), and so forth.
Userland tools include iocage/bastille (jail managers), poudriere (package building), jemalloc (default allocator which focuses on fragmentation avoidance and scalability) among many others.
Each BSD really does have its own character. FreeBSD leans toward performance and production use, OpenBSD toward security and correctness, NetBSD toward portability and clean design, DragonflyBSD toward alternative SMP approaches!
(illumos/OpenIndiana is quite interesting, too (see DTrace, Doors IPC, Zones, SMF, Contracts, Event Ports, RBAC)).
And sure, technically both FreeBSD and Ubuntu use OpenZFS codebase now, but FreeBSD has in-tree, native kernel integration, whereas Linux has DKMS modules that are separate from mainline kernel, AND FreeBSD had ZFS since 2007 (18 years) and is considered more mature, whereas Linux's stable ZFS is much newer.
Additionally, some features work better on FreeBSD, Boot-on-ZFS is more polished on FreeBSD, and there are performance differences, too.
So my original claim is fine, though illumos is probably the actual best which is technically not Solaris anymore (even though it comes from OpenSolaris)... but as with always, you need history. Follow the timeline. :P
And this was in 2007.
I thought of NILFS2 on Linux as more practical. (meanwhile, didn't test, used btrfs instead)
Emotionally I like this - but thinking more dispassionately, these systems use, by modern standards, a huge amount of power. I wonder if, for many (most?) of them, it whould not be more environmentally responsible to replace them with modern, less power-hungry devices.
The cost of creating new computers has got to be pretty high to the environment (I've heard 85% of lifetime carbon emissions from computers are from the manufacturing process), and I strongly suspect that we don't take that into consideration since we greenwash ourselves by forcing China to do our dirty work, chastising them for it, and then patting ourselves on the back for buying "more energy efficient chips".
I'm surprised someone like the Sierra Club, Consumer Reports, a scientific group, a government group, etc. doesn't undertake it. Yes, it's a bunch of work, there would be uncertainty, but it's essential and better than nothing.
There are such things for food:
* Klimato: https://klimato.com/
* The Big Climate Database: http://thebigclimatedatabase.com/
But if the cost of a new machine is the same as a year or two of the old operating the new is probably the way to go.
They aren't; among other things, most environmental harm is externalized. When you buy things that produce climate change or microplastics, the cost of the impact is paid by society generally.
But aren't those made regardless if the people with old computers upgrade to them or not? I guess over time, they'll make less if people buy less, but the ones we'd purchase today has already been made, and might as well replace less energy efficient devices than just being added to the global count.
With a bit less performance? Sure. But for my use-case it works. And more people realizing that might actually be a good thing.
I did replace the screen with a low power screen, which easily had the biggest impact on battery life.
I haven't tested the T480 under OpenBSD in a while, but my guess is that if I ran it with "apm -L", it would get close to the same numbers.
This argument misses the forest for the trees for non-commercial users.
It's interesting to observe that a 1990 (386) vs 2000 (Pentium III) computer is a heck of a lot different than a 2015 vs 2025 computer. We're talking about Skylake (2015) which would have no issue as a daily driver for quite a lot of people.
It uses just 1.5W.
Any more recent alternative would consume much more power.
I’ve just replaced an old Cubieboard (RPi1 alternative - about 2W) running Pi-hole and an old temperamental gigabit router (~10W) with a 2014 Mac mini (plus second Gigabit adapter) - which uses about 11W (a really efficient computer for its age!)
It’s less than the old combo drew - but I wonder if I could be accomplishing the same with an (or even a couple of) SBCs - and if that would ‘pay for itself’ (environmentally well as financially) after a couple of years.
At 11W, the financial costs of running are quite low. I think it's about 90 kWh per year. Depends on your rates, but I've seen $0.60 quoted in comments lately as a high rate for PG&E customers in California, which is about $55. You might well be able to invest in something that can run your load for fewer watts, but I don't know if it's worth the effort.
You're likely to get a lot more savings by looking at things that use more energy.
It is running Gitea, Prometheus and a bunch of small tools I wrote (weather monitoring, home automation, family data sharing and tools for my Kids)
By coincidence I installed NetBSD last weekend on a Raspberry Pi. Never used it before, but it seemed very nice. I had some issues with sshd (most likely just me doing something stupid) and never got as far as experimenting with WiFi, but supposedly there is some support (unlike FreeBSD and OpenBSD that do not support WiFi on any Raspberry Pis?).
If you really need wireless you can buy a USB WiFi dongle, and since there is a lot of support a compatible one is restively easy to find.
I believe that this is true for just about all widely popular distributions. It's probably possible to set up Arch to have power draw similar to NetBSD, but you're going to have to know what you're doing and it's probably going to require more administration/attention to keep running smoothly than NetBSD does.
I always had the same question about cleaning recycling as it went through a recycling plant -- is the water usage environmentally "friendly" versus what is ultimately recycled (which is often not much, sadly).
In my experience, newer computers have slightly higher idle power consumption, but much less total consumption for a given compute task. On top of that, new computers are more likely to have dedicated hardware to accelerate the latest codecs.
If you're using an old computer for ray tracing or neural networks or video transcoding, it's probably using enough power that it's worth upgrading.
If you're browsing the Web or watching YouTube videos or running a file server, power consumption is probably similar on old and new computers, but regardless of the age, much higher on desktop computers than laptops.
Look at power supplies on vintage computers, and you'll see that they're much, much smaller than on modern computers.
Low Tech Magazine wrote an article about this here:
https://solar.lowtechmagazine.com/2020/12/how-and-why-i-stop...
Come on, look at all the businesses and what's really happening in the space you're commenting on. That laptop literally means nothing.
The comparison probably needs to be: Running that old NetBSD machine for a few hours a day, worst case about 40 while I work vs. producing an running a brand new laptop.
If we're talking desktops, then many older machines have 2-300W PSUs, not even enough to power a modern graphics card (I know, an Nvidia card isn't running 600W all the time).
And on a larger scale, you could use your dismissal against almost everything. Every part of society (and businesses are part of society) can think ‘that thing I do means literally nothing when so much else is going on!’ about almost anything.
After all, he probably won't live long enough to tell his grandkids stories about power-hungry hardware.
That reminds me, my homelab could use a SPARC box just because.
NetBSD is great for retrocomputing, since it's a modern OS that can run on very limited hardware. It's also a very nice traditional UNIX. It's well documented, has a nice codebase, and is a pleasure to use. But for saving e-waste, Linux has it beat.
I hope you understand how unique netbsd is, it is one of the only systems which can be compiled so easily with just a single script even from linux or other systems and its rump kernel etc. drivers from what I know are (modular?) so they could be used with other kernels as well if any kernel wants ie.
You never know where the innovation can be, I feel like that each kernel/operating system can bring a new idea, as an example, templeOS uses Holy C which basically is Just in time C (iirc) and that means that you can just edit files of templeOS and restart and those changes would occur
I know TempleOS is niche and a meme OS but I feel like that there are a lot of ideas and unique operating systems and I have heard that netbsd can be good in giving driver support to.
This is just one of many things, and I feel like the main point of NetBSD and the likes are fundamental hackability, they can run on things like routers as well although most run openbsd/freebsd but still. I don't see a reason not to unless you are speaking monetary (ie. it may take some extra funds developing/hosting but that is chump change) but I feel like NETBSD is a novel project with respectable goals and they aren't going to change just for this.
More Options are a good thing. if I can have a project run on Netbsd, then its very easy to port it over to any other vast array of hardware as well, and that hardware includes extremely embedded hardware as well I guess
So in my other comment I mentioned some specific(s) to (or rather, originated from) NetBSD, just as much as for example pledge() (fine-grained system call restriction), unveil() (filesystem visibility restriction), arc4random family[1] (ChaCha20-based CSPRNG), reallocarray() (integer overflow-safe realloc), OpenBGPD (BGP daemon), OpenOSPFD (OSPF daemon), httpd (web server), acme-client (Let's Encrypt client), signify (cryptographic signing tool), etc. are specific to OpenBSD.
DragonflyBSD has some goodies too while we are at it! For example varsym (Variable Symbol System - per-process environment-like variable substitution), nlookup (namecache-based path lookup replacing the vnode-based namei()), objcache (per-CPU object caching allocator), LWKT (Light Weight Kernel Threads - message-passing based threading), HAMMER2 (clustered COW filesystem with multi-master replication, successor to HAMMER), and so forth.
All popular BSDs have their own rich history. I know more about DragonflyBSD than NetBSD, so as an example: DragonflyBSD's core design philosophy centers on SMP scalability (cache-coherent token-based synchronization and LWKT message passing, avoiding fine-grained locking), OpenBSD's gist is security, and so forth.
[1] The ChaCha20-based CSPRNG (originally arc4random was RC4-based), which has been ported to other BSDs and some Linux systems.
(Sorry, I was really tempted to elaborate on these unique features and I felt like your comment was the perfect place for it!).
Aren't competing kernels already shipping support for this hardware? Surely the project has to have more selling points than "can be compiled with a single script."
I meant in the sense that since NetBSD supports soooo many devices, it can also help innovation in other kernels if need be as well by being able to take driver support via its rumpkernel as well if need be
And to be honest, I feel like there is this sense of freedom knowing that you can have a system which is portable, if some script can run on my pc on netbsd, chances are if its not too specific, it could run on your pc or even your toaster lol!
https://laughingsquid.com/netbsd-toaster/
Netbsd can run on any device possible and I really appreciate it.
>Surely the project has to have more selling points than "can be compiled with a single script."
Personally I have only heard good things about netbsd but I don't have much expertise in it (sorry), I can recommend you to take a look at smolbsd which looks really cool for uni-kernel purposes as well
https://news.ycombinator.com/item?id=45582758
I feel like that there is a lot more things that can be done with netbsd as well or other open source projects in general as well
That's more of a meme than reality and I wish people would actually look into it before mindlessly repeating the trope. I did, when I wanted to run a new OS on a niche device, and the reality is very different. Nowadays Linux works on a lot more hardware than NetBSD does. Yes, NetBSD nominally supports a few more architectures than Linux (very few, especially that μClinux is now upstreamed), but the driver situation for the rest of the system means that it can't run on most devices from those architecture anyway.
Linus hast this with User Mode Linux (upstream) and Linux Kernel Library (out of tree).
> You never know where the innovation can be, I feel like that each kernel/operating system can bring a new idea, as an example, templeOS uses Holy C which basically is Just in time C (iirc) and that means that you can just edit files of templeOS and restart and those changes would occur
That's a while ago, but Fabrice Bellard did a demo with his tiny c compiler where it would would compile the Linux Kernel at boot time and then boot the compiled Kernel.
> This is just one of many things, and I feel like the main point of NetBSD and the likes are fundamental hackability, they can run on things like routers as well although most run openbsd/freebsd but still.
Most consumer grade routers run Linux out of the box.
> More Options are a good thing. if I can have a project run on Netbsd, then its very easy to port it over to any other vast array of hardware as well, and that hardware includes extremely embedded hardware as well I guess
uCLinux (upstream) doesn't even need a MMU. It can run on a Cortex-M4 with 8mb ram.
That’s interesting. Do you have a link you can share? Or remember any more details?
I’m curious how long it took to fully start
It's literally part of their national security. Open source operating systems are key to cyber security in addition to just plain old functioning of the military as well as the civilian government.
Years ago I had to get a very old document off of a DOS diskette. So I tried:
* On Linux: accessing the diskette would cause a panic or a reboot or massive read failures.
* FreeBSD: panics all the time
* NetBSD: panics. But then I remembered it had rump. So I said, why not try that. Started up rump, got a few code dumps, but after a some tries I got a bit over 90% of the document off of the diskette. The main system had no issues with the rump kernel crashing.
So that alone is worth the "price of admission" :)
NetBSD has been a labor of love for a long, long time.
In the mid-90's I was a teenager with a 486-25 on a desk in a closet running NetBSD 0.9-1.0, connected to 10base2 going to my dad's office where there was a computer that dual booted to Linux. I learned so much from those systems; systems programming, how to really use the C programming language, sysadmin skills, reading network traces. A whole part of who I am today derives from those early experiences trying to figure out what the $## was going on while tracking -CURRENT.
Here something you might like : CS631 -- Advanced Programming in the UNIX Environment - NetBSD https://stevens.netmeister.org/631/netbsd.html
I'm retired from tech and a high school teacher these days and allowed to teach wack/out of level things.
I would love to teach operating systems with NetBSD, but between the space hardware stuff I do and the Verilog/digital logic/microprocessor architecture class I teach, I soak up all the interested students' elective slots.
But I feel this link illustrates a big problem with NetBSD’s “no hype” approach: I clicked the link you shared and found an email. The email has the donation link at the very end, and it’s not clickable. When I go to the donation page, there is a ton of text before I even get to see an ugly PayPal tiny button or a tiny form to donate via Stripe.
It’s too hard to notice and too hard to do. The project’s homepage does a better job though. But I think it should be made even more prominent if this is critical for the project’s health!