@cmeerw said: I think a certctl rehash is missing (I need to add that to the image creation). PKG_PATH is already set in /etc/pkg_install.conf for that image
@cmeerw Thanks for introducing me to certctl And /etc/pkg_install.conf
linveo# man certctl
man: Formatting manual page...
CERTCTL(8) System Manager's Manual CERTCTL(8)
NAME
certctl - configure OpenSSL certificate trust anchors
SYNOPSIS
certctl [-nv] [-C config] [-c certsdir] [-u distrustdir] cmd [args...]
certctl [options] list
certctl [options] rehash
certctl [options] trust cert
certctl [options] untrust cert
certctl [options] untrusted
DESCRIPTION
The certctl utility manages certificates used by OpenSSL-based
applications as trust anchors for certificate validation in TLS or other
purposes, for example by ftp(1) in HTTPS. certctl allows configuring the
set of certificates and persistently excluding individual certificates.
[ . . . ]
HISTORY
certctl first appeared in NetBSD 10.0. A utility of the same name
previously appeared in FreeBSD 12.2.
NetBSD 10.0 August 16, 2023 NetBSD 10.0
linveo# cat /etc/openssl/certs.conf
netbsd-certctl 20230816
# $NetBSD: certs.conf,v 1.1.2.2 2023/09/04 17:33:27 martin Exp $
#
# Configuration file for certctl(8) to manage HTTPS root CA
# certificates in /etc/openssl/certs.
#
path /usr/share/certs/mozilla/server
# For manual control over /etc/openssl/certs, e.g. if you want to
# install a separate CA bundle from pkgsrc, uncomment the next line:
#manual
linveo#
Next is to read up on "unset." Sounds like a shell built-in, so that all I need to do is run unset PKG_PATH.
Hmm. Well, maybe I don't have to look too far.
linveo# ps
PID TTY STAT TIME COMMAND
15318 pts/0 O+ 0:00.00 ps
19420 pts/0 Ss 0:00.02 -sh
1315 ttyE0 Is+ 0:00.00 /usr/libexec/getty Pc constty
linveo#
Yeah, I am using the sh shell, which I guess is the default.
linveo# man sh
[ . . . ]
unset [-efvx] name ...
If -v is specified, the specified variables are unset and
unexported. Readonly variables cannot be unset. If -f is
specified, the specified functions are undefined. If -e is given,
the specified variables are unexported, but otherwise unchanged,
alternatively, if -x is given, the exported status of the variable
will be retained, even after it is unset.
If no flags are provided -v is assumed. If -f is given with one
of the other flags, then the named variables will be unset, or
unexported, and functions of the same names will be undefined.
The -e and -x flags both imply -v. If -e is given, the -x flag is
ignored.
The exit status is 0, unless an attempt was made to unset a
readonly variable, in which case the exit status is 1. It is not
an error to unset (or undefine) a variable (or function) that is
not currently set (or defined.)
[ . . . ]
linveo#
Looks like maybe it's enough to unset PKG_PATH and to again remove /usr/pkgsrc/bootstrap/work. But maybe I should ditch PKG_PATH from .profile?
@Not_Oles said: Next up might be to retry bootstrapping pkgsrc!
I don't think you need to do any bootstrapping on NetBSD, just cd to the package you want to build and type make there.
NetBSD already contains the necessary tools for using pkgsrc; on other platforms you need to bootstrap pkgsrc to get the package management tools installed.
The language @cmeerw quoted does not seem to appear in either /use/pkgsrc/bootstrap/README or /use/pkgsrc/bootstrap/README.NetBSD.
So, to clean up, maybe all I need to do is remove /usr/pkgsrc/bootstrap/work.
Next up might be to build something with pkgsrc. Maybe Lynx or notqmail.
Maybe move soon from NetBSD 10 to NetBSD-current. I probably need to add /src in a similar way to how the compiler set was added. Then update with CVS. Then maybe NetBSD-current will rebuild itself from /src. Amazing!
@Not_Oles said: Maybe move soon from NetBSD 10 to NetBSD-current. I probably need to add /src in a similar way to how the compiler set was added. Then update with CVS. Then maybe NetBSD-current will rebuild itself from /src. Amazing!
Unless you really want to rebuild everything from source, you can just use sysupgrade (from pkgsrc) and point it to the latest HEAD build.
@cmeerw said: Unless you really want to rebuild everything from source
Thanks @cmeerw! Not so much that I want to rebuild everything from source. It's mainly that I can rebuild everything from source. And I'm not sure that I can rebuild everything until I actually do rebuild everything.
Once the rebuild completes successfully, it means that anything big or little can be changed. Not that I am capable of making the changes myself, but the NetBSD guys always were extremely friendly and extremely helpful and super fast to respond! I imagine that NetBSD culture still is the same.
certificates are now set up correctly out of the box (thanks @Not_Oles for pointing that out)
use "log" option on the root filesystem
pre-install "modules" and "rescue" packages
set savecore=NO in rc.conf and fetch_pkg_vulnerabilities="YES" in daily.conf
@linveo could you update to the new image please? Hopefully, this should be fairly stable now.
(Note: the image is AMD only - although I could use a patched kernel, I think it's better to stick with official kernels to avoid having the VM break when updating the kernel)
certificates are now set up correctly out of the box (thanks @Not_Oles for pointing that out)
use "log" option on the root filesystem
pre-install "modules" and "rescue" packages
set savecore=NO in rc.conf and fetch_pkg_vulnerabilities="YES" in daily.conf
@linveo could you update to the new image please? Hopefully, this should be fairly stable now.
(Note: the image is AMD only - although I could use a patched kernel, I think it's better to stick with official kernels to avoid having the VM break when updating the kernel)
Thanks @cmeerw! This is great because it permits Linux users everywhere to have easy access to NetBSD. Plus also, NetBSD fans easily can run NetBSD in lots of inexpensive cloud environments, as long as providers like Linveo are kind enough to add the image.
May I please ask which NetBSD install sets are included in your new image?
Would it make sense to provide a NetBSD-current image with all sets included?
To what extent could your new image be used generally on Linux with Qemu? I guess the image would run on any architecture which supports Qemu emulation of AMD64?
@Not_Oles said: May I please ask which NetBSD install sets are included in your new image?
I am installing "base etc kern-GENERIC man modules rescue" now.
@Not_Oles said: Would it make sense to provide a NetBSD-current image with all sets included?
I don't think it would make a lot of sense as the image would be quite large and as NetBSD-current changes daily, the image would need to change very frequently as well. I think it makes a lot more sense to use 10.0 as a starting point and then update to current. sysupgrade is a very nice tool that makes updating to current (and keeping up to date) very easy.
Essentially you would
install sysupgrade (pkg_add sysupgrade)
set RELEASEDIR="https://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/$(uname -m)" in /usr/pkg/etc/sysupgrade.conf
touch set.* files in /etc/mtree for additional package you want to install during the upgrade
sysupgrade auto
@Not_Oles said: To what extent could your new image be used generally on Linux with Qemu? I guess the image would run on any architecture which supports Qemu emulation of AMD64?
The main thing here is how to get network interfaces and SSH keys configured in the VM. VirtFusion seems to do that by making a small CD filesystem available that contains yaml files with the configuration data. I am looking for that filesystem, reading the yaml files and configuring the NetBSD system. I am actually not using the full cloud-init package to do that (as that would pull in way too many dependencies for my taste), but just using a small lua script for that.
On your linveo VM you might see a sd0 drive (although that drive seems to disappear some time after the VM has been set up).
sysupgrade is a very nice tool that makes updating to current (and keeping up to date) very easy.
Essentially you would
install sysupgrade (pkg_add sysupgrade)
set RELEASEDIR="https://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/$(uname -m)" in /usr/pkg/etc/sysupgrade.conf
touch set.* files in /etc/mtree for additional package you want to install during the upgrade
sysupgrade auto
Suppose I try following @cmeerw's kind instructions for running sysupgrade on my presently installed VM -- in other words, not yet the newly updated @cmeerw image which he just mentioned above.
Start by installing sysupgrade:
linveo# date
Fri Oct 4 19:23:32 UTC 2024
linveo# pkg_add sysupgrade
sysupgrade-1.5nb10: copying /usr/pkg/share/examples/sysupgrade/default.conf to /usr/pkg/etc/sysupgrade.conf
linveo#
Next, set RELEASEDIR in /usr/pkg/etc/sysupgrade.conf:
linveo# date
Fri Oct 4 23:55:56 UTC 2024
linveo# cd /usr/pkg/etc
linveo# ls
pkgin sysupgrade.conf
linveo# cat -n sysupgrade.conf
1 # $NetBSD: default.conf,v 1.2 2012/10/11 00:16:46 jmmv Exp $
2
3 # Configuration of automatic system upgrades by sysupgrade(8).
4 #
5 # See sysupgrade.conf(5) for details on the syntax of this file and the
6 # meaning of the configuration variables. Note that not all the supported
7 # configuration variables are listed in this sample configuration file.
8
9 # Path to the release files (local path or remote URL).
10 #RELEASEDIR="ssh://[email protected]/home/sysbuild/release/$(uname -m)"
11 #RELEASEDIR="/home/sysbuild/release/$(uname -m)"
12 #RELEASEDIR="https://cdn.NetBSD.org/pub/NetBSD/NetBSD-9.1/$(uname -m)"
13 # Upgrade to the latest snapshot of the current branch
14 #RELEASEDIR="https://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/$(uname -m)"
15 # Upgrade to the latest snapshot of a stable branch
16 RELEASEDIR="https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/$(uname -m)"
17
18 # Name of the kernel to be installed.
19 KERNEL=AUTO # Guess from /netbsd (requires config(1)).
20
21 # Whitespace-separated list of sets to install.
22 SETS=AUTO # Guess from /etc/mtree/set.* files.
23
24 # Whitespace-separated list of postinstall(8) checks to automatically fix.
25 POSTINSTALL_AUTOFIX="obsolete"
26
27 # Whether to run etcupdate or not as part of an upgrade.
28 #
29 # Running etcupdate is the only interactive step in the upgrade process, so
30 # setting this variable to 'no' effectively makes upgrades unattended. You
31 # can later run etcupdate at a later step by hand.
32 #ETCUPDATE=no
33
34 # Whether to delete the downloaded files after an upgrade or not.
35 #
36 # If you set ETCUPDATE=no, you will most likely want to disable
37 # auto-cleaning as well. The reason for this is that, if you want to later
38 # do "sysupgrade etcupdate" using the same etc.tgz file downloaded during
39 # the upgrade, you will need the same etc.tgz file to be present.
40 #AUTOCLEAN=no
41
42 # Archive file extension of the sets. For now it can be either 'tgz' or
43 # 'tar.xz'.
44 #ARCHIVE_EXTENSION=tar.xz
linveo# ed sysupgrade.conf
1920
16
RELEASEDIR="https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/$(uname -m)"
s/^/# /p
# RELEASEDIR="https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/$(uname -m)"
a
RELEASEDIR="https://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/$(uname -m)"
.
w
2001
16,17p
# RELEASEDIR="https://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/$(uname -m)"
RELEASEDIR="https://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/$(uname -m)"
q
linveo#
Next, "touch set.* files in /etc/mtree" for additional sets.
What I already have in etc/mtree might be missing at least set.misc, set.modules, set.rescue, and set.text. Plus it also is missing the X sets, but I am okay with skipping X for the time being. Maybe I am okay with skipping modules, too.
linveo# cd /etc/mtree
linveo# ls -l
total 4896
-r--r--r-- 1 root wheel 68983 Mar 28 2024 NetBSD.dist
-r--r--r-- 1 root wheel 880419 Mar 28 2024 set.base
-r--r--r-- 1 root wheel 3048246 Mar 28 2024 set.comp
-r--r--r-- 1 root wheel 48302 Mar 28 2024 set.etc
-r--r--r-- 1 root wheel 914350 Mar 28 2024 set.man
-r--r--r-- 1 root wheel 20222 Mar 28 2024 special
linveo#
The touched files do not have any content, unlike all the other files in /etc/mtree.
linveo# date
Sat Oct 5 00:06:52 UTC 2024
linveo# cd /etc/mtree
linveo# ls -l
total 4896
-r--r--r-- 1 root wheel 68983 Mar 28 2024 NetBSD.dist
-r--r--r-- 1 root wheel 880419 Mar 28 2024 set.base
-r--r--r-- 1 root wheel 3048246 Mar 28 2024 set.comp
-r--r--r-- 1 root wheel 48302 Mar 28 2024 set.etc
-r--r--r-- 1 root wheel 914350 Mar 28 2024 set.man
-r--r--r-- 1 root wheel 20222 Mar 28 2024 special
linveo# touch set.misc set.rescue set.text
linveo# ls -l
total 4896
-r--r--r-- 1 root wheel 68983 Mar 28 2024 NetBSD.dist
-r--r--r-- 1 root wheel 880419 Mar 28 2024 set.base
-r--r--r-- 1 root wheel 3048246 Mar 28 2024 set.comp
-r--r--r-- 1 root wheel 48302 Mar 28 2024 set.etc
-r--r--r-- 1 root wheel 914350 Mar 28 2024 set.man
-rw-r--r-- 1 root wheel 0 Oct 5 00:07 set.misc
-rw-r--r-- 1 root wheel 0 Oct 5 00:07 set.rescue
-rw-r--r-- 1 root wheel 0 Oct 5 00:07 set.text
-r--r--r-- 1 root wheel 20222 Mar 28 2024 special
linveo#
Okay, now let's try running sysupgrade auto -- I will post about what happens.
--------
Meanwhile, here are a few interesting snippets from my homework skimming:
linveo# man sysupgrade
man: Formatting manual page...
SYSUPGRADE(8) System Manager's Manual SYSUPGRADE(8)
NAME
sysupgrade - upgrades a NetBSD system to a newer version
SYNOPSIS
common_flags ::= [-c config_name] [-d destdir] [-o variable=value]
DESCRIPTION
sysupgrade is a utility that automates the process of upgrading a
possibly-running NetBSD system to a newer release.
sysupgrade works by first fetching the release sets from a remote site or
from a local directory, then by upgrading the system using such release
sets and finally by taking care of bringing the system configuration up
to date. In other words, sysupgrade does nothing special on its own: it
is just a utility that automates a highly manual process and relies on
other tools within the system to perform its job.
sysupgrade has a subcommand-based interface: every command performs a
single step of the upgrade procedure, and the `auto' command orchestrates
a complete upgrade by invoking the rest of the commands in a specific
order. There are a set of options that apply to all commands (those
stated before the command name), and every particular command may accept
its own options and arguments as shown in the synopsis.
The behavior of sysupgrade is defined by a configuration file that
specifies how to apply an update to the system (see sysupgrade.conf(5)).
For example, the configuration states which distribution sets ought to be
installed, where they need to be downloaded from, and whether the system
configuration files should be upgraded.
[ . . . ]
EXAMPLES AND TROUBLESHOOTING
The most common way of executing sysupgrade is by using the `auto'
command and relying in the default configuration file:
$ sysupgrade auto
[ . . . ]
SEE ALSO
sysbuild(1), sysupgrade.conf(5), etcupdate(8), postinstall(8)
AUTHORS
The sysupgrade utility was developed by Julio Merino <[email protected]>.
[ . . . ]
linveo# man mtree
man: Formatting manual page...
MTREE(8) System Manager's Manual MTREE(8)
NAME
mtree - map a directory hierarchy
SYNOPSIS
mtree [-bCcDdejLlMnPqrStUuWx] [-i | -m] [-E tags] [-F flavor] [-f spec]
[-I tags] [-K keywords] [-k keywords] [-N dbdir] [-O onlyfile]
[-p path] [-R keywords] [-s seed] [-X exclude-file]
DESCRIPTION
The mtree utility compares a file hierarchy against a specification,
creates a specification for a file hierarchy, or modifies a
specification.
[ . . . ]
HISTORY
The mtree utility appeared in 4.3BSD-Reno. [ . . . ]
[ . . . ]
linveo#
linveo# date
Sat Oct 5 01:02:03 UTC 2024
linveo# sh /usr/sbin/postinstall -s /var/cache/sysupgrade/etc.tar.xz -d / fix defaults makedev mtree opensslcertsrehash periodic ptyfsoldnodes rc
Note: Creating temporary directory /tmp/_postinstall.25531.0/etc.tgz
Note: Extracting files from /var/cache/sysupgrade/etc.tar.xz
Source directory: /tmp/_postinstall.25531.0/etc.tgz
(extracted from: /var/cache/sysupgrade/etc.tar.xz)
Target directory: /
defaults fix:
(Checking for pf.boot.conf from /tmp/_postinstall.25531.0/etc.tgz/etc/defaults instead of /tmp/_postinstall.25531.0/etc.tgz/usr.sbin/pf/etc/defaults)
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/defaults/npf.boot.conf to /etc/defaults/npf.boot.conf
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/defaults/rc.conf to /etc/defaults/rc.conf
makedev fix:
(Checking for MAKEDEV from /tmp/_postinstall.25531.0/etc.tgz/dev instead of /tmp/_postinstall.25531.0)
Copied /tmp/_postinstall.25531.0/etc.tgz/dev/MAKEDEV to /dev/MAKEDEV
(Checking for MAKEDEV.local from /tmp/_postinstall.25531.0/etc.tgz/dev instead of /tmp/_postinstall.25531.0/etc.tgz/etc)
mtree fix:
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/mtree/special to /etc/mtree/special
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/mtree/NetBSD.dist to /etc/mtree/NetBSD.dist
opensslcertsrehash fix:
periodic fix:
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/security to /etc/security
ptyfsoldnodes fix:
[1] Bad system call (core dumped) ${HOST_SH} "${MAKEDEV_DIR}/MAKEDEV" -s pty0 2>... |
Done ${AWK} "\
BEGIN { before_re = \".*device=...
Cannot find device major numbers for pty master and slave
rc fix:
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/rc.d/bluetooth to /etc/rc.d/bluetooth
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/rc.d/certctl_init to /etc/rc.d/certctl_init
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/rc.d/ip6addrctl to /etc/rc.d/ip6addrctl
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/rc.d/ipfs to /etc/rc.d/ipfs
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/rc.d/iscsid_volumes to /etc/rc.d/iscsid_volumes
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/rc.d/named to /etc/rc.d/named
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/rc.d/npf to /etc/rc.d/npf
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/rc.d/postfix to /etc/rc.d/postfix
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/rc.d/resize_root to /etc/rc.d/resize_root
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/rc.d/securelevel to /etc/rc.d/securelevel
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/rc.d/sshd to /etc/rc.d/sshd
Copied /tmp/_postinstall.25531.0/etc.tgz/etc/rc.d/sysdb to /etc/rc.d/sysdb
(Checking for blocklistd from /tmp/_postinstall.25531.0/etc.tgz/etc/rc.d instead of /tmp/_postinstall.25531.0/etc.tgz/external/bsd/blocklist/etc/rc.d)
postinstall fixes passed: defaults makedev mtree opensslcertsrehash periodic rc
postinstall fixes failed: ptyfsoldnodes
linveo#
I see another core dump and a post install fix that failed.
linveo# date; reboot
Sat Oct 5 02:54:22 UTC 2024
Connection to xxx.xxx.xxx.xxx closed by remote host.
Connection to xxx.xxx.xxx.xxx closed.
chronos@penguin:~/servers/linveo$ sleep 60
chronos@penguin:~/servers/linveo$ `head -n 1 login`
Last login: Fri Oct 4 23:55:24 2024 from xxx.xxx.xxx.xxx
NetBSD 10.99.12 (GENERIC) #0: Wed Oct 2 21:21:26 UTC 2024
Welcome to NetBSD!
We recommend that you create a non-root account and use su(1) for root access.
linveo# date
Sat Oct 5 02:55:46 UTC 2024
linveo# uname -a
NetBSD linveo.metalvps.com 10.99.12 NetBSD 10.99.12 (GENERIC) #0: Wed Oct 2 21:21:26 UTC 2024 [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC amd64
linveo#
certificates are now set up correctly out of the box (thanks @Not_Oles for pointing that out)
use "log" option on the root filesystem
pre-install "modules" and "rescue" packages
set savecore=NO in rc.conf and fetch_pkg_vulnerabilities="YES" in daily.conf
@linveo could you update to the new image please? Hopefully, this should be fairly stable now.
(Note: the image is AMD only - although I could use a patched kernel, I think it's better to stick with official kernels to avoid having the VM break when updating the kernel)
Thanks for making these updates. This new template is now available. I appreciate all the work you've done to further the usage of NetBSD!
@linveo said: Thanks for making these updates. This new template is now available. I appreciate all the work you've done to further the usage of NetBSD!
It still seems to be rebuilding from the old image (for me on kvmtx12). I can see that you have downloaded the updated image (netbsd-10.0-v3.qcow2).
@linveo said: Thanks for making these updates. This new template is now available. I appreciate all the work you've done to further the usage of NetBSD!
It still seems to be rebuilding from the old image (for me on kvmtx12). I can see that you have downloaded the updated image (netbsd-10.0-v3.qcow2).
I have removed the old template from that node. If you try again it should pull in the latest version. I thought by changing the version number, VF would grab a new version to cache, but I guess not.
@linveo said: Thanks for making these updates. This new template is now available. I appreciate all the work you've done to further the usage of NetBSD!
It still seems to be rebuilding from the old image (for me on kvmtx12). I can see that you have downloaded the updated image (netbsd-10.0-v3.qcow2).
I have removed the old template from that node. If you try again it should pull in the latest version. I thought by changing the version number, VF would grab a new version to cache, but I guess not.
Haha! I didn't get that far. I was thinking of putting the about-to-be-posted content into a file and running something like sed -i 's/^/>! /g' file and then copy/pasting the result. Your suggestion is a lot easier! So, thanks for your kind help!
Next up for me might be reading about how to compile all of NetBSD from source, getting the sources (probably with CVS) and trying the compile. I am thinking of trying with my present install based on @cmeerw's previous image. I think it's been . . . like ~30 years . . . since the last time I tried this!
Comments
I think you can install the compiler by just doing:
Alternatively, you could use
sysinst
to install additional packages (but need to be careful to not let sysinst overwrite any existing configuration)@cmeerw Thanks for introducing me to
certctl
And/etc/pkg_install.conf
Thanks again @cmeerw Thanks to Linveo for the test VPSes!
I hope everyone gets the servers they want!
Showing the output of
progress
at a random momet during the download and extraction:Upon finishing:
Next up might be to retry bootstrapping pkgsrc!
Thanks again @cmeerw! Thanks again Linveo!
I hope everyone gets the servers they want!
So, "unset PKG_PATH" is not the same as "export PKG_PATH=""". Apparently I need to have no PKG_PATH variable at all?
But we said
Next is to read up on "unset." Sounds like a shell built-in, so that all I need to do is run
unset PKG_PATH
.Hmm. Well, maybe I don't have to look too far.
Yeah, I am using the
sh
shell, which I guess is the default.Looks like maybe it's enough to
unset PKG_PATH
and to again remove/usr/pkgsrc/bootstrap/work
. But maybe I should ditch PKG_PATH from.profile
?Wait! That PKG_PATH line already is commented out!
And there seems to be no PKG_PATH variable. . . .
Why did
./bootstrap
throw that error based on PKG_PATH?Now I'm confused! Haha!
More tomorrow, since it's getting late here. . . .
I hope everyone gets the servers they want!
It's even later than "getting late." But, anyway, one more try. And one more error.
So I guess I have to remove pkg_install-20240307. Or maybe remove something of which contains pkg_install-20240307 as a part?
More tomorrow. Thanks BSD! Thanks Linveo!
I hope everyone gets the servers they want!
I don't think you need to do any bootstrapping on NetBSD, just cd to the package you want to build and type
make
there.ROTFL!
I really like that fine guys like @cmeerw catch my many mistakes! That's great!
The language @cmeerw quoted appears in both the NetBSD packages collection documentation at https://www.netbsd.org/docs/software/packages.html and also on the pkgsrc.org home page.
The language @cmeerw quoted does not seem to appear in either
/use/pkgsrc/bootstrap/README
or/use/pkgsrc/bootstrap/README.NetBSD
.So, to clean up, maybe all I need to do is remove
/usr/pkgsrc/bootstrap/work
.Next up might be to build something with pkgsrc. Maybe Lynx or notqmail.
Maybe move soon from NetBSD 10 to NetBSD-current. I probably need to add /src in a similar way to how the compiler set was added. Then update with CVS. Then maybe NetBSD-current will rebuild itself from /src. Amazing!
Thanks *BSD! Thanks NetBSD! Thanks @cmeerw! Thanks Linveo!
I hope everyone gets the servers they want!
Unless you really want to rebuild everything from source, you can just use
sysupgrade
(from pkgsrc) and point it to the latest HEAD build.Thanks @cmeerw! Not so much that I want to rebuild everything from source. It's mainly that I can rebuild everything from source. And I'm not sure that I can rebuild everything until I actually do rebuild everything.
Once the rebuild completes successfully, it means that anything big or little can be changed. Not that I am capable of making the changes myself, but the NetBSD guys always were extremely friendly and extremely helpful and super fast to respond! I imagine that NetBSD culture still is the same.
I hope everyone gets the servers they want!
I have created a new NetBSD 10.0 image with these changes:
savecore=NO
inrc.conf
andfetch_pkg_vulnerabilities="YES"
indaily.conf
@linveo could you update to the new image please? Hopefully, this should be fairly stable now.
(Note: the image is AMD only - although I could use a patched kernel, I think it's better to stick with official kernels to avoid having the VM break when updating the kernel)
Thanks @cmeerw! This is great because it permits Linux users everywhere to have easy access to NetBSD. Plus also, NetBSD fans easily can run NetBSD in lots of inexpensive cloud environments, as long as providers like Linveo are kind enough to add the image.
May I please ask which NetBSD install sets are included in your new image?
Would it make sense to provide a NetBSD-current image with all sets included?
To what extent could your new image be used generally on Linux with Qemu? I guess the image would run on any architecture which supports Qemu emulation of AMD64?
Thanks again! Best wishes!
I hope everyone gets the servers they want!
I am installing "base etc kern-GENERIC man modules rescue" now.
I don't think it would make a lot of sense as the image would be quite large and as NetBSD-current changes daily, the image would need to change very frequently as well. I think it makes a lot more sense to use 10.0 as a starting point and then update to current.
sysupgrade
is a very nice tool that makes updating to current (and keeping up to date) very easy.Essentially you would
sysupgrade
(pkg_add sysupgrade
)RELEASEDIR="https://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/$(uname -m)"
in/usr/pkg/etc/sysupgrade.conf
set.*
files in/etc/mtree
for additional package you want to install during the upgradesysupgrade auto
The main thing here is how to get network interfaces and SSH keys configured in the VM. VirtFusion seems to do that by making a small CD filesystem available that contains yaml files with the configuration data. I am looking for that filesystem, reading the yaml files and configuring the NetBSD system. I am actually not using the full cloud-init package to do that (as that would pull in way too many dependencies for my taste), but just using a small lua script for that.
On your linveo VM you might see a
sd0
drive (although that drive seems to disappear some time after the VM has been set up).Suppose I try following @cmeerw's kind instructions for running sysupgrade on my presently installed VM -- in other words, not yet the newly updated @cmeerw image which he just mentioned above.
sysupgrade
:/usr/pkg/etc/sysupgrade.conf
:What I already have in
etc/mtree
might be missing at least set.misc, set.modules, set.rescue, and set.text. Plus it also is missing the X sets, but I am okay with skipping X for the time being. Maybe I am okay with skipping modules, too.The touched files do not have any content, unlike all the other files in
/etc/mtree
.Okay, now let's try running
sysupgrade auto
-- I will post about what happens.--------
Meanwhile, here are a few interesting snippets from my homework skimming:
I hope everyone gets the servers they want!
Here is the output from running
sysupgrade auto
.Probably I should run the fix given at the end for the failed postinstall checks.
What about the lines that say
"[1] Bad system call (core dumped) /usr/sbin/etcupdate -a -l ${sflags}"
and
"[1] Bad system call (core dumped) ${HOST_SH} "${MAKEDEV_DIR}/MAKEDEV" -s pty0 2>... |"?
I hope everyone gets the servers they want!
Here is what happened when the fix ran:
I see another core dump and a post install fix that failed.
So, what now?
Also, is the system going to be able to reboot?
. . . Haha!
I hope everyone gets the servers they want!
It'd be handy/useful to others if you wrapped those outputs in spoiler tags.
It wisnae me! A big boy done it and ran away.
NVMe2G for life! until death (the end is nigh)
Thanks for asking for spoiler tags! I had been thinking about doing that! It is a lot of output.
I hope everyone gets the servers they want!
@AlwaysSkint You said "wrap."
Thanks!
I hope everyone gets the servers they want!
https://mail-index.netbsd.org/current-users/2024/06/01/msg045326.html
I hope everyone gets the servers they want!
Seems to reboot okay!
I hope everyone gets the servers they want!
Rerunning the command which produced the ptyfsoldnodes failure seems to succeed after the reboot.
I hope everyone gets the servers they want!
Ahh, yes...
Guess upgrading the kernel first, rebooting and then updating userland would have been the safer option
So maybe:
sysupgrade fetch
,sysupgrade kernel
, reboot,sysupgrade auto
In the context of; paste in your content with it all highlighted, then select Spolier.
You've sussed it though.
It wisnae me! A big boy done it and ran away.
NVMe2G for life! until death (the end is nigh)
Thanks for making these updates. This new template is now available. I appreciate all the work you've done to further the usage of NetBSD!
linveo.com | Shared Hosting | KVM VPS | Dedicated Servers
It still seems to be rebuilding from the old image (for me on kvmtx12). I can see that you have downloaded the updated image (netbsd-10.0-v3.qcow2).
I have removed the old template from that node. If you try again it should pull in the latest version. I thought by changing the version number, VF would grab a new version to cache, but I guess not.
linveo.com | Shared Hosting | KVM VPS | Dedicated Servers
Thanks, it did install with the new image now.
Haha! I didn't get that far. I was thinking of putting the about-to-be-posted content into a file and running something like
sed -i 's/^/>! /g' file
and then copy/pasting the result. Your suggestion is a lot easier! So, thanks for your kind help!I hope everyone gets the servers they want!
BTW, did you check IPv6 setup? Had another quick look into FreeBSD land, and I don't think IPv6 was set up for me there.
Next up for me might be reading about how to compile all of NetBSD from source, getting the sources (probably with CVS) and trying the compile. I am thinking of trying with my present install based on @cmeerw's previous image. I think it's been . . . like ~30 years . . . since the last time I tried this!
I hope everyone gets the servers they want!