More NetBSD-current fun at Linveo!
Hello!
- VPS Share
Would anybody be interested in sharing my free Linveo AMD Ryzen 9 9950X NetBSD VPS in Arizona? It's open to friends who want to help me learn.
- Goals
Tonight I decided to (1) try some method of rolling release updates of NetBSD pkgsrc. For example, please see pkg_rolling-replace (mailing list, 2008 introduction), please see also the man page. I could use help figuring out the best method of rolling updates with pkgsrc.
Also, I think it might be fun to (2) see whether I can get 9vx working. I could use help with the code and the compiling on 64 bit NetBSD of the vx32 sandboxing library used by 9vx.
Maybe I could (3) try the X Windows installation from pkgsrc instead of the xsrc version, but I haven't looked into pkgsrc X, very much as yet.
- Procedure
I'm beginning by wiping and reinstalling my NetBSD-current VPS at Linveo. The reinstall is from Linveo vmcontrol, which offers @cmeerw's
NetBSD 10.1 image.
The process is installing NetBSD 10.1, then, with changes appropriate for 10.1, following the simple NetBSD 10 to NetBSD-current steps in Quick Recipe For Self-Compiled NetBSD-current On A Linveo VPS.
linveo# ftp -o - https://cdn.netbsd.org/pub/NetBSD/NetBSD-10.1/amd64/binary/sets/comp.tar.xz | progress -z tar xpf - -C /
linveo# which gcc
/usr/bin/gcc
linveo# cd /usr
linveo# mkdir obj src tools
linveo# mkdir /home
linveo# useradd -m -G wheel tom
linveo# passwd tom
Changing password for tom.
New Password:
Retype New Password:
linveo# chown tom obj src tools
linveo# su tom
linveo#
linveo$ pwd
/usr
linveo$ export CVSROOT="[email protected]:/cvsroot"
linveo$ export CVS_RSH="ssh"
linveo$ cvs checkout -A -P src
linveo$ cd src
linveo$ nohup ./build.sh -j 2 -O ../obj -T ../tools -U distribution && \
> nohup ./build.sh -j 2 -O ../obj -T ../tools -U kernel=GENERIC
I like nohup
because it gives me a full transcript of all the terminal output and because I don't have to stay connected. Back in the old days I used to start a NetBSD-current build and then sleep. I don't remember a build which failed to complete, but there might have been one.
I will post again, later, or maybe tomorrow, about whether this build completes.
I hope everyone gets the servers they want!
Comments
Wow! This VPS is fast! Both builds seem to have completed successfully!
So, sleep now, and install tomorrow.
I hope everyone gets the servers they want!
Here is the new kernel install, followed by a reboot to run the new kernel.
Then, with the new kernel running, we install the new userland and reboot again so that we are running both the new kernel and the new userland.
The new kernel needs to be running before we try to run the new userland because some on the new userland binaries may require features from the new kernel, whereas the new kernel should be capable of running both the old and the new userland binaries.
It seems that this VPS is running self-compiled NetBSD-current!
I hope everyone gets the servers they want!
NetBSD uses pkgsrc to compile and install self-compiled binaries for approximately 28,000 third-party programs which are not part of the NetBSD core. For quick reference, besides the pkgsrc.org site, there also is the pkgsrc section of the NetBSD wiki, a mailing list, and an IRC channel.
Besides the current version of pkgsrc, called HEAD, there are quarterly branch releases.
Remarkably, pkgsrc runs on many other operating systems besides NetBSD!
Besides self-compiling, there are pre-compiled binaries available for SmartOS/Illumos, MacOS, NetBSD-current, and Enterprise Linux.
Here, on our Linveo VPS, is the install via CVS of pkgsrc HEAD, plus downloading of the current package vulnerability list.
I hope everyone gets the servers they want!
Just found two articles from the pkgsrc section of the NetBSD wiki:
and
I have been wanting to see good tutorials on these subjects for a while! Yaaay!
I hope everyone gets the servers they want!
Just finished updating, re-compiling, re-installing, and rebooting NetBSD-current.
Plus I made a new backup.
Next up is pkgsrc.
Still hope to try the pkgsrc rolling release updating and modular xorg. . . . And 9vx.
Thanks again to @linveo for the amazingly fast VPS!
Thanks to @cmeerw for the NetBSD 10.1 boot image from which I started.
I hope everyone gets the servers they want!
While NetBSD was compiling I was messing with the NetBSD evbaarm-aarch64 install ISO on another VPS at netcup.
I didn't succeed in getting the Netcup VPS to fully boot the NetBSD aarch64 ISO. I could see the initial boot messages and 1,2 install from,boot from option. And I could choose option 1. But, as soon as the boot went into graphic mode, netcup's HTML viewer disconnected and did not reconnect when the viewer was restarted.
Just for fun, I decided to try cross compiling an aarch64 Qemu image on the Linveo VPS. I am following the NetBSD Guide Chapter 33 on Cross-compiling.
The first step is building the tool chain, which seems to have succeeded.
The next step is to build the kernel, which also seems to have succeeded.
Next is building the userland, which again seems to have succeeded.
Now it seems like I have the needed image.
Next step is to convert arm64.img.gz to qcow2, upload it, and see if it boots over at netcup. A hint on how to do the conversion is in NetBSD Arm on Oracle Cloud. It's unclear to me exactly how netcup's situation differs from the situation at Oracle. So, I'n not sure if the image will run at netcup. We will see!
Thanks @linveo!
I hope everyone gets the servers they want!
I started by updating and auditing the package vulnerabilities database as explained on the pkgsrc.org home page.
Not very many packages are installed. As mentioned in the above linked NetBSD wiki page (linked again here for convenience), it's possible to get a list of installed packages:
I read, again, the entire pkg_rolling-replace wiki section and also the pkg_rolling-replace man page.
I picked the -rsuv options.
The command I ran and it's result seemed to show that no updates were needed. It's only been a few weeks, and there are only a few packages, so maybe it's unsurprising that the resulting action is "nothing."
The top six lines were added to the nohup.out file with vi and the name of the file was changed to add the description and the date.
What are my mistakes?
Thanks @linveo! 
I hope everyone gets the servers they want!
Here we go with modular xorg.
Initially, I made a backup of the server with the newly recompiled NetBSD-current plus the newly refreshed pkgsrc.
Following the above linked NetBSD wiki instructions, I added
/etc/mk.conf
:Let's try compiling and installing modular xorg.
I'm watching what happens in another terminal with
tail -f nohup.out
. I'm also googling around about modular xorg. I will post again about whether the compile completes, whether the install completes, and about configuration. I'd be grateful for any hints about mistakes I am making. Thanks everyone! Thanks @linveo for the fast, free VPS!I hope everyone gets the servers they want!
Okay, the build broke.
Googling the error
error: cannot convert 'util_qsort_adapter_data*' to 'int (*)(const void*, const void*, void*)'
does produce results. . . .
I hope everyone gets the servers they want!
While the compile was running, I was looking around and trying to understand basic questions about X and NetBSD, such as why are there two versions of X (the main
/usr/xsrc
version and the pkgsrc modular xorg version), the advantages and disadvantages of each version, and why someone might use each of the two versions.I skimmed three helpful blog posts by Nia Alarie:
Default window manager switched to CTWM in NetBSD-current (2020)
Wayland on NetBSD - trials and tribulations (2020
X.Org on NetBSD - the state of things (2024)
I need to look at all this some more. . . .
Thanks @Linveo! 
I hope everyone gets the servers they want!
Found https://pkgsrc.se/[email protected]
Subject: CVS commit: pkgsrc/graphics/MesaLib
From: Thomas Klausner
Date: 2025-03-07 07:56:21
Message id: [email protected]
Log Message:
MesaLib: fix build on NetBSD-current (qsort_r)
Files:
Revision Action file
1.167 modify pkgsrc/graphics/MesaLib/distinfo
1.1 add pkgsrc/graphics/MesaLib/patches/patch-src_util_u__qsort.h
I am wondering if the issue might have been touched on March 07, a few days before I last updated pkgsrc on March 12.
I hope everyone gets the servers they want!
Hmm. Why don't I have that patch?
Why is this stuff dated February 23?
Did I make a mistake picking the -rsuv options with pkg_rolling-replace? No, because this package wasn't installed then, so it didn't receive attention from pkg_rolling replace?
And pkg_rolling-replace doesn't update all the rest of pkgsrc (the uninstalled packages)?
So, after pkg_rolling-replace, one has to update all the rest of pkgsrc? Or, did I misunderstand when I thought that a full pkgsrc update was not required prior to calling pkg_rolling-replace?
Yaaay!? 
I hope everyone gets the servers they want!
Updating all of pkgsrc. Unsure if that's wise, given being in the middle of a make and install. But, I can easily revert to the backup from just prior to today's shenanigans.
Now, return to the build of modular-xorg.
From
tail -f nohup.out
, the build seems like it's cooking along. More soon. . . .Edit to add the great news that the build seems to have completed! This VPS is fast! Thanks @linveo!
Here is the install portion of the nohup.out modular xorg build log:
I hope everyone gets the servers they want!
Lots of new packages! (Compare with before modular xorg was built and installed!)
What happens if I run pkg_rolling-relace now?
I hope everyone gets the servers they want!
So, pkg_rolling-replace finished successfully. Quite a few packages were recompiled and reinstalled.
I also hand installed x11vnc from pkgsrc. Just headed over to /use/pkgsrc/x11vnc/x11vnc, make, and make install.
The pkg_rolling-replace output and the x11vnc compile output will be available for a short time. If anyone wants to see them, please let me know.
Tomorrow, or sometime, I need to:
Just now I was over looking at the LES BSD thread to review a few topics. Wow! I miss @FrankCastle and @Crab! Those guys were so helpful! @cmeerw too, of course!
A few more of you too!
Thanks!
Special thanks to @linveo for the great, free VPS! 
I hope everyone gets the servers they want!
Well, X does seem to work:
I hope everyone gets the servers they want!
I hope everyone gets the servers they want!
Here's the patch:
And here, again is the error:
I hope everyone gets the servers they want!
Today's update and rebuild seemed to work fine! Thanks @linveo!
I hope everyone gets the servers they want!
Kernel build seemed to work okay too:
I still think probably I am making some mistakes, here and there, and it sure would be great if people would kindly point them out, please!
Thanks to @linveo for the super fast VPS!
I hope everyone gets the servers they want!
Installing the new kernel and rebooting:
Reboot to run new kernel:
Install new userland:
Reboot again to run both new kernel and new userland:
Thanks @linveo!
I hope everyone gets the servers they want!
Haha, I enthusiastically ran etcupdate! After that, the server only booted single user, no ssh, and with a read only file system. Luckily I could get in via VNC, change the file system to rw, move the broken /etc aside, and untar my /etc-revert.tgz file. Now the server boots normally, and sshd works, but there might be a few itchy aspects.
Here's a screenshot from just before I untarred the etc-revert. 
Edit to add evidence that I did get back in:
Thanks @linveo!
I hope everyone gets the servers they want!