NetBSD Planet


February 11, 2025

UnitedBSD How do I build my own NetBSD installer?

And by installer, I mean the file called "netbsd" on the install ISO for MacPPC?

I have a problem with the default installer and I need to set some kernel flags for "wd".

I compiled my own version of GENERIC_MD with this flag set.

But when I try to boot off my file, I get an error about "no file system for md0"

Not sure what to do here 🙂


February 10, 2025

OS News Oasis: a small, statically-linked Linux system

You might think the world of Linux distributions is a rather boring, settled affair, but there’s actually a ton of interesting experimentation going on in the Linux world. From things like NixOS with its unique packaging framework, to the various immutable distributions out there like the Fedora Atomic editions, there’s enough uniqueness to go around to find a lid for every pot. Oasis Linux surely falls into this category. One of its main unique characteristics is that it’s entirely statically linked.

All software in the base system is linked statically, including the display server (velox) and web browser (netsurf). Compared to dynamic linking, this is a simpler mechanism which eliminates problems with upgrading libraries, and results in completely self-contained binaries that can easily be copied to other systems.

↫ Oasis GitHub page

That’s not all it has to offer, though. It also offers fast and 100% reproducible builds, it’s mostly ISO C conformant, and it has minimal bootstrap dependencies – all you need is a “POSIX system with git, lua, curl, a sha256 utility, standard compression utilities, and an x86_64-linux-musl cross compiler”. The ISO C-comformance is a crucial part of one of Oasis’ goals: to be buildable with cproc, a small, very strict C11 compiler. It has no package manager, but any software outside of Oasis itself can be installed and managed with pkgsrc or Nix.

Another important goal of the project is to be extremely easy to understand, and its /etc directory is honestly a sight to behold, and as the project proudly claims, the most complex file in there is rc.init at a mere 16 lines. The configuration files are indeed incredibly easy to understand, which is a breath of fresh air compared to the archaic stuff in commercial UNIX or the complex stuff in modern Linux distributions that I normally deal with.

I’m not sure is Oasis would make for a good, usable day-to-day operating system, but I definitely like what they’re putting down.

Ruben Schade Boring tech is mature, not old

I’ve talked before about how I think NetBSD is “boring”, and that it’s among the highest forms of praise I can give tech as a sysadmin and architect. But I’ve never elaborated why that is.

The opposite of being bored is to be surprised, and that’s not something a sysadmin desires when building, maintaining, scaling, troubleshooting, upgrading, or even replacing a complex system… especially when you’re woken up at 03:30 by a monitoring server. That’s also why the phrase work doing what you love and you never work a day again in your life is an empty platitude of nonsense. But I digress.

Boring tech behaves in predictable ways. It’s a well trodden path others have evaluated, optimised, troubleshooted, and understood. Using tech that has been subjected to all those people hours of use means you’re less likely to run into edge cases, unexpected behaviour, or attributes and features that lack documentation or community knowledge. In other words, when something goes wrong, can you turn to someone or something?

Likewise, tech (generally) doesn’t exist in a vacuum. It interacts with other components and systems, some of which are even conveniently under our control, sometimes. Multiply out the potential for surprises by the number of components and their relative maturity, and your head can start to spin.

This isn’t to say there isn’t room for innovation, or that staying put is a guaranteed recipe for success. What it does teach is that it pays to make informed decisions, and that often times the understood, reliable, boring tech will get you there over something new, shiny or propped up with marketing spin. The number of people I’ve talked with who’ve replaced complicated K8s clusters with a few VMs and seen massive improvements in reliability, cost, and uptime would make some people at the Orange Peanut Gallery more than a little perturbed, for example.

There have been talks about this, perhaps most famously by Dan McKinley. But there’s been some pushback to this idea, which is intriguing. Robert Roskam:

I used to agree with this. Now I don’t think so any more. You should prefer “boring” tech, and boring should be read as has been around for a while and therefore is well understood.

Ubiquity is a bad test for well-understood technology. Age as a test for ubiquity is also bad.

There are a few assumptions here:

I’d conclude by suggesting boring tech isn’t old, but mature. Maturity not just in the software, but its documentation, community, and track record. Age is often used as an analogue for maturity, but it’s not the same thing. Otherwise I’d be more mature than my Zoomer friends, and I very much doubt that to be the case. #BIRDISTHEWORD.

This is why I don’t hesitate to call NetBSD boring, and why I say that’s a compliment.

By Ruben Schade in Sydney, 2025-02-11.

Pullup pkgsrc [pullup-pkgsrc #6944] runtime fix for Radicale2

February 09, 2025

/r/NetBSD How is Apple Silicon support?

Hi guys

I've been looking into switching from Asahi Linux to one of the BSDs for some time and I'm wondering how well supported the M1/M2 chips are supported by NetBSD.

I do see that NetBSD 10.0, released in 2024, has improved Apple M1 support in the release notes, but it's not clear what exactly that means (does WiFi work? does X also work?).

The page I found about this hardware (https://wiki.netbsd.org/ports/evbarm/apple/) is from 2022 but NetBSD 10.0 was released in 2024, so I'm guessing that 2022 page has some outdates info?

submitted by /u/zogrodea
[link] [comments]
/r/NetBSD Chaos Communication Camp 2003
submitted by /u/0xKaishakunin
[link] [comments]
Pullup pkgsrc [pullup-pkgsrc #6943] pullup-request: www/drupal7

February 07, 2025

Pullup pkgsrc [pullup-pkgsrc #6942] [[email protected]: CVS commit: pkgsrc/www/palemoon]
UnitedBSD Mount UDMA drive as SCSI/ATAPI?

Hello,

I have a Blue and White Macintosh G3 with a Sonnet Tempo PCI IDE controller card attached to a UDMA hard disk.

Currently, the drive mounts in NetBSD 10.1 as a wd UDMA disk.

However, I noted that when I boot into MacOS 8.6, the drive is seen as SCSI.

How might I also mount this drive as SCSI or ATAPI in NetBSD?


February 06, 2025

Pullup 10 [pullup-10 #1050] Fwd: CVS commit: src/sys/arch/xen/xenbus
NetBSD Package System (pkgsrc) on DaemonForums Getting GVFS to work on NetBSD 10.0 w/ XFCE4?
It's alive, autostarted by XFCE4 (or dbus?), but thunar shows nothing when plugging in USB drives. I can normally mount these disks with e.g.
Code:

mount /dev/sd0e /mnt
I've tried to search for the cause with no luck so far. GVFS doesn't seem to log anything and gvfs-* commands or their manpages don't help either. Has anyone idea what is maybe goin' on and how to fix it?
I'll try updating it to 10.1 on next time I have access to it, but I suspect problem is on GVFS side (It barely works in overall, even on Linux)

February 05, 2025

/r/NetBSD Getting "Nightly" instead of firefox

So firefox and nightly are kind of the same thing but what exactly is "Nightly" no matter what version I install (like 132, 128, 115) it always gives me nightly. What is the difference ? (I installed firefox132 via pkgin and for the other versions mentioned I used pkg_add <url>, NetBSD 10.1 amd64).

submitted by /u/defaultlinuxuser
[link] [comments]
/r/NetBSD What generations of graphics card does NetBSD have support for?

Hello, is there any lists of known-good supported graphics cards/chipsets for different versions of NetBSD? I would like to dual boot it with my current desktop for a bit, but I'm unsure about which gpus it has support for? I'm running an RX 7900XT, which I don't believe is supported yet, so I'd like to know roughly what generations it will work with?

I was looking at running version 9.3 for a bit, but iirc 10.x has much wider gpu support, so I'm not 100% on which version I'll go with. The machine will be primarily a dev box but I'd prefer not to rely on llvmpipe if not absolutely necessary.

Thank you! <33

submitted by /u/Spiced_Sage
[link] [comments]
Pullup pkgsrc [pullup-pkgsrc #6941] Fwd: CVS commit: pkgsrc/www
Pullup pkgsrc [pullup-pkgsrc #6940] Fwd: CVS commit: pkgsrc/www
UnitedBSD NetBSD 10.1, Radeon HD 5450 and Tomplay.

No problems with YouTube, but almost constant problems with tomplay, on my home built computer with a radeon hd 5450 graphics card. I don't believe that this is a firefox problem, as tomplay plays nicely, both with computers using netbsd and linux, but with different graphics cards.

Here is the xorg log:
https://pastebin.com/Gin1rT0H

Here is some visual documentation:
Linux:

NetBSD (both using the Calm Window Manager):

Pullup 10 [pullup-10 #1049] Fix a CBQ regression on ILP32

February 04, 2025

Pullup 10 [pullup-10 #1048] macppc ofwboot fix for qemu
Pullup 10 [pullup-10 #1047] add $ENV to etc/skel/dot.cshrc
Pullup 10 [pullup-10 #1046] fix vax live-image target

February 03, 2025

/r/NetBSD DWM Woes

Hello all. Longtime Linux user here, have some experience installing and using OpenBSD. Just installed NetBSD on my Thinkpad X301 and am getting my ass kicked trying to get dwm working. I first tried building from source manually using git, downloaded several packages for header files, and successfully re-routed the config file to look for files in NetBSD-appropriate places. DWM compiled successfully, but when attempting to run it I get the following error:

dwm: Shared object "libX11so.7" not found xinit: connection to X server lost 

The X server then gets terminated, and I'm back in the console.

Now, when I run the find command, that file is right where the program should (in theory) be looking for it per its config.mk file.

So, I think I must have screwed something up in configuring the thing somehow. I go on to remove the binary from /usr/bin, and attempt to reinstall using pkgsrc. It makes smoothly, I tweak the config.h in the source code for my preferred modkey and terminal, recompile, and install.

Unfortunately I get the same error, and am a having a hard time figuring out why. Any help would be greatly appreciated.

Edited to add: CTWM is working without issue.

submitted by /u/1randybutternubs3
[link] [comments]
UnitedBSD Variable Definition PKG_PATH.

I apologize for my ignorance, but why NetBSD project doesn't include in /etc/profile (or another more appropriate configuration file) variable definition PKG_PATH on all supported platforms? Why do we always need to configure this variable manually after installation?
Or is it me who doesn't know how to configure it?


February 02, 2025

UnitedBSD How do you actually run NetBSD in qemu?

I wanted to play around with NetBSD on a linux host. From the first glance, it looked simple: I built an image from sources on github, with build.sh targets from the official documentation:

git clone --depth 1 https://github.com/NetBSD/src.git
cd src
./build.sh -j8 -m amd64 -U tools
./build.sh -j8 -m amd64 -U release iso-image

It works fine, I get a NetBSD-10.99.12-amd64.dvd.iso

And then I ran it with qemu using a script like that

qemu-system-x86_64 \
        -boot once=dc \
        -drive file=$1,media=cdrom \
        -m 1G \
        -enable-kvm \
        -nographic \
        -pidfile vm.pid \
        2>&1 | tee vm.log

It seems like it should work just fine. There are examples of people using similar configs online, including this forum. It does boot, but hangs shortly after with a warning about module failing to load:


SeaBIOS (version 1.16.3-3.fc41)


iPXE (https://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+3EFC9FF0+3EF09FF0 CA00



Booting from DVD/CD...

NetBSD/x86 cd9660 Primary Bootstrap

  \\-__,------,___.
   \\        __,---`  NetBSD/x86 BIOS Boot
    \\       `---,_.  Revision 5.12 (Sat Feb  1 22:23:53 UTC 2025)
     \\-,_____,.---`
      \\
       \\
        \\


     1. Boot normally
     2. Boot single user
     3. Drop to boot prompt

Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 0 seconds.
21796256+796928+1300224 [973908+1421952+1043079]=0x1b48458
WARNING: couldn't open /var/db/entropy-file
Loading /stand/amd64/10.99.12/modules/cd9660/cd9660.kmod
WARNING: 1 module failed to load

<no output after that, VM seems to hang>

Running a basic OS image in qemu is something very basic and surely can't be broken, so I feel like I'm doing something wrong here. Are there any known issues/gotchas with running NetBSD in qemu?


January 31, 2025

OS News The Heirloom Project

Update: there’s a fork called heirloom-ng that is actually still somewhat maintained and contains some more changes and modernisations compared to the old version.

The Heirloom Project provides traditional implementations of standard Unix utilities. In many cases, they have been derived from original Unix material released as Open Source by Caldera and Sun.

Interfaces follow traditional practice; they remain generally compatible with System V, although extensions that have become common use over the course of time are sometimes provided. Most utilities are also included in a variant that aims at POSIX conformance.

On the interior, technologies for the twenty-first century such as the UTF-8 character encoding or OpenType fonts are supported.

↫ The Heirloom Project website

I had never heard of this before, but I like the approach they’re taking. This isn’t just taking System V tools and making them work on a modern UNIX-like system as-is; they’re also improving by them adding support for modern technologies, without actually changing their classic nature and the way old-fashioned users expect them to work. Sadly, the project seems to be dead, as the code hasn’t been altered since 2008. Perhaps someone new is willing to take up this project?

As it currently stands, the tools are available for Linux, Solaris, Open UNIX, HP-UX, AIX, FreeBSD, NetBSD, and OpenBSD, but considering how long the code hasn’t been touched, I wonder if they still run and work on any of those systems today. They also come in various different versions which comply with different variants of the POSIX standard.


January 23, 2025

Emile Heitor Build A MMIO Booting Debian VM Out Of Cloud Images

As you might be aware of, I am working on a minimal BSD/UNIX system called smolBSD. It is based on the NetBSD operating system, and its main target is virtual machines, more specifically microvms. This system is capable of fully booting the OS in less than one second using a specially trimmed kernel along with small, specialized root systems.
I was stunned to learn (but am I wrong?) that this work does not seem to have an equivalent, not even in the Linux world. FreeBSD Firecracker support sure permits to boot a kernel is about the same time my NetBSD hacked kernel does, but there’s no work around s slim and task dedicated root filesystem.


January 21, 2025

Pullup 9 [pullup-9 #1935] Fix PR port-amd64/58982

January 19, 2025

DragonFly BSD Digest Lazy Reading for 2025/01/19

Quirky, just like I want it.

Your unrelated music link of the week: Where to Start With Tempa, The Label That Invented Dubstep.


January 18, 2025

OS News Dillo 3.2.0 released

We’ve got a new Dillo release for you this weekend!

We added SVG support for math formulas and other simple SVG images by patching the nanosvg library. This is specially relevant for Wikipedia math articles.

We also added optional support for WebP images via libwebp. You can use the new option ignore_image_formats to ignore image formats that you may not trust (libwebp had some CVEs recently).

↫ Dillo website

This release also comes with some UI tweaks, like the ability to move the scrollbar to the left, use the scrollbar to go back and forward exactly one page, the ability to define custom link actions in the context menu, and more – including the usual bug fixes, of course. Once the pkgsrc bug on HP-UX I discovered and reported is fixed, Dillo is one of the first slightly more complex packages I intend to try and build on HP-UX 11.11.

Ruben Schade The OpenWrt One, and NameTLAs

The news of this slipped me by last year, but I just saw OpenWrt has their own hardware now, based on the BananaPi:

OpenWrt One is based on the MediaTek Filogic 820 SoC and has WiFi 6, dual-band, 3Ă—3/2Ă—2, 1x 2.5Gbit WAN, 1x 1Gbit LAN, 1GB DDR4 RAM, 256 MiB NAND, 16 MiB NOR (for recovery), M.2 SSD, USB-C Serial console and USB 2.0.

You can buy the bare board, or a BananaPi-style industrial blue case.

Top-down view of the OpenWrt One, showing its blue PCB.

As mentioned in the tech specs, it even has an M.2 slot, and MikroTik MikroBUS. At least one of these places it ahead of the best Raspberry Pi, as does its external antenna support.

I’ve been after a small box I can configure and pass onto friends and family who aren’t technical, and are still running the garbage, insecure routers their service providers gave them in 2012. This might be it? I might to get one to try.

As an aside, I still mistype OpenWrt as OpenWRT. I spend too much time running FreeBSD, NetBSD, and OpenZFS, evidently. Hey, I could start calling this blog RubenERD!

That reminds me, I’d also love to see if I could get a small box running FreeBSD or NetBSD for a wireless access point and router. I know ipf(8) and FreeBSD’s flavour of pf(8) more than anything else, and just enough FreeBSD ipfw(8) to be dangerous.

By Ruben Schade in Sydney, 2025-01-18.

OS News Hands-on graphics without X11 using NetBSD’s wscons

Now, if you have been following the development of EndBASIC, this is not surprising. The defining characteristic of the EndBASIC console is that it’s hybrid as the video shows. What’s newsworthy, however, is that the EndBASIC console can now run directly on a framebuffer exposed by the kernel. No X11 nor Wayland in the picture (pun intended).

But how? The answer lies in NetBSD’s flexible wscons framework, and this article dives into what it takes to render graphics on a standard Unix system. I’ve found this exercise exciting because, in the old days, graphics were trivial (mode 13h, anyone?) and, for many years now, computers use framebuffer-backed textual consoles. The kernel is obviously rendering “graphics” by drawing individual letters; so why can’t you, a user of the system, do so too?

↫ Julio Merino

This opens up a lot of interesting use cases and fun hacks for developers to implement in their CLI applications. All the code in the article is – as usual – way over my head, but will be trivial for quite a few of you.

The mentioned EndBASIC project, created by the author, Julio Merino, is fascinating too:

EndBASIC is an interpreter for a BASIC-like language and is inspired by Amstrad’s Locomotive BASIC 1.1 and Microsoft’s QuickBASIC 4.5. Like the former, EndBASIC intends to provide an interactive environment that seamlessly merges coding with immediate visual feedback. Like the latter, EndBASIC offers higher-level programming constructs and strong typing.

EndBASIC’s primary goal is to offer a simplified and restricted DOS-like environment to learn the foundations of programming and computing, and focuses on features that quickly reward the learner. These include a built-in text editor, commands to manipulate the screen, commands to interact with shared files, and even commands to interact with the hardware of a Raspberry Pi.

↫ EndBASIC website

Being able to run this on a machine without having to load either X or Wayland is a huge boon, and makes it accessible fast on quite a lot of hardware on which a full X or Wayland setup would be cumbersome or slow.


January 17, 2025

Julio Merino Hands-on graphics without X11
If you have been following the development of EndBASIC, you know its console can display both text and graphics at once. What you may not know is that, now, it can also achieve this feat on the NetBSD console without using X11 at all. This is done by directly rendering to the wsdisplay framebuffer, and this article presents a crash course on direct graphics and keyboard access via NetBSD’s wscons framework.

January 15, 2025

Ruben Schade The Great Sydney Storm of 2025

Clara and I had the brilliant idea of checking out a new Japanese restaurant two suburbs over last night for dinner. It was a bit of a walk, but absolutely worth it. Teriyaki salad with sesame sauce, and a small bowl of miso… wow. The way to my heart is hugs, Arabica, and simple but tasty Asian food.

We’re into year two of our 10,000 steps a day challenge (!!!), so naturally we decided to walk home instead of catching the train. There was a light drizzle, but we were in high spirits having recharged our Japanese batteries again. It was cool but not cold, the tree-lined roads were quiet, and we could hear all those wonderful Australian birds. There’s nothing else like it in the world.

Then it started. Lightning in the distance so bright it lit up the night. It was continuous and unrelenting, as though it was striking the Earth every other second. The wind hit soon after; a gust so strong it nearly knocked us over, and made mincemeat of our golf umbrella. And then… the rain.

We were near a small office building, so we rushed into its undercover car park for shelter. We looked back and saw the street lights illuminating the near horizontal lashings of water; a continuous steam that was only growing in intensity. Trees and poles were swaying to an extent I didn’t think possible. The faint sounds of sirens, the tinkling of glass, and the flickering of lights. Fun.

Screengrab from Clara’s phone showing the rain smashing down under the light from a street lamp.

Singapore had some violent storms, but the strongest I ever experienced was while travelling with Clara in Hong Kong a few years ago. We were in transit to Kansai, but decided to spent a few days there. It was the monsoon season, and I don’t think I’ve ever been that drenched in public outside a pool before. Umbrellas are useless against that violent, swirling wind and rain. I still remember making it back to the hotel absolutely soaked through, and having to go buy waterproof shoes the following day!

Back in the present, we agreed this was almost as violent. We kept peeking back outside the relative safety of the undercover car park, hoping the water and wind would eventually subside, and we could go home. Unfortunately, it was not to be. Half an hour passed, and we agreed we had no choice.

We left the comforting refuge of the empty, quiet car park and sprinted out as carefully as we could to the intersection across from our home. It took less than ten seconds for our clothes to be saturated, which immediately became bone-chillingly cold with the howling wind! The rain drops hitting my face actually hurt, as though we were being shot at. I could barely hear what Clara was saying.

It felt like we were standing there, totally exposed to the elements at that fscking intersection for an age, but eventually the light gave us permission to cross. We sauntered across in our sopping clothes, and made our way across the pavement and up the stairs to our building. There’s certainly a sense of freedom about splashing into puddles and not caring about your shoes, because they’re already so waterlogged they’re more rain than foot.

We threw all our clothes off into the spare bathroom and cranked up the dehumidifier! To my surprise, I saw small nicks in my face right where the water had hit. Validation! But also, ow? How is that possible?

I unmounted my FreeBSD ZFS pools and NetBSD cgd stores, then turned off and unplugged our computers and Hi-Fi gear. I’d lived through enough electrical storms back home that I didn’t want to risk it. Alas, I’d also wired the floor lamps into the same board as the PlayStations which was now disconnected, so we didn’t have much light. Oh well, it definitely added to the mood. Alas, our poor little pot plant outside was knocked off his perch, though fortunately he was still in one piece.

Phew. If that Hong Kong monsoon was the most violent storm I’d ever been in, this came in second. Wowza.

By Ruben Schade in Sydney, 2025-01-16.


January 11, 2025

Ruben Schade Which shell do I use on FreeBSD?

This has come up a few times, but Steven G. Harms was the latest to ask. Not that I need an excuse to write about BSD, mind!

I ran tcsh(1) from base as my shell for most of my time as a handsome—or not—FreeBSD user. I prefer the C-style syntax for dotfile configuration and scripting, even if its use was “widely considered harmful”. I just found it more natural to read and write, though I’ve also said that about Perl, so take that how you will.

I’m also a firm believer in getting good at the defaults. Until recently, tcsh(1) was the default shell for root, meaning you were guaranteed to be dropped to it if you were tasked with logging into a FreeBSD machine somewhere. That is, unless someone changed the shell, hopefully to something else from base lest the ports system break! Ask me how a younger and more reckless Ruben learned that the hard way.

I’m glad I spent the time learning the muscle memory for basic loops and other structures in tcsh(1), just as I took the time to learn nvi back in the day. It sucks being in a situation where you have to fix something, and are stymied by an unfamiliar environment or set of tools you can’t easily use. This is also why I’m a fan of rational, reasonable defaults, but that’s a post for another time.

Today, I use two different shells depending on context. I use plain sh(1) for servers and remote machines that I won’t otherwise be regularly interacting with because, again, it’s now the default. Scripts written against this are also easier to be made portable, so I can run them on NetBSD, illumos, or Linux. If I do need to something more complicated, I still have tcsh(1) to fall back on (though I find myself reaching for it less and less now, which is bittersweet).

(Thanks to dear Internet friend Tim Chase—gah not Jim!—for pointing out that I meant “remote” there, not “remove”! Me, make a spelling mistake on my blog? That’s unpossible).

For regular interactive use on desktops and laptops on FreeBSD, NetBSD, and even Penguins though, I use the Portable OpenBSD Korn Shell, or oksh(1). This is the variant of ksh(1) on OpenBSD, and its default shell. It’s fast, well documented, implements the subset of interactive features I actually use, and is easily customised with dotfiles using years of ksh(1) examples. It’s another tool alongside OpenSSH, LibreSSL, and doas(1) from OpenBSD I benefit from, even though I don’t run the OS. I hope to add their permissive-licenced Game of Trees and openrsync(1) to that list at some point too.

Nothing too exotic I suppose, but it works great for me :).

By Ruben Schade in Sydney, 2025-01-12.


January 10, 2025

Julio Merino Self-documenting Makefiles

Make, as arcane as a build tool can be, may still be a good first fit for certain scenarios. “Heresy!”, you say, as you hear a so-called “Bazel expert” utter these words.

The specific problem I’m facing is that I need to glue together the NetBSD build system, a quilt patch set, EndBASIC’s Cargo-based Rust build, and a couple of QEMU invocations to produce a Frankenstein disk image for a Raspberry Pi. And the thing is: Make allows doing this sort of stitching with relative ease. Sure, Make is not the best option because the overall build performance is “meh” and because incremental builds are almost-impossible to get right… but adopting Bazel for this project would be an almost-infinite time sink.

Anyway. When using Make in this manner, you often end up with what’s essentially a “command dispatcher” and, over time, the number of commands grows and it’s hard to make sense of which one to use for what. Sure, you can write a README.md with instructions, but I guarantee you that the text will get out of sync faster than you can read this article. There is a better way, though.


January 07, 2025

Ruben Schade Cay Horstmann configures HiDPI on Linux

Almost exactly two years ago—huh!—Cay Horstman configured his Linux machine for 2× HiDPI, including some tweaks I was unaware of. He also summarised why you’d want to do this:

At first I didn’t care because my external monitor didn’t change, and just set the resolution to 1920x1200. But when I traveled over Christmas, I got curious. Would it be nicer at full resolution?

Yes, it was. The fonts were amazingly crisp.

This! But that won’t stop people saying they either don’t need 2× HiDPI, can’t tell the difference, or think fractional scaling is fine. I guess some people like spinters; it makes them feel alive.

He also mentions swisswatch(1), which I had long forgotten about. It’s in pkgsrc!

By Ruben Schade in Sydney, 2025-01-08.

Pullup 9 [pullup-9 #1934] PR58837 ffs: Missing locking around fs_fmod/time

January 03, 2025

NetBSD Blog Google Summer of Code 2024 Reports: Test root device and root file system selection

This report was written by Diviyam Pat as part of Google Summer of Code 2024.

This summer I worked on NetBSD's kernel test framework to cover root device discovery and root file system selection. This area of the kernel is not very well documented and program flow has to be determined by reading the code.

I would also like to tell you about my early interactions with the project, let me start with project findings.

Why NetBSD?

Google Summer of Code 2024 is not my first time applying to GSoC. My first time was in 2022, in my first year of college. I have been fascinated with newer Windows versions since my Intel Core Duo i3 days as every new Windows version used to bring new changes and features, from Windows XP to Vista to 8.1 and then to 10 (cosmetic only) but was very heavy on my PC's memory usage that was upwards of 60% leaving very little room for applications and games.

My Intel i3 would be enough for it. This experience made me decide I wanted my project to be in the operating system space. I ventured into all OS projects on the Google Summer of Code website. Gentoo, Debian but that didn't turn out well. I then decided to explore BSDs. The community seemed friendlier, more responsive, and active in helping beginners. I started mailing all the mentors about my interests (I realized I should have done a lot more work before mailing them, it shows more dedication towards the project.)

Christoph explained the project in great detail to me, helped me with getting started and guided me through the hard parts of the project.

Project Details

Root device and file-system selection is made during the later stages of the boot process by the kernel. The kernel config file defines candidates for the root device and the kernel selects one after validating those options. If no options are defined, the auto config subroutines handle configuration. Head over to my docs for more details here. This functionality is handled primarily by the function setroot in file kern_subr.c. It also calls specialized functions for a number of cases. Our task was to add ATF tests for this function and some other functions that assist setroot. This part of the kernel works, and it has worked for over 30 years but the code is rather complex to read and there is no documentation. The only way to understand it is to read the code.

At any given stage when any condition fails the fallback option is to ask the user manually for the device. Thus this part of the kernel rarely needs attention. There are some global functions used in conditions inside setroot: rootspec, bootspec, etc. These variables are either set through the config file or through other machine-dependent kernel functions like findroot etc. We need to manually set them in our test cases and also need to stub kernel functions used by setroot and other functions. We wanted to make these test cases use 'vnd' devices, but we ran into bugs, and Christoph was trying to fix them. Therefore we had to resort to stubbing. We validate the global variables. We also test the tftproot_dhcpboot function that loads the contents of a memory disk device from a TFTP server and uses that as root device. Devices are represented by the device_t struct which is populated by the kernel. We mock this behavior through the create_device function and use this in the test programs. User input is handled by stubbing the cngetsn function. Global variables and arguments are set to test values in the body of the test cases and the function being tested is called. The test file is divided into 3 parts: 1) setroot_root, 2) setroot_ask, and 3) tftproot_dhcp. In the file kern_subr.c setroot() calls these functions but here we test them independently

Conclusion

I have worked on enhancing NetBSD's ATF tests to test the root device and file system selection process, testing the setroot function and its dependencies. These tests shall improve coverage of the ATF tests to the setroot function and in general, to root device selection. In the future, contributors can rely on these tests for kern_subr.c's functionality.


January 02, 2025

OS News Running NetBSD on an IBM ThinkPad 380Z

Launched in 1998, the 380Z was one very fine ThinkPad. It was the last ThinkPad to come in the classic bulky and rectangular form factor. It was also one of the first to feature a huge 13.3″ TFT display, powerful 233MHz Pentium II, and whopping 160 megs of RAM.

I recently stumbled upon one in perfect condition on eBay, and immediately thought it’d be a cool vintage gadget to put on the desk. I only wondered if I could still use it for some slow-paced, distraction-free coding, using reasonably modern software.

↫ Luke’s web space

You know where this is going, right?

I evaluated a bunch of contemporary operating systems, including different variants of BSD and Linux. Usually, the experience was underwhelming in terms of performance, hardware support and stability. Well… except for NetBSD, which gave me such perfectly smooth ride, that I thought it was worth sharing.

↫ Luke’s web space

Yeah, of course it was going to be NetBSD (again). This old laptop, too, can run X11 just fine, with the EMWM that we discussed quite recently – in fact, bringing up X required no configuration, and a simple startx was all it needed out of the box. For web browsing, Dillo works just great, and building it took only about 20 minutes. It can even play some low-fi music streams from the internet, only stuttering when doing other processor-intensive tasks. In other words, this little machine with NetBSD turns out to be a great machine for some distraction-free programming.

Look, nobody is arguing that a machine like this is all you need. However, it can perform certain specific, basic tasks – anything being better than sending it to a toxic landfill, with all the transportation waste and child labour that entails. If you have old laptops lying around, you should think twice about just sending them to “recycling” (which is Western world speak for “send to toxic landfill manned by children in poor countries”), since it might be quite easy to turn it into something useful, still.


January 01, 2025

Pullup 9 [pullup-9 #1933] src/sys/copyright 1.23

December 30, 2024

Stack Overflow How to build Visual Codium on NetBSD?

I am C++ developer and unfamiliar with script technologies like nodejs etc. I tried to build VS Codium on NetBSD 10.0 from sources 1.96.2 on github, by how-to manual. After running build/build.sh it outputs:

...
+++ ../update_settings.sh
300s/'default': true/'default': false/
sed: -E: No such file or directory
219s/'default': TelemetryConfiguration.ON/'default': TelemetryConfiguration.OFF/
sed: -E: No such file or directory
114s/'default': true/'default': false/
sed: -E: No such file or directory
#

When I look into target directory vscode I am seeing there something like result: vscode/cli/src/bin/code/main.rs How to continue with build to reach binary executable "bin/codium" ? What to do with that main.rs ? I read that it has something with rust ? Can anyone put more light on this to understand what to do ? I don't need to create installation package, it should be sufficient to run VSCodium from target build directory.


December 28, 2024

Julio Merino Revisiting the NetBSD build system

I recently picked up an embedded project in which I needed to build a highly customized full system image with minimal boot times. As I explored my options, I came to the conclusion that NetBSD, the often-forgotten BSD variant, was the best viable choice for my project.

One reason for this choice is NetBSD’s build system. Once you look and get past the fact that it feels frozen in time since 2002, you realize it is still one of the most advanced build systems you can find for an OS. And it shows: the NetBSD build system allows you to build the full OS from scratch, on pretty much any host POSIX platform, while targeting any hardware architecture supported by NetBSD. All without root privileges.

Another reason for this choice is that NetBSD was my daily workhorse for many years and I’m quite familiar with its internals, which is useful knowledge to quickly achieve the goals I have in mind. In fact, I was a NetBSD Developer with capital D: I had commit access to the project from about 2002 through 2012 or so, and I have just revived my account in service of this project. jmmv@ is back!

So, strap onto your seats and let’s see how today’s NetBSD build system looks like and what makes it special. I’ll add my own critique at the end, because it ain’t perfect, but overall it continues to deliver on its design goals set in the late 1990s.


December 26, 2024

NetBSD Package System (pkgsrc) on DaemonForums Problem to start automatically Xfce4
Hello,

I installed NetBSD 10.0 with X-Windows. I setup automatic start of X-Windows (GUI login prompt appears). All was functional.
Later I installer xfce4 and I setup starting dbus automatically.
Problem is that only way which I found how to start XFCE4 is:
loggin into another virtual console like root, then kill process /usr/X11R7/bin/xdm,
then login to another virtual console like non-root user and issue: startxfce4.
Started Xfce4 runs without problems but I'd like to resolve automatic starting XFCE4 after successful login through X-Windows GUI login dialog.

I tried to exchange /etc/X11/xinit/xinitrc line:
Code:

exec /usr/X11R7/bin/ctwm -W
for
Code:

exec xfce4-session
or
Code:

exec ck-launch-session xfce4-session
and also the same line in /etc/X11/xdm/Xsession

also tried exchange whole /etc/X11/xinit/xinitrc for /usr/pkg/share/examples/xfce4/xinitrc
then
creating ~/.xinitrc and ~/.xsession containing:
Code:

startxfce4
and researched xdm process tree - to understand how is all this stuff functioning.
Mostly after my experiments when logged into X-Windows login this dialog appears again and again in loop.
no success to start XFCE4 automatically.

What should I try ?
Pullup 9 [pullup-9 #1932] /bin/sh core dump fix

December 20, 2024

Pullup 9 [pullup-9 #1931] Please pullup autobuild cvs migration helper

December 19, 2024

NetBSD Blog NetBSD 10.1 available!

The NetBSD project is pleased to announce the first update of the NetBSD 10 release branch NetBSD 10.1! See the release announcement for details.

This release includes 9 months of bug fixes and a few new features after the 10.0 release in March. It also gives those still using older release a good reason to finally update to the NetBSD 10 release branch, even if they avoid dot-zero releases by all means.

If you want to try NetBSD 10.1 please check the installation notes for your architecture and download the preferred install image from the CDN or if you are using an ARM based device from the netbsd-10 builds from the bootable ARM images page.

If you have any issues with installation or run into issues with the system during use, please contact us on one of the mailing lists or file a problem report.


December 18, 2024

NetBSD General on DaemonForums Problem to start OS, fsck
Hello,

I had installed and functional NetBSD 10.0 and suddenly I am not able to start OS.

Code:

Starting root file system check:
fsck: no match for '00000000-0000-0000-0000-000000000000': No such process
automatic file system check failed; help !
ERROR: ABORTING BOOT (sending SIGTERM to parent)

Terminated rc_real_work "${@}" 2>&1 |
Done (1) rc_post_process

My actions from last successful booted NetBSD:
On NetBSD I installed only firefox, nothing more.
I rebooted into Windows, created FAT32 partition there placed it after NetBSD (FFSv2) + swap. Then I booted back to NetBSD.
After it denies to start I rebooted back to Windows and deleted new FAT32 partition, but it does not help resolve problem.

What means this zeroed GUID ? And how is it relating to "No such process" ?
What should I try to resolve it, what man/doc to look at ?
I am afraid to not damage existing partitions with fsck.

December 16, 2024

NetBSD General on DaemonForums how to setup UEFI boot
Hello,
I installed minimal NetBSD installation to GPT disk with several NTFS and FAT partitions. When I installed OS I was seeing name of target partition /dev/dk6.
After installation I used refind boot manager on my EFI partition. I created EFI/NetBSD and put bootx64.efi to it. After reboot refind displayed new item but after selecting it displayed prompt and required to use boot command.
I tried to find what parameter to use after boot command.

I boot again with USB stick used in installation and tried to mount NetBSD partition to check if installed file system is there. But when I mount /dev/dk6 then it mount successfully but ls command shows only one item named "NO".
How to mount it to see installed file system ?
Or what should I try to boot NetBSD from refind ? Is needed any boot.cfg to put there ?
The NetBSD Foundation NetBSD 10.1 released

December 12, 2024

Stack Overflow writing a simple makefile for NetBSD

This is my makefile:

CC = gcc
TARGET = target

CFLAGS = -O3 -Wall -Wextra -pedantic

SRCS = $(shell find . -type f -name '*.c')
OBJS = $(patsubst %.c,%.o,$(SRCS))

.PHONY: all clean

all: $(TARGET)

$(OBJS): $(SRCS)
    $(CC) $(CFLAGS) -c $< -o $@

.PRECIOUS: $(TARGET) $(OBJS)

$(TARGET): $(OBJS)
    $(CC) $(OBJS) -o $@

clean:
    -rm -f *.o
    -rm -f $(TARGET)

this is the output message:

gcc  -o target
gcc: fatal error: no input files
compilation terminated.
*** Error code 1

I'm trying to get this to work on NetBSD. What am I doing wrong? Also, I've found that $(SRCS) is just empty, but if I run find . -type f -name '*.c' in the shell on it's own, I do get the desired files. Please help !


November 04, 2024

Unix Stack Exchange NetBSD "-f" option in find

I can't understand what "-f" option to find command on NetBSD mean.

Manual: https://man.netbsd.org/find.1 says

-f Specifies a file hierarchy for find to traverse. File hierarchies may also be specified as the operands immediately following the options.

Usage:

find [-H | -L | -P] [-dEhsXx] -f file [file ...] [expression]

find [-H | -L | -P] [-dEhsXx] file [file ...] [expression]

I would expect the two following calls to be equivalent:

home# find ./ -name "*c"
./1.c
home# find -f ./ -name "*c"
find: unknown option -- n
find: unknown option -- a
find: unknown option -- m
find: unknown option -- e
./
./1.c
find: *c: No such file or directory

Instead to make second equivalent I have to run

home# find -f ./ -- -name "*c"
./1.c

Am I missing something?


November 03, 2024

NetBSD General on DaemonForums [10.0] "Invalid argument" when setting wscons encoding on particular machines
I've noticed that on particular boxes for some reason I can't set my encoding in wscons. On these, any attempt to set it to anything but us, uk and de fails with
Code:

wsconsctl: WSKBDIO_SETENCODING: Invalid argument
Meanwhile it works on other machines as expected:
Code:

encoding -> pl
They all are amd64 hardware, running the same NetBSD 10.0 from the same installation CD I've burned

So... How does it happen in the first place? Anything I can do?

October 13, 2024

Super User Install Linux on Old AirPort Extreme?

I have a very old AirPort Extreme, the A1408. Is it possible to install Linux on it, using the AirPort functionally as a hard disk, and then boot from that? I have also heard that AirPorts run NetBSD. Can you boot into that and run commands?


October 04, 2024

NetBSD Blog EuroBSDcon 2024 in Dublin, Ireland: some notes after the conference

I have not been at EuroBSDCon for a while, unfortunately! My last EuroBSDCon was EuroBSDcon 2017 in Paris, France (and I have also blogged about it)!

I was very excited to come back to EuroBSDCon. Meet again in person with people. Talk in the "hall track"... and, why not!, have some fun and do some shenanigans in the nights! :)

And... definitely it was very nice, instructive and fun!

I have not fully unpacked the bag but it's time to share some notes!

Friday (20/09): arriving in Dublin

I arrived in Dublin on Friday afternoon. After some sightseeing on foot I got lost in the paintings of the National Gallery of Ireland.

I then spent the rest of the evening and night in Porterhouse Temple Bar. I had a tasty soup and garlic bread and several delicious craft beers!

Saturday (21/09): 1st day of conference talks and social event

My hotel was a 40 minutes walk from University College Dublin (UCD). I arrived a bit early for the registration. I then met some other NetBSD folks that I had missed in person since 2018 and met new ones.

View from O'Reilly Hall, University College Dublin
View from O'Reilly Hall, University College Dublin.

After the Opening Session that welcomed us, the conference started with the opening keynote Evidence based Policy formation in the EU what Evidence are we Presenting to the EU? by Tom Smyth. Tom Smyth shared his experience on evidence based policy formation in the European Union from a point of a relatively small ISP. EU is open to feedback and as a BSD community we can shape and influence policies.

Flipping Bits: Memory Errors in the Machine, Taylor R Campbell

Taylor talked about bit flips, the memory errors in the machine.

Memory errors caught in the act: corruption of a filename in Riastradh's local machine
Memory errors caught in the act: corruption of a filename in Riastradh's local machine.

He started sharing a catch of bit flip in a filename corruption on his local machine in NetBSD src repository. A bit flipped and that resulted from external/gpl3/gdb/dist/gdb/testsuite/gdb.linespec/cpls.cc to e\370ternal/gpl3/gdb/dist/gdb/testsuite/gdb.linespec/cpls.cc (In ASCII lower case x is \170 that is 01111000 in binary, while \370 is 11111000, the most significant bit got flipped!).

He also opened several PRs - due to several experienced kernel panics mostly in ZFS - before he realized that it was bad RAM.

As part of the talk a lot of fundamentals concepts and theory behind Error Detection And Correction (EDAC), causes of memory errors, where memory errors can happen, error severity and error persistence were shared.

Taylor then talked and digged in ACPI Platform Error Interface (APEI) that is the standard interface in ACPI that abstract EDAC device registers.

In NetBSD APEI is supported by the apei(4) driver.

The apei(4) driver also exposes a sysctl interface to APEI EINJ (Error INJection) that permit to also inject errors. Using such interface Riastradh live demoed that and trigger a memory error that was corrected and reported by apei(4)!

Riastradh live demoing a memory error using APEI EINJ via apei(4)
Riastradh live demoing a memory error using APEI EINJ via apei(4).

The talk was great and super-interesting. Memory errors are also pretty common. Taylor also shared a lot of anecdotes and that make his talk even more fun and interesting!

An introduction to GPIO in RPi3B+ and NetBSD, building a wind-speed logger as an application, Dr. Nicola Mingotti

Dr. Nicola Mingotti talk was a great introduction (and more) to Generalized Pin Input Output (GPIO)!

He started really from the start by populating a uSD card and installing and configuring NetBSD on a Raspberry Pi 3 Model B+.

He then introduced GPIO, how the RPi3B+ pin maps to the GPIO number and then we were ready to get our hands on GPIO!

As first exercises he showed how to set a PIN state (on/off) and read a PIN state via gpioctl(8). This can be used respectively to turn a LED on/off and to read the state of a switch.

The second series of exercises looked on how fast gpioctl can be. This is limited for several applications and so Nicola introduced how to write and read pin states in C via ioctl(2). This is much faster and with that we can go from switches to square waves!

To avoid bit-banging and polling respectively gpiopwm(4) and gpioirq(4) can be used. Nicola shared several applications of them, like blinking LED and loopback. (Another possible application, left as an exercise to the reader is the "daemon toggler". The "daemon toggler" starts/stops a daemon (e.g. ntpd(8)) based on the state of a physical switch!)

He then shared a much bigger application a Wind-Speed Logger (AKA WSL). This was used by Nicola in order to evaluate if wind turbines could be installed or not. He also shared how he adjusted an RPi case and built housing for it (the RPi will be outside, needs to cool off so needs some ventilation but at the same time the housing should block rain!)

Nicola showing the sensor used to build the Wind-Speed Logger (WSL)
Nicola showing the sensor used to build the Wind-Speed Logger (WSL).

He concluded the talk on why he used NetBSD.

The talk was really educational. Nicola did a great job in summarizing and providing a lot of references. If you are more interested I suggest to catch up with the video recordings, slides and try to do the exercises in it!

"Hall track" and preparing for the social event

After Nicola's talk I have spent some time in the "hall track" talking with other people and missed a couple of talks (recording should be available so I will hopefully catch up!).

I have then attended Stefano Marinelli's talk Why (and how) we're migrating many of our servers from Linux to the BSDs.

Stefano shared his more than 2 decades old experience with BSD systems and how he made his passion his profession.

He shared his philosophy, experience with clients and why it is important to focus on solving problems.

During the talk he shared also several interesting stories with clients. In one of them to avoid possible bias on BSD systems he migrated client hosts without informing them. A client called alarmed because he noticed a massive performance boost!

His talk was inspiring and you can find more in his I Solve Problems blog post.

After Stefano's talk we gathered to join the social event and took a DART train (Dublin Area Rapid Transit).

Social event: BrewDog Dublin Outpost

The social event was in BrewDog Dublin Outpost.

We were in an area dedicated to EuroBSDCon participants so that we can eat, drink and talk. There was a buffet and we received tickets to grab beers.

Several folks gifted me an handful and I have definitely had a pretty ample beer tasting experience too! :)

I also had a Vegan Spicy Meaty pizza: a pizza with seitan, mushrooms, chilli flakes, fresh red chilli, tomatoes and vegan mozzarella. My italian-pizza-side is usally pretty orthodox and I usually go for a pizza marinara! :) But overall that was actually pretty nice and I really appreciated the topping!

I have staid with a couple of folks until the closure. With Christoph Badura (<bad@>) we walked in the desperate search of grabbing some more food. However, at the end we ended up in The Temple Bar Pub for "only another beer"! We met with some friendly Swedish and Swiss tourists and we started talking about BSD systems at 2:00 AM! The weather was pretty nice (it was always pretty cloudy but there was no rain for the entire conference) and we decided to continue walking back to our hotels. At the end we have walked for a bit less than 9 kilometers from Temple Bar to nearly Booterstown! That was a great walk though and definitely we had no traces of hangovers in the morning! :)

Sunday (22/09): 2nd day of conference talks

I wake up a bit late on Sunday and arrived in UCD at around 12:00 and staid until lunch in the "hall track".

For lunch the vegetarian dish was a vegetarian curry, pretty tasty!

On Sunday we had a longer lunch break also to take a family photo.

EuroBSDCon 2024 family picture by Ollivier Robert
EuroBSDCon 2024 family picture. You can find more EuroBSDCon photographs taken by Ollivier Robert at EuroBSDCon 2024 - Dublin, Ireland album.

After lunch I have attended FreeBSD at 30 Years: Its Secrets to Success by Kirk McKusick. In this talk Kirk looked back at 30 years of FreeBSD history (and also more for BSD years!) and what made its success. He talked about a lot of different topics, including leadership, development, importance of adopting ideas and codes from NetBSD and OpenBSD, communication, documentation and project culture. He also shared several interesting statistics and demographic about FreeBSD.

I have then attended Confidential Computing with OpenBSD by Hans-Jörg Höxer. Hans-Jörg introduced concepts about confidential computing, the threat model that it cover and then digged in AMD Secure Encrypted Virtualization (SEV) and how he is using that in OpenBSD vmm(4).

Then I have attended Building an open native FreeBSD CI system from scratch with lua, C, jails & zfs by Dave Cottlehuber. In this talk Dave shared the design and implementation of a Continuous Integration (CI) system focused on FreeBSD technologies but that can be ported also to other BSDs.

The final talk I have attended was SIMD-enhanced libc string functions: how it's done by Robert Clausecker and Getz Mikalsen. In this talk Robert shared how several libc string functions were reimplemented in other to use SIMD techniques on amd64 and arm64. Getz worked on porting such work on arm64 as part of Google Summer of Code 2024 and he shared his work and challenges in porting that. The talk was interesting and micro-benchmarking showed performance increase by factor of 5 on average!

Then I have joined the Closing Session.

EuroBSDCon 2024 bronze sponsors

There was a wrap up of the conference and some stats about it.

And *drumrolls* the next EuroBSDCon location was announced! EuroBSDCon 2025 will be in Zagreb, Croatia!

EuroBSDCon 2025 will be in Zagreb, Croatia

After the Closing Session with other NetBSD folks we met again for one last dinner. We met with Andy Doran (<ad@>) and we had some junk food and several beers.

Conclusion

I had not traveled a lot in the last years and I have missed several EuroBSDCon-s and I really regret that! EuroBSDCon 2024 was great: very interesting talks, friendly folks and it was some time that I did not had so much fun!

Dublin was also really nice. All the locals were also very friendly. I hope to come back to both Dublin and Ireland to do some much more sightseeing in a more relaxed pace. Enjoy food, beers, drinks and more. Talk with locals.

I would like to thanks a lot to all the EuroBSDCon organizers for the amazing conference!

I also would like to thanks The NetBSD Foundation that funded my EuroBSDCon registration.

If you have never been to EuroBSDCon and you are curious about BSDs... I strongly suggest to attend either as participant or speaker! Folks are super-friendly, there are a lot of interesting tutorials and talks and I'm pretty sure you will have fun too!

And... if you are still reading until here... thank you too! :)


October 03, 2024

NetBSD Blog Google Summer of Code 2024 Reports: ALTQ refactoring and NPF integration

This report was written by Emmanuel Nyarko as part of Google Summer of Code 2024.

Alternate Queuing has been of great need in the high Performance Computing space since the continuous records of unfair disruption in network quality due to the buffer bloat problem. The buffer bloat problem still persists and not completely gone but modern active queue managements have been introduced to improve the performance of networks.

ALTQ was refactored to basically improve maintainability. Duplicates were handled, some compile time errors were fixed and also performance has been improved too.

This improves the quality of developer experience on maintaining the ALTQ codebase.

The Controlled Delay (CoDel) active queue management has also been integrated into the netbsd codebase. This introduces improvements made in the area of quality of service in the netbsd operating system. CoDel was a research led collaborative work by Van Jacobness and Kathleen Nichols which was developed to manage queues under control of the minimum delay experienced by packets in the running buffer window.

As it stands now, ALTQ in NetBSD is integrated in PF packet filter. I am currently working to integrate it in the NPF packet filter. The code in NetBSD is on the constant pursuit to produce clean and maintainable code.

I'll also be working to improve quality of service in NetBSD through quality and collaborative research driven by randomness in results. As a research computer scientist, I will be working to propose new active queue managements for the NetBSD operating system to completely defeat the long lasting buffer bloat problem.

More details of the work can be found in my Google Summer of Code 2024 work submission.


September 30, 2024

Unix Stack Exchange NetBSD 10.0 install on HP EliteBook 8570w fails with breakpoint error during boot

I am trying to install, for the first time, NetBSD-10.0-amd64 on HP EliteBook 8570w. After choosing "Install BSD" option installer goes to the booting mode and gets interrupted with an error:

502c0
Stopped in pid 294.294 (init) at            netbsd:breakpoint+0x5: leave
breakpoint() at netbsd:breakpoint+0x5
vpanic() at netbsd:vpanic+0x183
panic() at netbsd:panic+0x3c
cnopen() at netbsd:cnopen+0x104
cdev_open() at netbsd:cdev_open+0x12a
spec_open() at netbsd:spec_open+0x1e0
VOP_OPEN() at netbsd:VOP_OPEN+0x3e
vn_open() at netbsd:vn_open+0x2ec
do_open() at netbsd:do_open+0xc3
do_sys_openat() at netbsd:do_sys_openat+0x74
sys_open() at netbsd:sys_open+0x24
syscall() at netbsd:syscall+0x1fc
--- syscall (number 5) ---
netbsd:syscall+0x1fc
ds            8
es            2
fs            180
gs            4a80
rdi           0
rsi           ffffffff81d88000
rsi           ffffbe8345a54ad0
rbx           0
rdx           1
rcx           ffffffffffffff
rax           800000000000000
r8            0
r9            0
r10           ffffffff818450e0      x86_mem
r11           fffffffe
r12           ffffffff8139af6f      ostype+0x13aa
r13           ffffbe8345a54b18
r14           104
r15           ffff8046d2cbdbc0
rip           ffffffff80235385      breakpoint+0x5
cs            8
rflags        202
rsp           ffffbe8345a54ad0
ss            10
netbsd:breakpoint +0x5: leave

If I continue the system precedes to reboot.

I'm not familiar with bsd tools so please tell me if I left important information.

Notice

I installed FreeBSD and Arch Linux on the same machine and it worked fine.


September 29, 2024

Unix Stack Exchange How to build OpenSSL from source, without depending on /lib/libcrypto.so

After several sessions with intense Google searching and trying several angles with ChatGPT, I seem to be at a dead-end, my problem arises when I try to build OpenSSL from source, it seems that the build process wants to link with libcrypto.so located in /lib, but the system supplied version of OpenSSL is ancient, so this fails miserably, since OpenSSL now includes functionality not present in my version of libcrypto.so, specifically QUIC, its failing on safe_muldiv_uint64_t. It seems like a catch-22, and I have absolutely no idea how to break out of this.

Some of the suggestions I have found involved building OpenSSL in a chroot jail, but I think it seems a little excessive?

So I guess my question is: How do I build OpenSSL without linking with /lib/libcrypto.so, but linking with the version of libcrypto from the source package?

Output:

${LDCMD:-cc} -pthread -Wa,--noexecstack -O2 -O3 -pipe -I/usr/include -I/usr/pkg/include  -L/usr/local/lib -L/usr/pkg/gcc7/lib/gcc/x86_64--netbsd/7.5.0 -Wl,-R/usr/pkg/gcc7/lib/gcc/x86_64--netbsd/7.5.0 -Wl,-zrelro -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib \
        -o fuzz/quic-srtm-test \
        fuzz/quic-srtm-test-bin-fuzz_rand.o \
        fuzz/quic-srtm-test-bin-quic-srtm.o \
        fuzz/quic-srtm-test-bin-test-corpus.o \
        libssl.a libcrypto.a -pthread
...
apps/libapps.a -lssl -lcrypto -pthread
./libssl.so: undefined reference to safe_muldiv_uint64_t
./libssl.so: undefined reference to safe_mul_uint64_t

-L/usr/lib is specified in the above command executed by the Makefile, and that folder contains libcrypto.o and libssl.o from the system supplied version of OpenSSL,


August 20, 2024

Stack Overflow memcached at 100% cpu with no work requested

This is a new installation for a wordpress site that hasn't launched yet.

The memcached process is always at near 100% of cpu usage:

load averages:  1.93,  1.78,  1.83;               up 3+22:29:29                                                                                      21:49:18
31 processes: 28 sleeping, 3 on CPU
CPU states: 59.1% user,  0.0% nice,  4.0% system,  0.0% interrupt, 36.8% idle
Memory: 2069M Act, 1014M Inact, 44K Wired, 175M Exec, 2447M File, 54M Free
Swap: 512M Total, 512M Free / Pools: 279M Used / Network: 23K In, 1K Out

  PID USERNAME PRI NICE   SIZE   RES STATE       TIME   WCPU    CPU COMMAND
 5770 memcache  25    0    70M 3112K CPU/0      19:11 94.58% 94.58% memcached

And memcached-tool /var/run/memcached/memcached_0.sock stats reports

#/var/run/memcached/memcached_0.sock Field         Value
              accepting_conns             1
                    auth_cmds             0
                  auth_errors             0
                        bytes             0
                   bytes_read            21
                bytes_written          4435
                   cas_badval             0
                     cas_hits             0
                   cas_misses             0
                    cmd_flush             0
                      cmd_get             0
                     cmd_meta             0
                      cmd_set             0
                    cmd_touch             0
                  conn_yields             0
        connection_structures             2
        crawler_items_checked             0
            crawler_reclaimed             0
             curr_connections             1
                   curr_items             0
                    decr_hits             0
                  decr_misses             0
                  delete_hits             0
                delete_misses             0
              direct_reclaims             0
               evicted_active             0
            evicted_unfetched             0
                    evictions             0
            expired_unfetched             0
                  get_expired             0
                  get_flushed             0
                     get_hits             0
                   get_misses             0
                   hash_bytes        524288
            hash_is_expanding             0
             hash_power_level            16
                    incr_hits             0
                  incr_misses             0
                     libevent 2.1.12-stable
               limit_maxbytes      67108864
          listen_disabled_num             0
             log_watcher_sent             0
          log_watcher_skipped             0
                 log_watchers             0
           log_worker_dropped             0
           log_worker_written             0
            lru_bumps_dropped             0
          lru_crawler_running             0
           lru_crawler_starts             6
       lru_maintainer_juggles     103444004
            lrutail_reflocked             0
                 malloc_fails             0
              max_connections          1024
                moves_to_cold             0
                moves_to_warm             0
             moves_within_lru             0
                          pid          5770
                 pointer_size            64
               read_buf_bytes         98304
          read_buf_bytes_free         32768
               read_buf_count             6
                 read_buf_oom             0
                    reclaimed             0
         rejected_connections             0
                 reserved_fds            20
           response_obj_bytes         49152
           response_obj_count             1
             response_obj_oom             0
         round_robin_fallback             0
                rusage_system      1.053032
                  rusage_user   1136.463840
        slab_global_page_pool             0
   slab_reassign_busy_deletes             0
     slab_reassign_busy_items             0
  slab_reassign_chunk_rescues             0
slab_reassign_evictions_nomem             0
 slab_reassign_inline_reclaim             0
        slab_reassign_rescues             0
        slab_reassign_running             0
                  slabs_moved             0
              store_no_memory             0
              store_too_large             0
                      threads             4
                         time    1724186947
   time_in_listen_disabled_us             0
            total_connections             4
                  total_items             0
                   touch_hits             0
                 touch_misses             0
          unexpected_napi_ids             0
                       uptime          1177
                      version        1.6.23

Memcached is configure to start with:

# grep memcach /etc/rc.conf
memcached=YES
memcached_jobs="job0"
memcached_job0_args="-a 660 -s /var/run/memcached/memcached_0.sock -m 64 -c 1024"

What might be wrong?


August 02, 2024

Julio Merino Kyua graduates

After years of inactivity, the Kyua project has graduated as an open source citizen and has a new home under the FreeBSD umbrella!

But uh… wait, what is Kyua and why is this exciting? To resolve confusion and celebrate this milestone, I’d like to revisit what Kyua is, how it came to be, why I stopped working on it for a while, why that was a problem for FreeBSD—and, indirectly, NetBSD—and how Kyua being free software has helped keep it alive.


July 21, 2024

Amitai Schlair What I'm Doing Now

As usual, partway through a couple weeks in Mallorca, we’re just getting the hang of it. After a few days of only the pool, it’s been pool mornings and beach afternoons. Every day, each kid gets more bold in both. I’ve managed to avoid getting sunburnt so far, though it’s getting harder to stay ahead of the situation. For mealtimes it’s kind of fun to be stuck in a tiny kitchen trying to cook my way out; bedtimes, down a sleepable room due to a broken air conditioner, were less so. My carcass got taken over by mosquitoes, who then rented most of it back to me. In a few days I might be ready to buy them out.

Usually here I’d consider taking a nap when the littles do. Definitely tired enough. But a little solo computer time feels more like what I’m needing: Refactoring some code, backing up some photos, updating pkgsrc stuff, writing posts on my website, that sort of thing.

For this summer vacation we’re hopping around more, which happens to simplify our transatlantic travel days. (Traditionally we’d have connecting flights before arriving anywhere.) One flight into Munich, where we stayed in the area for a few days visiting in-laws. From there a quick hop to Mallorca, the meat in our vacation sandwich. From here a quick-ish hop to Hannover for a week back in the little north-central German village where we lived out the first two years of COVID. Then we’ll drive to Frankfurt to see friends before our return flight to New York. Hopping around like this means we get to see more people and places, in exchange for which we get to find out what happens when kids try to sleep in a wider variety of environments and configurations. So far, sokay.

DragonFly BSD Digest Lazy Reading for 2024/07/21

I wanted to clear all the newsletters items I’ve saved, so you are getting links until my inbox no longer paginates.