A guide to the Makronix operating system and the MCDE desktop
Makronix 0.99.10 (Camouflage) -- November 2026
This is the guide to Makronix, a desktop operating system built on NetBSD. It is written for the person who installs the system, uses the MCDE desktop and administers the machine afterwards. It is not a replacement for the manual pages; it tells you which page to read and in which order.
Makronix is opinionated. It decides what NetBSD leaves open: the installer, the desktop, the packages on the medium, and the way a release is made. This guide is opinionated in the same way. It says what the system is, what it does, and where it stops; when a detail belongs to NetBSD, it names the NetBSD text instead of repeating it badly.
The guide follows the shape of The NetBSD Guide: a tour, installation, the desktop, administration, networking and building, with the same assumption that a system is something you understand rather than something you click through. It is not a copy. The Makronix parts are written for this system, and where NetBSD's guide has a chapter for a subsystem Makronix does not change, this guide names the manual pages and the NetBSD text instead of repeating them.
That is a deliberate limit. A guide that repeats every NetBSD chapter would be out of date the moment NetBSD changes it, and it would hide the parts that are actually Makronix's. What is here is the system as it is installed: the decisions, the files, the commands and the reasons. The rest is NetBSD, and NetBSD documents it.
Read What Makronix Is first, then Installing Makronix if the system is new. The chapters about the desktop (MCDE: The Desktop, The Display and X11 and The Information Manager) are for everybody; the administration chapters are reference material. The last part is for the person who builds Makronix from its own sources.
Commands are shown as they are typed. A # at the
beginning means the command runs as root; a $ means it runs
as your own account. File names are in this style, commands
in this style, and values you replace in <this
style>.
The guide does not assume that you have used a Unix system before, but it does assume that you are willing to read. A chapter that says “see the manual page” means it: the page is installed, it is short, and it was written by the people who wrote the program.
The same text is installed five ways, so that it is readable where you are:
as manual pages, starting at makronix-guide(7);
as a PDF,
/usr/share/doc/makronix/makronix-guide.pdf;
as one HTML file,
/usr/share/doc/makronix/makronix-guide.html;
as a page of the Makronix website,
guide.html;
as a book in the MCDE Information Manager (dtinfo(1)).
They are generated from one source, docs/guide/book.xml
in the source tree. There is no second text to keep in step: a change to
a chapter reaches all five forms, or none of them.
Makronix is based on NetBSD, and much of what this guide describes is NetBSD's mechanism, unchanged. When a chapter says “NetBSD”, it means the mechanism Makronix inherited; when it says “Makronix”, it means the part Makronix decides itself. Where a procedure differs between the two, the chapter gives the Makronix way first.
The version this guide describes is Makronix 0.99.10, release name “Camouflage”. A later release can change a path, a menu or a default; the source tree is the last word, and the release notes name what changed.
Makronix's own files — the tools, the configuration, this guide and
the text you are reading — are under the CNCL 1.0, the Could Not Care
Less License. The full text is in Makronix:
the CNCL 1.0 and in the file LICENSE at the top of the
source tree. It is short enough to read in a minute, and this section
explains what it means in plain words. If the two ever disagree, the
text in the appendix is the licence; this section is only an
introduction.
The CNCL is not a carefully balanced legal instrument. It is a statement of intent written as a licence, and its intent is in its name. The preamble says that software is the product of collective human knowledge, that every idea builds on ideas that came before, and that the authors do not believe in artificial boundaries around creativity. It says that creating something does not give the author the moral authority to dictate what others may do with it. Then the licence does what that preamble promises: it gets out of the way.
In plain words, the CNCL says:
Do whatever you want with it. Use it, copy it, modify it, break it, fix it, sell it, give it away, incorporate it into something else, release it under another licence. Use it commercially or personally. The licence names all of that.
You owe the author nothing. No attribution, no royalties, no source disclosure, no reciprocal licensing, no contribution, no permission. You do not have to publish your changes; you do not have to keep them private either. You do not have to ask.
There is no warranty. The software is provided “AS IS”, without warranty of any kind. The authors accept no responsibility for its use, misuse, modification, distribution or consequences. That is the whole disclaimer, and it is meant literally.
The name is not a joke about quality. It is a joke about ownership. The authors could not care less what you do with the work, because they do not believe that making something gives them a claim on what happens next. The licence is permissive in the extreme: it is not a copyleft, it does not ask for a contribution back, and it does not try to keep the work in a particular community. If you improve this guide and sell it, the CNCL is happy. If you print it, translate it, put it on a website or feed it to a machine, the CNCL is happy. If you never look at it again, the CNCL is happy too.
What the CNCL does not cover is just as important. Makronix is built from other people's work, and that work keeps its own licence:
NetBSD is under the BSD licence. The kernel, the userland and the parts of this guide that follow The NetBSD Guide keep the NetBSD copyright and the BSD terms. The CNCL does not replace them, and this guide does not relicense them. Appendix C names the source.
CDE and MCDE are under the GNU Lesser General Public License, version 2 or later. MCDE is a fork of CDE; the fork keeps the licence of the work it came from.
pkgsrc packages keep their own licences, which are as
different as the packages themselves. The package's message and its
LICENSE file say which one applies.
The Hack font is under the MIT licence, and the DocBook DTD is under the OASIS licence. They are tools of the guide, not parts of the Makronix text.
So the rule is simple: if a file carries the CNCL line, the CNCL applies to that file. If it carries another notice, that notice applies. A file can contain both kinds of material, and then both notices apply to their parts. This guide is such a file: the Makronix text is CNCL, the structure and the general NetBSD procedures are credited to The NetBSD Guide, and the appendix keeps the NetBSD notice next to the CNCL text.
Why this licence, and not a longer one? Because Makronix is opinionated about the system, not about the person using it. The project wants to decide how the installer behaves, what the desktop looks like and what a release contains; it does not want to decide what you may do with the result. A licence that requires a lawyer to read would contradict the rest of the project. The CNCL is short because the project's claim is short: here is the work, do what you like, do not blame us.
It also fits the way the system is built. Makronix stands on NetBSD, on CDE, on pkgsrc and on a long history of Unix ideas. The CNCL preamble says that plainly: everything created is built on something that existed before. The licence is an attempt to act like it. It does not claim ownership of the collective intelligence the system is made of; it adds one more layer and lets the next person take it further.
For this guide specifically, the CNCL means you can copy it, put it on a wall, translate it, cut it up, publish a changed version, or sell it without asking. You do not have to credit Makronix for the Makronix text, although the NetBSD-derived parts keep their notice. If you change the guide, you do not have to say what you changed; a reader would still appreciate it. And if the guide is wrong, the authors are not liable: the system is provided as it is, and the guide describes it as well as the authors could.
That last point is not a loophole to hide behind. It is the other half of the same idea: no control, and no promise of control. The guide tries to be accurate, the tests try to prove it, and the source is open so that you can check. But the CNCL does not turn the authors into a support desk, and it does not turn a mistake in this text into a contractual obligation. Read the commands before you run them; keep a backup; the machine is yours.
The guide is written in DocBook XML. One file,
docs/guide/book.xml, includes one file per chapter from
docs/guide/chapters/. A single build script turns that
source into the five forms: the manual pages with pandoc, the HTML with
the site's stylesheet, the PDF by printing the HTML with a headless
browser, and the MCDE information library with MCDE's own
dtdocbook2infolib. The website form is the same text in the
site's window; the system HTML form is one self-contained file with the
logo and the colours in it.
The source and the build are in the source tree, under
docs/guide. The generated forms are installed as part of
the system and are also in the tree, so that a release does not need a
browser, a DocBook toolchain or an MCDE host build to package them.
docs/guide/AGENTS.md describes the build.
The structure, the order of the parts and the general NetBSD procedures come from The NetBSD Guide, Copyright (c) 1998-2026 The NetBSD Foundation, Inc., under the BSD 2-clause licence. The Makronix text, the MCDE chapters and the five output forms are Makronix's. Appendix C has the full attribution.
A guide that promises everything is a guide that lies. This one does not cover the internals of the NetBSD kernel, the details of every filesystem, the configuration of every server, or the history of Unix. It covers the system Makronix installs and the decisions Makronix makes. When a question goes deeper, the manual pages and The NetBSD Guide are the next places to look; Appendix A: Getting Help says how to find them.
The same is true of the desktop: MCDE is a large program, and this guide describes what a person needs to use it, not every resource and every configuration file. The manual pages and the source are there for the rest.
Makronix is a complete operating system for the desktop: a kernel, a userland, a graphical login, a desktop and the programs that make a machine usable, installed together and updated together. It is built on NetBSD, uses NetBSD's conventions and keeps NetBSD's manual pages, so a person who knows NetBSD will find the system familiar. What Makronix decides is everything NetBSD leaves open.
The kernel, the C library, the userland and the build system are
NetBSD's. Makronix tracks NetBSD's source tree directly; there is no
patch layer between the two. The boot loader, /etc/rc.conf,
the package tools and the section 8 manual pages are the ones NetBSD
documents.
The kernel still calls itself “NetBSD” in uname(1), on purpose: pkgsrc,
config.guess and a great deal of third-party software
decide from that name which system they are on. The product name
“Makronix 0.99.10” is what the installer, the login screen, the message
of the day and the release notes call the system.
Four decisions turn NetBSD into Makronix:
The installer. Makronix's sysinst(8) has two ways. The simple way asks
for the disk and whether it is encrypted, then installs everything, then
asks the questions a new computer needs — its name, the network, the
time zone, the administrator's password and the first account — before
the first reboot. The full way is the NetBSD installation,
unchanged.
The desktop. MCDE, the Makronix Common Desktop
Environment, is a fork of CDE. It starts at dtlogin(1), uses Motif, and is designed to
be quick on a machine from the 1990s. It is described in MCDE: The Desktop.
The packages on the medium. The programs that Makronix ships are on the installation medium, in the “makronix” set and in the repository next to it. A machine is usable without a network connection.
The source set. The medium also carries the sources — NetBSD's source sets and the Makronix source set — so that the system can rebuild itself offline. The procedure is in Building Makronix.
This guide describes Makronix 0.99.10, whose release name is
“Camouflage”. Release names are CDE palette names, and a release looks
like its palette: the logo, the icon set, the installer colours and the
desktop colours come from it. The palette is installed as
/usr/pkg/dt/share/palettes/Camouflage.dp.
0.99.10 is a snapshot, not a long-term release. Install it on a machine whose data you have elsewhere, and read the release notes on the installation medium before you start.
amd64 is the first target and the one the build tests on every
change, in QEMU with BIOS and UEFI and on a 2011 MacBook Pro. PowerPC
Macs (G3, G4 and G5) and 64-bit ARM machines (Raspberry Pi 4, ODROID-N2,
ODROID-M1) are the next targets; a platform counts as supported only
when an installation from its medium reaches a login prompt. The
measured state of each platform is in
/usr/src/docs/PLATFORMS.md in the source set.
Makronix's own text and tools are under the CNCL 1.0 (Could Not Care Less), a licence that asks only that you do not blame the authors. NetBSD's source keeps its BSD licence, MCDE keeps the CDE licence (LGPL 2.0 or later), and pkgsrc packages keep their own licences. Appendix C lists the details.
Before you change anything, know where things are. Makronix uses NetBSD's layout; the Makronix parts sit in the places CDE and pkgsrc already use.
/The root file system: the kernel (/netbsd), the boot
loader and the base userland.
/etcThe configuration of this machine: rc.conf,
fstab, master.passwd, the network
configuration and the rc.d scripts. Files here belong to
the administrator, not to a package.
/usrThe base system's programs, libraries, headers, manual pages and
shared files. /usr/src holds the whole source tree when the
source set is installed: the NetBSD sources under
/usr/src/src, X under /usr/src/xsrc and pkgsrc
under /usr/src/pkgsrc.
/usr/pkgEverything pkgsrc installs. The programs are in
/usr/pkg/bin and /usr/pkg/sbin; the MCDE
desktop is in /usr/pkg/dt. The package database is
/usr/pkg/pkgdb.
/homeOne directory per user. A new account gets
/home/<name> and the files from
/etc/skel.
/varData that changes: logs in /var/log, mail spools,
databases, the package cache and the print spool.
MCDE is installed as a package under /usr/pkg/dt. The
programs are in /usr/pkg/dt/bin; the shared data, the
palettes and the colors are in /usr/pkg/dt/share; the
session configuration is in /usr/pkg/dt/config. A user's
own desktop settings live in ~/.dt.
The system-wide CDE configuration directory is /etc/dt.
It is the place for settings that apply to every user, and it is where
the Makronix Guide's information library is installed (see The Information Manager).
/etc/rc.conf — which services start at boot. The
variables are documented in rc.conf(5).
/etc/fstab — which file systems are mounted
where.
/etc/hosts, /etc/resolv.conf and
/etc/mygate — the network, as in NetBSD.
/etc/npf.conf — the firewall. Makronix installs a
rule set that lets in SSH and the replies to outgoing traffic.
/etc/makronix/update — the first line names the
source of software updates.
/etc/dt/config/Xsession.d/ — scripts that every MCDE
session runs.
After boot, init(8) starts the
services named in /etc/rc.conf. On a Makronix desktop the
important ones are:
dtlogin(1) — the graphical
login screen. It starts the X server and the user's session.
dtwm(1) — the window manager:
window frames, the front panel and the workspaces.
dtsession(1) — the session
manager behind the desktop.
dhcpcd(8) — the DHCP client,
when the network is configured by DHCP.
ntpd(8) — the time
synchronisation the installer enables.
ps(1) shows them; top(1) shows what they use. A process that
fails at boot leaves its reason in /var/log/messages and,
for a service, in the console output of rc.d.
The manual pages are installed in the usual sections. Start with
afterboot(8), then read the page for
the program you are using. The Makronix Guide itself is makronix-guide(7); each chapter has its own
page, and the guide is also installed as a PDF and as HTML under
/usr/share/doc/makronix.
When a page does not answer the question, the source is the last
word. The source set puts the whole tree in /usr/src: the
NetBSD sources under /usr/src/src, X under
/usr/src/xsrc, pkgsrc under /usr/src/pkgsrc,
and Makronix's own tools and documentation at the top of the tree.
An installation replaces what is on the disk you choose. Read this chapter with the machine in front of you, and do not start until the data you need is somewhere else.
amd64 is the platform this release is tested on. The USB image is 10 GiB; give the system at least 12 GiB, and considerably more if you want the source set on the same disk. A machine with 2 GiB of memory runs the installer and the desktop; 4 GiB or more make the desktop comfortable.
The USB image starts on UEFI machines and, through the protective
MBR, on BIOS-only machines. A Mac needs its firmware boot menu: hold
Option while the machine starts and choose the stick. The
DVD and the CDs start through the normal firmware boot order.
A Makronix release is more than one image:
the USB image or the DVD, which carry the system and the “makronix” set;
CD 1, which carries the system and starts the installer;
CD 2, which carries the “makronix” set (the desktop and its programs);
CD 3, which carries the binary packages (Firefox, Thunderbird, QEMU, the games).
The installer asks for the next CD when it needs one. A DVD or a USB
stick carries everything and asks for nothing. The source set is on the
DVD and on the USB image when it was built with
make sourcesets; the installed system can also fetch it
later.
Write the image to the whole device, not to a partition. On NetBSD,
find the device with dmesg(8) after
inserting the stick; it is usually /dev/rsd0d.
# dd if=Makronix-0.99.10-amd64-install.img of=/dev/rsd0d bs=1m conv=sync
On Linux the same operation is:
# dd if=Makronix-0.99.10-amd64-install.img of=/dev/sdX bs=4M conv=fsync status=progress
Replace /dev/sdX with the stick, and check the device
name twice: dd does not ask. Afterwards, compare the
checksum of the image with the one published next to it. A stick that
reads back differently at every attempt is defective; the installer will
fail in ways that look like software bugs.
The simple installation asks for the following. Write them down before you start; the installer does not go back once it has begun.
The whole disk that will hold Makronix. Every partition on it is destroyed.
Whether the disk is encrypted with cgd(4), and the passphrase. The passphrase
is asked for at every boot and cannot be recovered. A long sentence you
can type is better than a short password.
A short host name, without spaces or dots. The local network name
becomes <name>.local.
Ethernet with DHCP, or a Wi-Fi network and its passphrase. The
installer configures the interface and enables dhcpcd(8).
The zone of the place the machine is in, for example
Europe/Berlin.
The password of root. It is used with su.
A user name, a full name and a password. The account is put in the
groups that a desktop user needs: wheel (for su), operator,
staff, users, dialer (serial ports), games and wsrc (the source
tree).
Copy the files you need to another machine or an external disk. An installation does not offer to preserve a partition that it is about to overwrite. If the machine has another operating system, decide before the installation whether it is to survive; the full installation way can keep it, the simple way uses the whole disk.
The installer is sysinst(8),
Makronix's fork of NetBSD's installer. It has two ways: the simple way,
which decides as much as it can, and the full way, which is NetBSD's
installation with every question. Both install the same system.
If the machine is a virtual one, Installing in a Virtual Machine has the QEMU/KVM and Proxmox VE settings.
Start the machine from the medium. On a machine with UEFI, choose the
stick or the DVD in the firmware's boot menu; on a Mac, hold
Option while it starts. On a BIOS machine, set the boot
order or press the firmware's boot-menu key. The installer starts from
the medium and runs in memory, so the medium can be removed once the
installation has begun.
The first questions are the language and the keyboard layout. They apply to the installer only; the installed system gets its keyboard layout from the desktop settings.
Choose the installation type. The simple way is the first choice. The full way is “Install NetBSD” and is described in The full way.
Choose the disk. The installer lists the disks it found. Choosing one erases every partition on it. If the machine has more than one disk, unplug the one you want to keep before you start; that is safer than reading the list twice.
Decide about encryption. If you say yes, the installer
encrypts the root file system with cgd(4) and asks for the passphrase twice.
The passphrase is asked for at every boot. If you say no, the disk is
installed in clear text.
The installer partitions the disk and unpacks the sets. It installs the base system, the “makronix” set (the desktop and its programs) and, when the medium carries them, the source sets. It asks whether to install the games; the default is yes.
Answer the configuration forms. The installer asks for the computer's name, the network (Ethernet with DHCP, or Wi-Fi and its passphrase), the time zone, the administrator's password and your account. These are the answers from The answers the installer needs.
Reboot. Remove the medium. The machine starts into dtlogin(1), the MCDE login screen.
The installer sets up more than the account: SSH is enabled, time
synchronisation is enabled, a firewall (npf) lets in SSH and the replies
to outgoing traffic, and the machine answers to
<name>.local on the local network.
Note: the simple way uses the whole disk. It does not preserve another operating system. If the machine must keep one, use the full way and partition by hand.
The full way is the NetBSD installation. It asks for the partition
table (MBR or GPT), the NetBSD disklabel, the sets, the network and the
time zone, and it writes the boot blocks. The procedure is the one in
The NetBSD Guide, chapter “Example installation”; the questions and
their meanings are NetBSD's, and the installer's manual page is sysinst(8).
Two Makronix details matter in the full way:
Choose the “makronix” set as well as the base sets. Without it
there is no desktop, no dtlogin and no MCDE
programs.
The “Next CD” menu asks for the next medium when a set is not on the current one. A DVD or a USB image does not need it.
With encryption, the disk holds one cgd partition with
the root file system, and a small unencrypted partition that the boot
loader can read: the kernel, cgdroot.kmod and
cgd.conf. The loader asks for the passphrase, unlocks the
disk and starts the kernel from the encrypted root.
The unencrypted partition is mounted as /cgdboot (with
“noauto” in /etc/fstab). A kernel update on an encrypted
system is not complete until the new kernel and the matching
cgdroot.kmod are copied to it; An encrypted system gives the
commands.
The login screen is MCDE's dtlogin. Log in with the
account you created; the desktop starts with the front panel, the bar at
the top and the workspace controls. MCDE: The
Desktop explains what you are looking at.
Open a terminal and check the machine:
$ ifconfig -a
$ netstat -rn
$ date
$ ps -ax | grep -E 'dhcpcd|ntpd|dtlogin'
If the network is not up, dhcpcd can be started by hand;
if the clock is wrong, ntpd needs a reachable server. Both
are services in /etc/rc.conf; see Services
and rc.d.
Change the administrator's password and your own with passwd(1). The account is in the wheel
group, so su works; use it for administrative commands, as
the rest of this guide does.
The firmware does not offer the stick. Write the image again to a different stick and compare its checksum. On a UEFI machine, disable “Secure Boot” for the installation; on a Mac, the stick must be formatted by the image, not copied as a file.
The machine starts, then stops with a mount or unpacking error. The medium is bad or the disk is failing. Check the medium's checksum and try another disk.
The installed machine does not start. Start from the
medium again and choose the shell, then inspect the disk with
disklabel and mount the root partition by hand. The boot
messages are on the console; dmesg repeats them.
A virtual machine is the cheapest way to try Makronix: no disk is overwritten, a snapshot is one command away, and the same installer runs as on real hardware. This chapter gives the settings that matter for QEMU with KVM and for Proxmox VE. The values are starting points; the installer is the same as on a physical machine (Installing Makronix).
KVM. A virtual machine without hardware acceleration
(QEMU's TCG) installs, but slowly. On Linux, /dev/kvm must
exist and your user must be allowed to use it; on Proxmox VE, KVM is the
default.
Memory. 2 GiB installs the system and runs the text console; 4 GiB make the MCDE desktop comfortable. 8 GiB are useful only if the guest runs a browser or another VM.
Disk. 32 GiB is a comfortable size for the system, the desktop and a few packages. The source set needs considerably more; Building Makronix explains it.
Firmware. UEFI (OVMF) or BIOS. UEFI is the modern choice; the installer and the boot loader handle both. For UEFI, give the VM a writable variable store, not only the read-only firmware image.
Disk and network devices. VirtIO is the fast choice. The
installer sees a VirtIO block disk as ld0, a SCSI or AHCI
disk as sd0, and an IDE disk as wd0.
A display for the desktop. The graphical installer and
dtlogin need a VGA device. std is the safe
emulation; a serial console is enough for a headless
installation.
Create a disk image first. qemu-img makes a sparse qcow2
file; it grows as the installation writes to it.
qemu-img create -f qcow2 makronix.qcow2 32G
The following command starts a BIOS machine with 4 GiB of memory, four CPUs, an IDE disk, the DVD image, user-mode networking with SSH forwarded to port 2222, and a graphical window:
qemu-system-x86_64 -enable-kvm -cpu host -smp 4 -m 4G \
-drive file=makronix.qcow2,if=ide,format=qcow2 \
-drive file=Makronix-0.99.10-amd64-dvd.iso,media=cdrom,readonly=on \
-boot order=dc \
-nic user,model=e1000, \
hostfwd=tcp:127.0.0.1:2222-:22 \
-vga std -display gtk
If /dev/kvm is not available, remove
-enable-kvm -cpu host and add -cpu max; the
installation then runs in emulation and takes much longer. Replace
-display gtk with
-display none -serial mon:stdio for a console-only machine;
the install media talks on com0, as A serial console explains.
UEFI needs the OVMF firmware and a writable copy of its variable store. The paths differ between distributions; these are the Debian and Ubuntu names:
cp /usr/share/OVMF/OVMF_VARS_4M.fd OVMF_VARS.fd
qemu-system-x86_64 -enable-kvm -cpu host -smp 4 -m 4G \
-machine q35 \
-drive if=pflash,format=raw,readonly=on, \
file=/usr/share/OVMF/OVMF_CODE_4M.fd \
-drive if=pflash,format=raw,file=OVMF_VARS.fd \
-device ich9-ahci,id=ahci \
-drive file=makronix.qcow2,if=none,id=hd0,format=qcow2 \
-device ide-hd,drive=hd0,bus=ahci.0 \
-drive file=Makronix-0.99.10-amd64-dvd.iso,media=cdrom,readonly=on, \
if=none,id=cd0 \
-device ide-cd,drive=cd0,bus=ahci.1 \
-boot order=dc \
-nic user,model=e1000, \
hostfwd=tcp:127.0.0.1:2222-:22 \
-vga std -display gtk
The AHCI controller is deliberate. OVMF's IDE driver reads a CD or a
disk so slowly that the boot loader can need minutes for the kernel; the
tree's own test machines put the disk and the CD on AHCI when UEFI is
used (tools/vmsh.sh).
The installer's boot configuration uses com0 at 115200
baud, so a headless machine can be installed from a terminal. Run QEMU
with the serial line on the terminal and no display:
qemu-system-x86_64 -enable-kvm -cpu host -smp 4 -m 4G \
-drive file=makronix.qcow2,if=ide,format=qcow2 \
-drive file=Makronix-0.99.10-amd64-dvd.iso,media=cdrom,readonly=on \
-boot order=dc -display none -serial mon:stdio
Ctrl-A C switches between the guest console and the QEMU
monitor; Ctrl-A X stops the machine. After the
installation, boot the disk with -boot order=c and leave
the CD out.
In the installer's disk menu, the device name tells you which bus the disk is on:
ld0 — a VirtIO block device
(if=virtio). The fastest choice for a Linux KVM
host.
sd0 — SCSI, AHCI or a VirtIO SCSI controller (the
Proxmox default).
wd0 — the emulated IDE controller
(if=ide), which is the simplest but the slowest.
After the reboot, remove the CD from the command line (or set
-boot order=c). The installed system starts from the disk.
The network is vioif0 for VirtIO and wm0 or
re0 for the emulated cards; the installer's DHCP client
configures it either way.
Proxmox VE runs QEMU with KVM and adds its own storage, snapshots and a web console. A Makronix VM is an “Other” guest; the settings that matter are the machine type, the firmware, the disk bus and the display.
In the web interface, create a VM with these values:
OS: the DVD image Makronix-0.99.10-amd64-dvd.iso as
the CD/DVD, guest type “Other”.
System: machine q35, BIOS OVMF (UEFI),
an EFI disk, Secure Boot off. For a BIOS VM use machine
i440fx and SeaBIOS instead.
Disks: SCSI controller VirtIO SCSI, 32 GiB. The
guest sees it as sd0.
CPU: type host, 4 cores. On a cluster with mixed
CPUs, a named model such as x86-64-v2-AES is needed for
migration; it is slower but portable.
Memory: 4096 MiB (2048 is the minimum for a text installation).
Network: model VirtIO, bridge vmbr0,
firewall as your network needs it.
Display: std, and a serial port if you want the text
console.
Boot order: CD/DVD first, the SCSI disk second.
The same VM from the command line:
qm create 100 --name makronix --ostype other --machine q35 --bios ovmf \
--efidisk0 local-lvm:1,efitype=4m,pre-enrolled-keys=0 \
--cpu host --cores 4 --memory 4096 --scsihw virtio-scsi-pci \
--scsi0 local-lvm:32 \
--ide2 local:iso/Makronix-0.99.10-amd64-dvd.iso,media=cdrom \
--boot 'order=ide2;scsi0' --net0 virtio,bridge=vmbr0 \
--vga std --serial0 socket
qm start 100
local-lvm and local are the storage names
of your Proxmox installation; replace them with the names in Datacenter
> Storage. For a BIOS VM, omit --bios ovmf and
--efidisk0, use --machine i440fx, and keep the
same --boot order.
Open the console with Console (noVNC) for the graphical installer, or
qm terminal 100 for the serial one. If the web console
shows the installer but the keyboard does not work, click inside the
console once; Proxmox forwards the keyboard only after the console has
the focus.
When the installation is finished, detach the ISO and boot the disk:
qm set 100 --boot order=scsi0
qm set 100 --delete ide2
Agent and cloud-init: leave the QEMU guest agent off unless you install it in the guest; Makronix does not ship it. Proxmox's snapshots and backups work at the block level without it. For a consistent backup of a running guest, stop it first or use the guest's own backup; a block snapshot of a mounted file system is not a transactional backup.
The first boot is the same as on a physical machine: the MCDE login screen, the account you created, and the network the installer configured. In QEMU's user-mode network, the host reaches the guest's SSH server through the forwarded port:
ssh -p 2222 user@127.0.0.1
In Proxmox, the guest is on the bridge and gets an address from the
network's DHCP server, or the fixed address you configure in the
installer. The serial console remains available with
qm terminal 100; log out of it with
Ctrl-O.
An encrypted installation works in a VM exactly as on hardware: the installer asks for the passphrase, and every boot asks for it again. A Proxmox snapshot of an encrypted guest is a snapshot of the encrypted blocks; the passphrase is still needed to start it.
The VM starts but the installer does not appear. Check the boot order (CD before disk), and give the firmware a moment: OVMF scans its devices before it reads the CD. With UEFI, make sure the writable variable store is attached; a read-only OVMF image cannot keep the boot entries.
UEFI is very slow. Move the disk and the CD to AHCI
(ich9-ahci in QEMU, VirtIO SCSI in Proxmox). OVMF's IDE
driver is the usual cause.
The desktop does not start. The installer may have
completed on a serial console with no VGA device. Add
-vga std (QEMU) or vga: std (Proxmox), start
the graphical installer, and use the full installation way if the simple
way cannot detect the display.
No network. QEMU's user-mode network is NAT: the guest can reach out, and the host reaches the guest only through a forwarded port. A bridged Proxmox VM behaves like a machine on the LAN; check the bridge and the firewall.
The keyboard is wrong. The installer asks for the keyboard layout; the MCDE session has its own setting. A VM console that sends the wrong keys is usually a host layout problem, not a guest one.
An upgrade replaces the base system and keeps your accounts, your
files and the packages you installed. There are two ways to do it: from
a new installation medium, or from a running system with sysupgrade(8). Both end with the same steps:
the sets are unpacked, the configuration is merged, and the machine is
rebooted.
Start the new medium and choose “Upgrade NetBSD on a hard disk” in
sysinst. The installer asks for the disk and the root
partition, unpacks the new sets over the old system and leaves
/etc and /home alone. The “makronix” set is
part of the upgrade; choose it when the installer offers the sets.
After the reboot, run the two NetBSD tools that bring the configuration up to date:
# postinstall -s /usr/src/etc fix
# etcupdate -s /usr/src/etc
postinstall(8) repairs the files
that NetBSD knows how to merge (the mail configuration, the device
files, the fonts); etcupdate(8) merges
the rest and leaves its conflicts for you to resolve. Read
/etc/rc.conf afterwards: a new release can add a service or
rename a variable, and the old file is kept as
/etc/rc.conf.old when it is replaced.
sysupgrade does the same work from the running system.
It fetches the sets from a directory, a file:// address or
an https:// address, unpacks them and updates the kernel.
The address is the first line of /etc/makronix/update:
# cat /etc/makronix/update
https://example.invalid/makronix/0.99.10/amd64
# sysupgrade auto https://example.invalid/makronix/0.99.10/amd64
After sysupgrade, run postinstall and
etcupdate as above and reboot. The MCDE System Settings has
the same operation as a dialog: it reads the source from
/etc/makronix/update, runs sysupgrade for the
base system and then pkg_add -uu for the packages.
Trust: an https:// source is protected by TLS;
a file:// source is as trusted as the medium it is on. This
release does not verify a signature on the sets. Use a source you
control, and keep a copy of the previous release until the new one has
started.
Packages from pkgsrc are updated with the package tools, not with the base system:
# pkg_add -uu
# pkg_admin rebuild
The packages of the “makronix” set are not in the package database: the installer unpacks them as part of the set. They change with a Makronix release, which is one reason to upgrade the whole system rather than a single file.
On an encrypted system the kernel the machine boots is the copy on
the small unencrypted partition, not /netbsd in the
encrypted root. After an upgrade, copy the new kernel and the matching
cgdroot.kmod to that partition:
# mount /cgdboot
# cp /netbsd /cgdboot/netbsd
# cp /path/from/the/release/cgdroot.kmod /cgdboot/
# umount /cgdboot
The release notes name the exact path of cgdroot.kmod;
it is part of the kernel set of the new release. Keep the old kernel as
/cgdboot/netbsd.old so that the loader can start it if the
new one fails.
A failed upgrade is not a lost machine. Start the old medium, mount
the root partition and read /var/log/messages; the
installer has left the old configuration in
/etc/rc.conf.old and the old kernel in
/netbsd.old. The loader's menu can start
netbsd.old when the new kernel does not boot. With the
source set installed, the system can be rebuilt in place (Building Makronix).
MCDE is the Makronix Common Desktop Environment, a fork of CDE 2.5.3. CDE is the desktop that Sun, HP, IBM, DEC, SCO, Fujitsu and Hitachi shipped on their workstations, and it has been open source since 2012. MCDE keeps what made it good — Motif, a quick and steady desktop that does not need a fast machine — and makes it one desktop that works as a whole.
MCDE is written in C99 against Motif, Xlib and X11. It uses no other toolkit and no compositor, and it builds and runs on NetBSD and on Linux through pkgsrc on both. Everything that differs between the operating systems — users, network, sound — is behind one layer, so that no program has to know which system it runs on.
The graphical login is dtlogin(1).
It shows the users of the machine and a field for the password; the
Options menu chooses the session type and the language. After login,
dtsession(1) starts the session: the
window manager, the front panel, the bar at the top and the programs
that are set to open at login.
Lock Screen in the Makronix menu locks the session without ending it;
Log Out ends it and returns to dtlogin. A session can be
saved on logout and restored at the next login; the setting is in System
Settings, under Login.
One bar runs along the top of the screen. On the left is the Makronix menu: about this computer, software update, system settings, your favourites and recent items, force quit, sleep, restart, shut down, lock the screen and log out. Next to it are the menus of the program you are working with. They leave the program's window and stand in the bar, for every MCDE program, without a change to the program itself.
On the right are the status items: the volume (a slider in the menu, a mute switch, and the wheel over the speaker), Bluetooth, the network, the battery on a machine that has one, and the clock.
CDE's front panel stays as it is: the controls in the middle, the drawers above them, the workspace switches, and the trash. Left of the trash the panel shows the programs that are open and have no place in the panel yet; a click brings the window forward. The right button keeps one in the panel, or you can drag it to the left; from then on it is there at every login. A click starts it, or brings it forward when it is already running.
The workspaces are in the middle of the panel. A window can be sent to another workspace from its window menu; the panel's workspace buttons switch between them. The number of workspaces is set in the window manager's settings.
dtwm(1) draws the frames. The title
bar has the window menu on the left and the minimize and maximize
buttons on the right; the window menu moves, resizes, raises, lowers,
sends the window to a workspace, or closes it. A double click on the
title bar maximizes the window.
The window manager's configuration is ~/.dt/dtwmrc;
without it, the system file /usr/pkg/dt/config/C/sys.dtwmrc
applies. The menu that appears on the root window (the desktop) is
defined there. Most people never edit it: the settings that matter are
in System Settings.
dtfile(1) is the file manager. A
toolbar has Back and Forward — every window keeps its own history — and
the views. A sidebar holds the places: the computer, your home, the
desktop, documents and downloads, and the free space of the disk is in
the status line.
The column view shows one column for each folder down to the one you are in, and on the right what you selected: its icon, kind, size and date. Files are copied and moved by dragging them; the trash is on the front panel. The file manager also shows network places when the sharing services are configured (Remote Access and File Sharing).
dtterm(1) is the terminal. It has
tabs: Ctrl+Shift+T opens one, Ctrl+Shift+W
closes it, and Ctrl+Shift+Left and
Ctrl+Shift+Right move between them. A program's title
appears on its tab, and the window title is the title of the tab in
front. A profile gives a tab its font, its colours and its command
(Window, New Tab with Profile). Ctrl+Shift+D splits a tab
and puts another terminal below it. Started as
dtterm -dropdown, the terminal waits out of sight and comes
down from the top of the screen at F12; the next press puts
it back.
The terminal draws anti-aliased UTF-8 text in the Hack font, and
falls back to another font for characters Hack does not have. The shell
inside it is the login shell of your account; on a fresh account it is
sh(1).
dtpad(1)The text editor. It edits plain text, has a search and replace, and opens several files in one window.
dtcalc(1)The calculator: a normal calculator, a scientific one and a programmer's one, in one window.
dtpaintThe paint program: lines, curves, shapes, fill, text and zoom, in the colours of the release. It is for pictures drawn by hand.
dtlaunchThe launcher, opened with Alt+Space. Type a few letters
to find a program; type a keyword to find a text snippet; leave the
field empty to see what you copied last; type =12*(3+4) and
it shows 84. Return starts the program or puts the text on the
clipboard. Snippets live in ~/.dt/snippets.
dtinfo(1)The Information Manager: this guide, with search. The Information Manager is its chapter.
dtsystemsettings is one window for every setting of the
computer. It has four rows of icons — personal, hardware, internet and
network, system — and a click opens a setting in the same window; Show
All goes back.
It draws the colours (every palette with its colours), the font of every window, the backdrop (a picture, or a folder of pictures that change by themselves) and the screen saver, the keyboard and the mouse, sound, the network and the Wi-Fi networks in reach, Bluetooth, the date, time and time zone, the accounts of the people who use the computer, the software update and the facts about the computer. It also decides what happens at login: the session and the programs that open by themselves.
Changing an account, the network or the software update asks for the
administrator's password. The settings that belong to one user are
stored in ~/.dt; the ones that belong to the machine are in
/etc/dt and /usr/pkg/dt/config.
A Makronix release is named after a CDE palette, and the desktop
starts in that palette. For 0.99.10 it is “Camouflage”: the background
is a grey-green, the panels are olive and grey-green, and the title bars
are a deep green. The palette is a plain file,
/usr/pkg/dt/share/palettes/Camouflage.dp, and System
Settings shows every installed palette with its colours before you
choose it.
Fonts are set the same way. MCDE ships Hack, an open source monospace font, and uses it for the terminal and the login screen; the rest of the desktop uses the system font, which System Settings can change. Anti-aliasing is on by default and can be turned off for a machine that is too slow for it.
Everything that belongs to your desktop is under ~/.dt:
the session, the panel layout, the menus, the snippets, the backdrop
choice and the settings of the programs. Removing a file there resets
that part of the desktop at the next login; removing the whole directory
gives you a fresh desktop, without touching your documents.
The session manager can save the programs that are open when you log out and start them again at the next login. The setting is in System Settings under Login. A program that should always start belongs in the session, not in a shell startup file: the session is what the desktop restores.
The MCDE programs have a Help menu, but their own help pages are not part of this release: the cross build turns the MCDE documentation off. The Information Manager holds this guide, which is the place to start when the question is about the system rather than about one program. The next chapter explains how to open it and how to search in it.
MCDE draws on the X Window System, and X is part of the Makronix base
system. The server, the drivers, the fonts and the clients are in
/usr/X11R7; there is no separate X package to install. On a
normal machine the server needs no configuration at all, and
dtlogin starts it.
The login screen starts the X server and, after a login, the MCDE
session. A text console can start a bare X session with startx(1), but that is not the MCDE session:
it starts the user's ~/.xinitrc and nothing else. Use it to
test the server, not as the daily desktop.
$ startx
$ xdpyinfo | head
$ xrandr
xdpyinfo prints the display's capabilities, and
xrandr lists the outputs and the modes. A second monitor is
enabled with xrandr --output; the setting lasts for the
session unless it is put in a session script.
Most hardware is detected. A machine with an unusual graphics chip, a wrong resolution or a display that stays black can be given a configuration file:
# X -configure
# cp /root/xorg.conf.new /etc/X11/xorg.conf
# X -config /etc/X11/xorg.conf
The file is a starting point, not a guarantee. The log is
/var/log/Xorg.0.log; the lines marked (EE) are
errors and (WW) are warnings. A server that starts from the
console but not from dtlogin usually has a permission or a
display-manager problem, not a driver problem.
The text console and X have separate keyboard settings. The console
is configured with wsconsctl(8):
# wsconsctl -w keyboard.encoding=de
The key map is set in /etc/wscons.conf. In X, MCDE's
System Settings sets the layout for the session; the X server's own
configuration is in /etc/X11/xorg.conf.d/. A keyboard that
types the wrong characters in a terminal but the right ones on the
console (or the other way round) is set in the other place.
The fonts are installed with the X sets. fc-list(1) lists them and
fc-cache -f refreshes the cache after a font is added.
MCDE's terminal and login screen use Hack; the rest of the desktop uses
the system font, which System Settings changes.
An X program can run on one machine and display on another. SSH forwards the connection, which is the safe way:
$ ssh -X name@studio.example xterm
-X asks for trusted forwarding; -Y is the
older, less restricted form. The remote machine needs an X client and
the local one needs the server, which Makronix has. A program that
refuses to start has usually failed an authorization check; the SSH
connection sets that up for you.
dtinfo(1) is MCDE's Information
Manager. It reads information libraries: directories of books, each with
a table of contents and a full-text index. This guide is the book that
is installed in this release. The MCDE programs' own help pages are not
part of the release: the cross build turns the MCDE documentation off,
so the Information Manager has no program help books. The guide is what
is there.
The Makronix Guide is the default library of the Information Manager,
so dtinfo opens it directly. From a terminal:
$ dtinfo
$ dtinfo -l makronix
The first command opens the default library; the second names the
library explicitly. The library is installed as
/etc/dt/infolib/en_US.UTF-8/makronix.dti. The session
script /etc/dt/config/Xsession.d/0000makronix sets
DTINFOLIBDEFAULT to makronix, which is why the
plain command works.
The window has a list of the books in the library and the table of contents of the selected book. A click on a chapter opens it; the navigation buttons go back and forward in the history, and the table of contents stays available while you read. The search field searches the whole library, not only the open chapter; the results are shown with the book and section they come from, and a click opens the result in place.
The guide is one book with a chapter for every part of the system. The chapters are the same text as the manual pages and the PDF; the Information Manager adds the search and the links between them.
An information library is a directory whose name ends in
.dti. It contains a bookcase.map that names
the library and its bookcases, one directory per bookcase with the
compiled books, and a dtsearch directory with the full-text
index. The books are written in DocBook, the SGML dialect that CDE's
documentation uses, and compiled with
dtdocbook2infolib.
The Makronix Guide is built from docs/guide/book.xml in
the source tree. The same source produces the manual pages, the PDF, the
HTML file and this library; Building Makronix
explains the build. If you change the guide, rebuild it with:
$ cd /usr/src
$ sh docs/guide/build.sh all
$ sh docs/guide/build.sh install
The first command builds all five forms in
docs/guide/out; the second copies them to the places the
system reads: /usr/share/doc/makronix,
/usr/share/man/man7 and /etc/dt/infolib.
A library that someone gives you is a directory ending in
.dti. Put it under the locale directory of the system
library and name it on the command line:
# cp -R example.dti /etc/dt/infolib/en_US.UTF-8/
$ dtinfo -l example
The library's own bookcase.map names its bookcases;
dtinfo reads that file, so the directory name and the short
name in the map are what matter. A library for one user can live in
~/.dt/infolib; the search path finds it there as well.
If dtinfo starts but shows no books, the library was not
found. Check the three things it depends on:
/etc/dt/infolib/en_US.UTF-8/makronix.dti/bookcase.map
exists and is readable.
DTINFOLIBDEFAULT is makronix in the
session (echo $DTINFOLIBDEFAULT).
DTINFOLIBSEARCHPATH contains
/etc/dt/infolib/%L/%I.dti. The command
dtsearchpath prints the assembled path; run it in the
session that has the problem.
A library that was copied from another machine can have a stale
search index. Rebuilding it with dtdocbook2infolib is
described in the DocBook chapter of the CDE documentation; for the
Makronix Guide, docs/guide/build.sh infolib does it.
The desktop is where the work starts, but the command line is where a Unix system is understood and repaired. Makronix uses NetBSD's shell, NetBSD's tools and NetBSD's manual pages; nothing here is special to Makronix except the paths of the MCDE programs.
The login shell of a new account is sh(1), NetBSD's POSIX shell. It reads
~/.profile at login and ~/.shrc for
interactive shells. A user who prefers a Korn shell can use
/usr/pkg/bin/ksh93 (installed for MCDE's
dtksh) and change the login shell with chsh(1).
The important environment variables are PATH,
HOME, SHELL, TERM and
LANG. A desktop session gets PATH from the
session configuration, not only from ~/.profile; if a
program is found in a terminal but not from the panel, compare the
two:
$ echo $PATH
$ env | sort
A pipe sends the output of one program to the input of the next; redirection sends it to a file. The three that matter every day:
$ dmesg | less
$ grep -i error /var/log/messages > /tmp/errors
$ command 2>&1 | tee log
Ctrl+C stops the program in the foreground,
Ctrl+Z suspends it, and bg,
fg and jobs manage it.
command & starts it in the background.
A file's permissions are read with ls -l and changed
with chmod(1). The three digits are
the owner, the group and everybody else; the execute bit is what makes a
file a program. A directory needs the execute bit to be entered, and the
write bit to be changed.
$ chmod 644 notes.txt
$ chmod 755 script.sh
$ chown user:wheel script.sh
vi(1) is in the base system and is
the editor to know when the desktop is not running. It has two modes:
command mode, where keys are commands, and insert mode, where they are
text. i enters insert mode, Esc returns to
command mode, :w writes, :q quits and
:wq does both. dd deletes a line,
/text searches, and u undoes.
On the desktop, dtpad(1) edits
plain text with menus and a search dialog. Configuration files are plain
text either way; keep a copy before a large change
(cp file file.orig) and compare afterwards with diff(1).
man(1) reads the manual pages. The
sections are 1 (commands), 2 (system calls), 3 (library functions), 4
(devices), 5 (file formats), 7 (conventions) and 8 (administration). The
useful forms:
$ man ls
$ man 5 rc.conf
$ man -k firewall
$ apropos password
man -k searches the one-line descriptions;
apropos is the same. The Makronix Guide is a set of pages
in section 7, starting at makronix-guide(7). The HTML and PDF forms
are under /usr/share/doc/makronix.
Administrative commands run as root. On a desktop, log in as yourself
and use su(1):
$ su -
Password:
#
The minus makes it a login shell, with root's PATH and
environment. Your account is in the wheel group, which is what allows
su; a terminal that is left alone returns to your prompt
when you type exit. Log in as yourself rather than as root:
the desktop account is the account for people, and su is
the door to the system.
NetBSD starts services through rc.d: one script per
service, and one configuration file that decides which of them run.
Makronix uses the mechanism unchanged; the services that a desktop needs
are already configured.
/etc/rc.conf holds one variable per service.
foo=YES starts the service at boot, foo=NO
does not. The file is read by rc(8);
the variables are documented in rc.conf(5) and in the header of each
script.
# grep -v '^#' /etc/rc.conf | grep .
A local addition belongs in /etc/rc.conf, not in a
script: it survives an upgrade, and etcupdate knows how to
merge it. A single service can also be configured in
/etc/rc.conf.d/<service>, which is useful when a
package or an administrator owns one file.
The scripts are in /etc/rc.d. Each takes the verbs
start, stop, restart,
status and onestart (start it now without
changing rc.conf):
# /etc/rc.d/dhcpcd status
# /etc/rc.d/dhcpcd restart
# /etc/rc.d/sshd onestart
A service that fails at boot writes its reason to the console and to
/var/log/messages. A script that is not executable, or a
variable with a typo, is the usual cause. The order in which the scripts
run is decided by the REQUIRE and PROVIDE
lines at the top of each script, not by the alphabetical order; rcorder(8) prints the order.
On a Makronix desktop the relevant entries are:
dhcpcd=YESThe DHCP client, when the network is configured by DHCP. A machine
with a fixed address sets dhcpcd=NO and configures the
interface in /etc/ifconfig.<if>.
sshd=YESThe Secure Shell server. The installer enables it; the firewall lets it in.
ntpd=YESTime synchronisation. The server list is
/etc/ntp.conf.
npf=YESThe firewall. Its rules are in /etc/npf.conf; The Firewall explains them.
dtlogin=YESThe graphical login. Without it the machine starts with a text
console; startx is not the same thing, and the MCDE session
is started by dtlogin.
cupsd=YESThe print service, when printing is set up (Printing, Sound and Power).
A service that comes from pkgsrc installs its own script in
/usr/pkg/share/examples/rc.d or /etc/rc.d.
Copy it into /etc/rc.d if it is an example, make it
executable, add the variable to /etc/rc.conf, and start it
once to see whether it works before the next boot:
# cp /usr/pkg/share/examples/rc.d/foo /etc/rc.d/foo
# chmod 755 /etc/rc.d/foo
# echo 'foo=YES' >> /etc/rc.conf
# /etc/rc.d/foo start
# /etc/rc.d/foo status
If the service needs a directory or a user, its package documentation
says so; pkg_info -D foo prints the message that came with
the package.
Makronix is a machine for people: the installer creates one account for the person who uses it, and that account is in the groups a desktop needs. More accounts are added with NetBSD's user tools, and the same accounts appear at the login screen and in System Settings.
/etc/master.passwd is the real database;
/etc/passwd is its public view, without the password
hashes. Both are generated from the master file by pwd_mkdb(8). The group database is
/etc/group. Edit them with vipw(8) and vi(1) rather than with a text editor that
does not know about the locks.
Each account has a home directory, a login shell and a list of
groups. A new account gets the files from /etc/skel, which
is where a site puts its default .profile and desktop
files.
# useradd -m -G wheel,operator,staff,users,dialer,games,wsrc \
-c "Full Name" -s /bin/sh name
# passwd name
useradd creates the home directory with -m,
puts the account in the named groups and sets the shell.
passwd then sets the password; without it the account
cannot log in. The groups are the ones the installer uses:
May use su to become root.
May use the operator commands (shutdown, and the disk tools that are marked for it).
The usual group for files that a team shares.
The ordinary users of the machine.
May use the serial ports and the modems.
May write the games' score files.
May write the source tree under /usr/src.
The same operation is in System Settings under Users; it asks for the administrator's password and writes the same files.
# usermod -G wheel,operator,staff,users,dialer,games,wsrc name
# chsh -s /usr/pkg/bin/ksh93 name
# userdel -r name
usermod changes the groups, the shell, the full name or
the home directory; chsh changes the shell of the account
that runs it. userdel -r removes the account and its home
directory; without -r the files stay. A removed account
leaves its files owned by a number; find them with
find / -nouser -print before you delete anything else.
Passwords are stored as hashes in /etc/master.passwd,
which only root can read. A user changes their own with
passwd; root changes another with passwd name.
The password quality is the administrator's business: a desktop machine
on a home network needs a different policy from a machine that is
reachable from the Internet.
If a password is lost, root sets a new one from a single-user boot or from another account in the wheel group. The fact that this is possible is the reason a machine left alone in a public place must be locked, not only logged out.
NetBSD names disks by driver and number: sd0 is the
first SCSI or SATA disk, wd0 the first IDE disk,
ld0 a logical disk, cd0 a CD or DVD drive. A
partition is a letter after the disk: sd0a is the first
partition of the first disk. The raw device has an r in
front (rsd0a); the block device is the one you mount.
$ dmesg | grep -E 'sd|wd|cd'
$ disklabel sd0
$ df -h
$ du -sh /home/*
disklabel(8) prints the partition
table of a disk; df(1) shows what is
mounted and how full it is. A machine installed with the simple way has
a GPT label and a root partition that uses the whole disk; the full way
can have an MBR label and a NetBSD disklabel inside it, as NetBSD
documents.
A new disk has no label until one is written. The interactive editor is the safe way to look first:
# disklabel -i sd1
disklabel> p
disklabel> a
partition> a
offset> [Enter]
size> [Enter]
fstype> 4.2BSD
disklabel> w
disklabel> q
The partition table is written by w; nothing happens
before it. A GPT disk can be edited with gpt(8) instead. After the label, make a file
system and mount it:
# newfs /dev/rsd1e
# mkdir -p /data
# mount /dev/sd1e /data
The raw device is the one for newfs. A file system that
should come back after a reboot belongs in /etc/fstab:
/dev/sd1e /data ffs rw 1 2
newfs(8) destroys what was on the
partition. Check the device name with disklabel before you
type it.
dump(8) and restore(8) are the NetBSD pair for a whole
file system. They preserve owners, modes and hard links, which
cp does not:
# dump -0 -f /backup/root.dump /
# restore -i -f /backup/root.dump
For a directory, tar(1) is enough,
and a compressed archive is easier to keep:
$ tar -czf /backup/home.tar.gz /home
$ tar -xzf /backup/home.tar.gz -C /
A backup that has never been restored is a hope. Restore one file from the archive before you trust it.
An installation with encryption uses cgd(4). The key is derived from a passphrase
and stored in /etc/cgd/<disk>. The installer writes
it; the boot loader asks for the passphrase before the root file system
is mounted. The unencrypted partition that the loader reads is
/cgdboot.
To encrypt another disk by hand, create the configuration, then the cgd device, then a file system on it:
# cgdconfig -g -k argon2id -o /etc/cgd/sd1e adiantum 256
# cgdconfig cgd0 /dev/sd1e
/dev/sd1e's passphrase:
# newfs /dev/rcgd0a
# mount /dev/cgd0a /mnt
The exact partition letters and the choice of algorithm are the
administrator's; cgdconfig(8)
documents the parameters and the verification methods. A lost passphrase
cannot be recovered; keep a copy of the configuration in a safe place,
not the passphrase.
NetBSD has three ways to combine disks. Each has its own manual page and its own recovery rules, and each is a decision to make before the data is on it:
raidctl(8) — RAIDframe,
hardware-independent RAID levels 0, 1, 5 and more. The configuration is
a file; the set must be assembled before the root file system is mounted
if it holds the root.
lvm(8) — logical volumes:
physical volumes, a volume group, logical volumes that can grow. It is
the flexible choice for a data disk.
ccdconfig(8) — concatenation
and striping without RAIDframe. Simple, and with no redundancy.
Whichever you choose, the rule is the same: write the configuration down, test that it comes back after a reboot, and only then put the data on it. A RAID set that has never been assembled from a cold boot is not yet a backup.
fsck(8) runs at boot on an unclean
file system. A file system that needs it by hand must be unmounted
first:
# umount /data
# fsck -f /dev/rsd1e
# mount /data
fsck -n only reports; it changes nothing. The output
names every repaired inode, and a file that was open during a crash can
end up in lost+found at the top of the file system.
Makronix has two kinds of software: what NetBSD's build puts in the
base system, and what pkgsrc installs under /usr/pkg. The
desktop, Firefox, Thunderbird and the games are pkgsrc packages. The
package tools are NetBSD's; the packages on the medium are built for
Makronix or taken from the NetBSD project.
pkg_add(1) installs, pkg_delete(1) removes, and pkg_info(1) asks questions. The package
database is /usr/pkg/pkgdb.
$ pkg_info | less
$ pkg_info -L firefox | less
$ pkg_info -D firefox
$ pkg_info -W /usr/pkg/bin/firefox
-L lists the files of a package, -D prints
the message that came with it (where its documentation is, which service
to enable), and -W answers which package owns a file.
/etc/pkg_install.conf names the repository in
PKG_PATH. The installer writes it when the machine is
installed; it points at the package repository on the installation
medium or at the NetBSD project's repository for the release the
packages were built for. With the path set, a package is one
command:
# pkg_add firefox
# pkg_add -u firefox
# pkg_delete firefox
pkg_add -u updates an installed package to the newest
version the repository has. Without an argument it updates everything
that has a newer version:
# pkg_add -uu
# pkg_admin rebuild
An update can replace a library that another program needs. Read the
messages pkg_add prints, and keep the previous package
until the new one has started.
The packages that Makronix itself ships are in the “makronix” set,
which the installer unpacks as part of the system. They are not
registered in the package database: they change with a Makronix release,
and pkg_add -u does not touch them. A program that is in
the base set or in the “makronix” set is therefore updated by installing
a new Makronix release, not by a package update. The programs that were
installed with pkg_add (Firefox, Thunderbird, QEMU, the
games) are registered and do update.
pkg_info shows the registered packages. If it does not
list MCDE, that is not a defect: MCDE came with the release.
The source set carries pkgsrc in /usr/pkgsrc. A package
is built in its own directory with the NetBSD make:
# cd /usr/pkgsrc/www/firefox
# make install clean
The build needs the distfiles for the package and its dependencies. The source set carries the distfiles of the packages Makronix ships, not the whole pkgsrc archive; a package outside that set fetches what it needs, which requires a network connection. The authoritative description of pkgsrc is The pkgsrc Guide, installed with the tree and available on the NetBSD project's web site.
A build on the installed machine writes into /usr/pkg
and its work directories under /usr/pkgsrc. It needs free
space — a browser can take several gigabytes while it builds — and it is
the wrong thing to do on a machine with a nearly full disk.
pkg_admin(1) can compare the
installed packages with the published vulnerability list:
# pkg_admin audit
# pkg_admin fetch-pkg-vulnerabilities
Makronix enables fetch_pkg_vulnerabilities=YES in
/etc/daily.conf, so the list is fetched daily and security(8) reports what it finds to root's
mail. The report is only as good as the list; read it, and update the
packages it names.
Three things a desktop is expected to get right, and three things NetBSD leaves to the administrator: a printer, sound, and what happens when the machine is idle or the battery is low.
Makronix uses the Common UNIX Printing System. The packages cups and
cups-filters are on the medium; the service is cupsd in
/etc/rc.conf. With the service running, a printer is added
with lpadmin(8):
# echo 'cupsd=YES' >> /etc/rc.conf
# /etc/rc.d/cupsd start
# lpadmin -p office -E -v ipp://printer.example/ipp/print -m everywhere
# lpadmin -d office
# lpstat -t
-m everywhere asks the printer for its own description,
which is the modern way; a printer that does not answer it needs a
driver package and a PPD file. The web interface at
http://localhost:631 does the same through a browser, and
lpoptions -p office -l lists the options of the
printer.
Printing a file is lpr(1):
$ lpr -P office document.pdf
$ lpq -P office
CUPS keeps its queues and its logs in /var/spool/cups
and /var/log/cups. A job that stays in the queue is usually
a wrong device address or a printer that is off; the error log says
which.
NetBSD's audio device is configured with audioctl(1) and mixerctl(1); audiocfg(1) lists the devices and lets you
test them:
$ audiocfg list
$ audiocfg test 0
$ mixerctl -a
$ mixerctl -w outputs.master=180
MCDE shows the volume in the bar at the top: a slider in the menu, a
mute switch, and the wheel over the speaker. The setting is the same
mixer that mixerctl changes.
The package pulseaudio and its volume control pavucontrol are on the
medium for programs that expect a PulseAudio server; MCDE itself does
not need one. audioplay(1) plays a WAV
file without a server, and aucat(1)
records and plays audio and can act as a sound server.
envstat(8) shows the sensors the
machine has: temperatures, fan speeds, voltages and the battery. powerd(8) adjusts the CPU frequency to the
load, which is what keeps a laptop cool and quiet:
# echo 'powerd=YES' >> /etc/rc.conf
# /etc/rc.d/powerd start
$ envstat
$ sysctl -a | grep -E 'cpu.frequency|machdep.cpu'
A desktop machine can run at full speed all the time; a laptop should
not. The MCDE bar shows the battery when the machine has one, and System
Settings has the screen and sleep settings. On a machine that supports
it, apm(8) reports the battery and the
AC state as well.
A machine that shuts down without warning is usually hot or has a
failing power supply. Read envstat before you blame the
software; the temperatures are the first number to look at.
NetBSD's network configuration is small and explicit: an interface is
configured with ifconfig, an address can come from DHCP,
and the routes and the resolver are plain files. Makronix's installer
writes the files for the network you chose; this chapter is for changing
them later.
$ ifconfig -a
$ netstat -rn
$ cat /etc/resolv.conf
The name of an interface is the driver's: wm0 for an
Intel Ethernet, re0 for a Realtek, ath0 or
urtwn0 for Wi-Fi, lo0 for the loopback. An
address from DHCP is requested by dhcpcd(8):
# dhcpcd wm0
# /etc/rc.d/dhcpcd restart
The service reads /etc/rc.conf; with
dhcpcd=YES it configures every interface that is not
configured by a fixed file at boot.
A machine that should have the same address every time does not need
DHCP. The address belongs in
/etc/ifconfig.<interface>:
inet 192.168.1.20/24
The default route is /etc/mygate:
192.168.1.1
and the resolver is /etc/resolv.conf:
nameserver 192.168.1.1
nameserver 9.9.9.9
Set dhcpcd=NO for that interface, or leave the service
off entirely. The name of the machine is in /etc/myname;
the local names are in /etc/hosts:
127.0.0.1 localhost
192.168.1.20 studio.example studio
A Wi-Fi interface needs its network and passphrase before DHCP can
run. wpa_passphrase(8) writes the
configuration:
# wpa_passphrase "network-name" "the passphrase" > /etc/wpa_supplicant.conf
# chmod 600 /etc/wpa_supplicant.conf
# ifconfig ath0 up
# wpa_supplicant -B -i ath0 -c /etc/wpa_supplicant.conf
# dhcpcd ath0
The service configuration is:
wpa_supplicant=YES
wpa_supplicant_flags="-B -i ath0 -c /etc/wpa_supplicant.conf"
dhcpcd=YES
The MCDE System Settings network pane lists the networks in reach and asks for the passphrase; it writes the same files. A USB Wi-Fi adapter is a second interface with its own name; use that name in the commands above.
$ ping -c 3 192.168.1.1
$ ping -c 3 www.NetBSD.org
$ route -n get default
$ netstat -an | grep LISTEN
If the first ping works and the second does not, the address and the
route are fine and the resolver or the uplink is not. If neither works,
the interface is down or the cable is not in the right port.
dmesg names the interface the driver found, and
ifconfig shows whether it has an address.
Three small services make a network usable: something that answers name lookups, something that hands out addresses, and something that keeps the clock right. A desktop uses all three as a client; a machine that serves a network runs the first two as a server.
The resolver reads /etc/resolv.conf. It lists the name
servers in the order they are tried, and the domain that short names
belong to:
search example.lan
nameserver 192.168.1.1
nameserver 9.9.9.9
/etc/nsswitch.conf decides where a lookup goes first.
Makronix's installer sets hosts: files mdnsd dns, so the
local file answers first, then the local network names, then DNS. The
local name <name>.local is answered by mdnsd(8).
A machine that should answer DNS for a small network can run unbound(8) as a caching resolver, or nsd(8) as an authoritative server. Both are
packages; both have their own documentation, and both should be
reachable only from the network they serve. The firewall chapter is the
place to decide that.
A client runs dhcpcd(8) and needs
no configuration beyond dhcpcd=YES. A server runs dhcpd(8) with a lease file and a subnet
declaration:
# cat /etc/dhcpd.conf
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.199;
option routers 192.168.1.1;
option domain-name-servers 192.168.1.1;
default-lease-time 86400;
max-lease-time 604800;
}
# echo 'dhcpd=YES' >> /etc/rc.conf
# touch /var/db/dhcpd.leases
# /etc/rc.d/dhcpd start
The interface that serves the network must have a fixed address in the same subnet (A fixed address); a DHCP server with an address from DHCP is a machine that cannot find itself. A machine that should always get the same address can be pinned by its Ethernet address:
host printer {
hardware ethernet 00:11:22:33:44:55;
fixed-address 192.168.1.50;
}
A correct clock matters for TLS, for mail and for the logs of two
machines that are compared. ntpd(8) is
the daemon; /etc/ntp.conf names the servers:
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
With ntpd=YES, the clock is corrected continuously and
slowly. A clock that is wrong by hours is set once by hand before the
daemon starts:
# date 202611151200
# /etc/rc.d/ntpd restart
$ ntpq -p
ntpq -p lists the servers, the stratum and the offset. A
server marked with an asterisk is the one the daemon is following. If
none of them answers, the network or the firewall is the problem, not
the clock.
A Makronix machine is a Unix machine on a network. It can be reached with SSH, it can serve files with NFS, SMB or AFP, and it can mount the shares of other machines. MCDE's file manager shows the network places that the system has been told about; System Settings has the sharing controls.
The installer enables sshd(8) and
the firewall lets it in. Log in from another machine with your
account:
$ ssh name@studio.example
$ ssh name@studio.local
A key is better than a password and is the only way to log in without typing one. Create it once, then put the public half on the machines you log in to:
$ ssh-keygen -t ed25519
$ cat ~/.ssh/id_ed25519.pub | ssh name@studio.example \
'mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys'
$ chmod 700 ~/.ssh; chmod 600 ~/.ssh/authorized_keys
scp copies a file, sftp is an interactive
file transfer, and a tunnel forwards a port through the connection:
$ scp report.pdf name@studio.example:/home/name/
$ ssh -L 8080:localhost:80 name@studio.example
The server's configuration is /etc/ssh/sshd_config.
Password logins for root are disabled by default; log in as yourself and
use su. After a change, test the configuration and reload
the daemon:
# sshd -t
# /etc/rc.d/sshd reload
NFS is the native Unix file sharing. The server exports a directory
in /etc/exports:
/home -alldirs -maproot=root -network 192.168.1.0 -mask 255.255.255.0
and runs the daemons:
# echo 'rpcbind=YES' >> /etc/rc.conf
# echo 'nfsd=YES' >> /etc/rc.conf
# echo 'mountd=YES' >> /etc/rc.conf
# /etc/rc.d/rpcbind start
# /etc/rc.d/mountd start
# /etc/rc.d/nfsd start
# /etc/rc.d/mountd restart
The client mounts it with mount_nfs or
mount -t nfs:
# mount -t nfs 192.168.1.20:/home /mnt
An entry in /etc/fstab makes it permanent.
-maproot=root lets root on the client write as root on the
server; without it, root is mapped to nobody. A share that is open to
the whole network should be a decision, not a default.
Windows and macOS machines speak SMB; older Macs speak AFP. Makronix ships both servers as packages:
# pkg_add samba4 netatalk4
# echo 'smbd=YES' >> /etc/rc.conf
# echo 'nmbd=YES' >> /etc/rc.conf
# echo 'afpd=YES' >> /etc/rc.conf
The Samba configuration is /usr/pkg/etc/samba/smb.conf.
A minimal share that is visible to one user:
[global]
workgroup = HOME
server string = Makronix
security = user
passdb backend = tdbsam
[share]
path = /home/share
valid users = name
read only = no
browseable = yes
Create the Samba user after the system account exists:
# smbpasswd -a name
# /etc/rc.d/smbd start
# /etc/rc.d/nmbd start
AFP is configured in /usr/pkg/etc/netatalk/afp.conf; the
package's documentation has the share syntax for the version that is
installed. MCDE's System Settings has the sharing controls for both, and
its file manager shows a share that is mounted or announced on the
network.
When the other machine offers only SSH, SSHFS mounts a directory over it:
# pkg_add fuse-sshfs
$ sshfs name@studio.example:/home/name /mnt/studio
$ umount /mnt/studio
The package afpfs-ng does the same for an AFP server. Both need the FUSE device and the user's permission to mount; the package message says which group to join.
Every service that listens on the network is a door. Open only the ones you use, restrict them to the network they serve, and read the firewall chapter before you connect the machine to a network you do not control. A file share with a weak password is worse than no file share.
Makronix turns on NetBSD's packet filter, npf(7), and installs a rule set that lets
nothing in that the machine did not ask for. Outgoing connections work,
their replies come back, DHCP and IPv6 set-up work, ping works, SSH
works and the local network names work. Everything else is blocked.
/etc/npf.conf on a freshly installed machine is the
following. It is the rule set that the installer writes and that
/usr/src/docs/reference/npf-default.conf records for
validation:
alg "icmp"
group default {
pass final on lo0 all
# out: everything, with the replies
pass stateful out final all
# DHCP replies (a broadcast, so no state) and IPv6 set-up
pass in final proto udp from any port 67 to any port 68
pass final family inet6 proto ipv6-icmp all
# ping
pass stateful in final family inet4 proto icmp all
# remote login
pass stateful in final proto tcp to any port ssh
# mDNS and DNS-SD (mdnsd): the multicast announcements, port 5353
pass in final proto udp to any port 5353
block in final all
}
Read it from the bottom up: everything that arrives is blocked unless
an earlier rule lets it in. The rules above it are the exceptions.
stateful means that the reply to a connection the machine
started is allowed without a rule of its own.
A service that should be reachable from the network needs a rule
above the final block. For a web server on port 80, add this line before
block in final all:
pass stateful in final proto tcp to any port 80
Then check the file and reload the running rule set. A rule set with
a syntax error must not be loaded; npfctl validate reads
the file without touching the running one:
# npfctl validate /etc/npf.conf
# /etc/rc.d/npf reload
# npfctl show
# npfctl stats
npfctl show prints the rules that are active, after the
variables and groups have been expanded. If the line you added is not
there, the reload did not happen; the console and
/var/log/messages say why.
The service is enabled in /etc/rc.conf:
npf=YES
At boot, npf loads /etc/npf.conf before the
network is up. A machine that boots without a rule set is a machine that
is open for the time it takes to notice. After a change, reload rather
than restart; the existing connections survive a reload.
A machine that routes between two networks needs NAT and forwarding.
The rules are in npf.conf(5); the
shape is a map line for the outgoing interface and
pass rules for the two directions. Forwarding itself is a
sysctl(8) setting:
# sysctl -w net.inet.ip.forwarding=1
# echo 'net.inet.ip.forwarding=1' >> /etc/sysctl.conf
A router is a machine with two interfaces and a rule set that describes both directions. Do not enable forwarding on a desktop that has one interface; it has nothing to forward between.
Two services that a small machine often provides: a mail transfer agent that delivers local mail, and a web server that serves a directory. Both are NetBSD base services; Makronix ships the clients and the desktop programs that read the results.
The base system's mail transfer agent is Postfix. A desktop that only
needs local mail — the daily security report, cron's output, the
messages of the package tools — runs it with the default configuration
and reads the mail with mail or MCDE's dtmail(1):
# echo 'postfix=YES' >> /etc/rc.conf
# /etc/rc.d/postfix start
$ mail
/etc/postfix/main.cf is the configuration. A machine
that should accept mail from the network sets
inet_interfaces and a proper myhostname, and
needs a DNS name with an MX record. That is a mail server, not a
desktop; the NetBSD Guide's mail chapter and the Postfix documentation
describe the decisions, and the firewall chapter describes the port that
has to be opened.
Local mail is delivered to /var/mail/<name>. If
mail does not arrive, read /var/log/maillog; Postfix writes
there, and postfix check reports a configuration that it
cannot use.
The base system's HTTP server is bozohttpd(8), installed as
httpd. It serves one directory, which is enough for a
documentation page or a small site:
# echo 'httpd=YES' >> /etc/rc.conf
# echo 'httpd_flags="-b /var/www"' >> /etc/rc.conf
# /etc/rc.d/httpd start
$ curl http://localhost/
/var/www is the document root; the index file is
index.html. A server that needs CGI, PHP, TLS or virtual
hosts should use a package: nginx or apache, with their own
documentation and their own service scripts.
TLS needs a certificate. For a public name, the certificate authority's client (for example certbot) obtains and renews it; for a name that only the local network uses, a self-signed certificate is enough, and every client has to be told to trust it. A certificate that has expired is the most common reason a site that worked yesterday does not work today.
Firefox reads the web, Thunderbird reads mail and news, and
dtmail reads local mail in the MCDE style. All three are on
the medium as packages; the installer can put them on the machine, and
pkg_add installs them later (Packages and
pkgsrc). Their settings belong to the user, not to the system, and
live under ~/.mozilla, ~/.thunderbird and
~/.dt.
Makronix builds itself from its own sources. The installation medium can carry those sources, so a machine can be rebuilt without a network; a development machine does the same with more room and more patience. This chapter is the map: the source layout, the one entry point, and what each target produces.
src/Makronix's NetBSD tree: the kernel, the userland, the build system
and the installer. It is edited directly; there is no patch layer
between it and the system. Upstream NetBSD is in
refs/netbsd/src, for reading.
xsrc/The X tree, imported the same way. X is part of the base system: the server, the drivers, the fonts and the clients are built into the X sets.
pkgsrc/The pkgsrc checkout, pinned. It is not edited; a change is a moved
pin or a package in ext/ or the local wip.
ext/The third-party trees Makronix ships and changes: MCDE, its Motif
build, afpfs-ng and glibc. Each has its own recipe and its own
IMPORT note.
tools/Makronix's own POSIX shell tools: the build stamp, the package list reader, the set generator, the test harnesses and the MCDE helpers.
docs/ and www/The contracts and the guide, and the web site. The guide's source is
docs/guide/book.xml.
Everything is built from the top-level Makefile. The
interface is deliberately small:
$ make # the distribution (no medium)
$ make release ARCH=amd64 # through to a finished release
$ make iso # the installation CD/DVD image
$ make usb # the bootable USB image
$ make userland # the pkgsrc packages and the makronix set
$ make sourcesets # the source sets for the medium
$ make test # the tool tests, then the installation tests
$ make install # install over a running Makronix
make release builds the sets and the kernels;
make iso packages what the release built; it refuses to run
if a source changed since, because the medium would not match its sets.
make usb needs the source sets under
source/sets; make sourcesets writes them.
ARCH is the name a person types: amd64, i386, macppc,
evbarm. On a NetBSD host without ARCH, the host decides; on
a cross host it is amd64 unless named. JOBS sets the
parallelism.
The build detects whether the host is NetBSD or not. A NetBSD host
builds natively with its own toolchain; a Linux or another host
cross-builds the same tree with the toolchain that build.sh
builds first. A package that builds only on one of the two is a defect
in the recipe, not a reason to use a virtual machine.
The pkgsrc packages are built for the target with the same toolchain;
tools/pkgsrc-cross.mk.conf is the whole configuration, and
pkgsrc/ itself is not patched. The workarounds in that file
are measured; Cross-Building and the Source Tree
explains them and when they can go.
The build writes to build/obj: the object tree,
destdir.<arch> and the release directory
releasedir. The logs are in build/logs. A
medium is in releasedir/images; the sets are in
releasedir/<arch>/binary/sets.
The gate is checkflist, run the way NetBSD runs it: the
set lists and what the build actually installed must agree. Extra or
missing files fail the build. A build is done when
checkflist reports neither.
The source set installs the whole tree to /usr/src — the
NetBSD sources under /usr/src/src, X under
/usr/src/xsrc, pkgsrc under /usr/src/pkgsrc.
Build from /usr/src as a user in the wsrc group:
$ cd /usr/src
$ export MAKRONIX_TOP=/usr/src
$ make release ARCH=amd64
A full self-build needs room for the object tree and the distfiles
and takes hours on a laptop; the first build is the slow one. The source
set is not the development history: it carries the files a rebuild
needs, and PINS names the revisions they came from.
make test runs the tests of the tools first, then the
installation tests: a machine is installed from the medium in QEMU and
must reach a login prompt and shut down cleanly. The MCDE tests run
before the release tests, from a native build of the host. A test that
has never failed has not been tested; the harnesses are in
tools/ and each can be run alone.
Makronix is built on NetBSD and on other systems. The same tree, the
same packages and the same release come out; the difference is the
toolchain that build.sh builds first. This chapter is for
the person who works on that build, not for the person who installs the
result.
tools/userland.sh looks at uname -s. On
NetBSD it builds natively with the host's pkgsrc and installs into the
host's /usr/pkg; on anything else it cross-builds with the
toolchain and the sysroot in build/obj. The packages are
the same either way; tools/pkgsrc-cross.mk.conf is the only
configuration that is specific to the cross case, and
pkgsrc/ is not patched.
The build's paths come from MAKRONIX_TOP. On a
development machine that is the repository root; on an installed system
with the source set it is /usr/src.
Four settings in tools/pkgsrc-cross.mk.conf were each
added after a measured failure. They are documented in
docs/CROSS.md in the source set; in short:
fonts/Xft2 runs a C++ probe it does not declare. The cross
configuration adds USE_LANGUAGES+= c c++, which gives it a
real compiler instead of pkgsrc's fail wrapper.
fonts/Xft2 calls FT_GlyphSlot_Embolden without the
header that declares it after FreeType moved it. The build adds
-include freetype/ftsynth.h. This is a GCC-14 strictness
issue, not a cross issue; the native build may need it too.
pkgtools/x11-links probes /usr for X headers. In a
cross build that is the host's X, not the target's; the configuration
points it at ${CROSS_DESTDIR}/usr/X11R7.
X's configure passes absolute /usr/X11R7/include and
/usr/X11R7/lib, which do not resolve inside the sysroot.
The build adds the sysroot-relative GCC form
-I=/usr/X11R7/include and
-L=/usr/X11R7/lib.
Each setting has a removal criterion in docs/CROSS.md:
when the package builds without it in both modes, it goes. A workaround
that outlives its cause is a bug with a comment.
What Makronix changes is a fork in ext/; what it does
not change is imported and left alone. The NetBSD tree is
src/ with its base commit in src/BASE; the X
tree is xsrc/ with xsrc/BASE; upstream for
reading is refs/netbsd and refs/linux. The
import of a fork is one commit of the upstream archive, and every change
after it is a visible diff.
MCDE is the largest fork. Its build for the host is
make mcde-host; its Linux build is
make mcde-linux. The host build is what produces
dtdocbook2infolib and dtinfo for the
documentation and for testing without a target machine; the cross build
for the release is part of make userland.
A package that builds only on one host is broken. Fix the recipe,
the configuration in tools/, or the source in
ext/; do not build it in a virtual machine.
pkgsrc/ and refs/ are not edited. A
change is a moved pin, recorded in PINS, or a package of
our own.
tools/ is POSIX shell: no bash, no Python, no
transient units. A tool that only runs on the author's machine is not a
tool.
The set list is generated, not written:
tools/makronix-set.sh reads the installed tree back and
writes src/distrib/sets/lists/makronix/mi. A file that is
installed but not in the list fails checkflist.
make release ARCH=macppc and the other architectures use
the same tree with a different target. A platform is supported when its
installation has been run to a login prompt; the measured state is in
docs/PLATFORMS.md. Cross building makes the compiler for
that platform; it does not test the firmware, the drivers or the desktop
on it. That is what the hardware is for.
Makronix is one system: the base, the X server, the desktop and the packages that came with the release move together. The package tools update the packages that were installed with them; a Makronix release updates everything else. This chapter is the practical order.
Open System Settings and choose Software Update. The dialog reads the
source from the first line of /etc/makronix/update, shows
what it found, and asks for the administrator's password before it
changes anything. It runs sysupgrade for the base system
and then pkg_add -uu for the registered packages. The
machine must be rebooted afterwards.
The source is a directory, a file:// address or an
https:// address. http:// and
ftp:// are refused: a base system that is fetched over an
unencrypted connection is a base system that can be changed on the way.
An https:// source is protected by TLS; a
file:// source is as trusted as the medium it is on. This
release does not verify a signature on the sets, so use a source you
control and keep the previous medium until the new system has
started.
# cat /etc/makronix/update
https://example.invalid/makronix/0.99.10/amd64
# sysupgrade auto "$(cat /etc/makronix/update)"
# postinstall -s /usr/src/etc fix
# etcupdate -s /usr/src/etc
# pkg_add -uu
# reboot
The order matters: the base system first, then the configuration
merge, then the packages, then the reboot. If sysupgrade
fails, stop there; a half-updated base with new packages is harder to
repair than either one alone.
The desktop is part of the “makronix” set, which the installer
unpacks as part of the system. It is not in the package database, so
pkg_add -u does not update it; a new Makronix release does.
The same is true of the base system's programs (vim, git-base,
sysupgrade) and of the libraries MCDE needs.
A person who builds Makronix from source updates the desktop by building the new tree and installing its release; the next chapter describes the build. A person who only uses the desktop updates it with the release's own update dialog or medium.
The guide is generated from docs/guide and installed
with the release. After a change to the guide's source, rebuild it and
install the five forms:
$ cd /usr/src
$ sh docs/guide/build.sh all
$ sh docs/guide/build.sh install
The build needs pandoc, xmllint, mandoc, Chrome or Google Chrome for
the PDF, and a host build of MCDE for the information library.
build.sh check verifies that every form was produced; the
details are in docs/guide/AGENTS.md.
The old kernel is /netbsd.old and the loader's menu can
start it. The old configuration is in /etc/rc.conf.old
after postinstall or etcupdate replaced it. On
an encrypted system, the kernel the machine starts is the copy in
/cgdboot; An encrypted
system explains how to put the old one back.
A machine that does not start is not a machine that is lost. Start the medium, mount the root file system and read the logs; the data is still there, and the source set can rebuild the system around it.
A Unix system documents itself. The order that works is: the manual
page for the command, the file in /usr/share/doc, the
source, then the network. The network is last because it is the only one
that may be wrong about your version.
man is described in Finding the
documentation. The pages that are worth reading before anything else
are:
afterboot(8) — what to do after
the first boot;
intro(8) — the system
administration commands and how they fit;
hier(7) — the file system
layout;
pkgsrc(7) — pkgsrc and the
package tools;
rc.conf(5) — the
services;
npf.conf(5) — the
firewall.
The NetBSD project's documentation is the reference for the parts
Makronix inherited: https://www.NetBSD.org/docs/, the
NetBSD Guide and the manual pages online. For Makronix itself, the
source tree is the last word: /usr/src holds the whole
tree, with the guide, the tools, the build contract and the records of
what was measured.
When you ask for help, give the version (uname -a), the
command you ran, what you expected and what happened. The output of
dmesg and the relevant lines of
/var/log/messages are worth more than a description.
man makronix-guide lists the chapters; each chapter
is a page in section 7.
/usr/share/doc/makronix/makronix-guide.pdf is the
printable form.
/usr/share/doc/makronix/makronix-guide.html is one
file and opens in any browser.
guide.html on the Makronix website is the same text
in the site's window.
dtinfo opens the same text in the MCDE Information
Manager, with search.
The words this guide uses in a particular sense.
What NetBSD's build produces and Makronix ships in the NetBSD sets: the kernel, the C library, the userland, the X server and the manual pages. It is not in the package database.
The Common Desktop Environment, the Motif desktop that Sun, HP, IBM, DEC and others shipped. MCDE is its fork.
NetBSD's cryptographic disk driver. An encrypted installation is a cgd over the root file system.
Building for one machine on another. Makronix's build cross-builds when the host is not NetBSD and builds natively when it is.
The partition table NetBSD keeps on a disk. A GPT label is the modern form; an MBR label with a NetBSD disklabel inside it is the older one.
The MCDE Information Manager: the program that reads information libraries and displays their books.
The MCDE login screen. It starts the X server and the session.
A directory ending in .dti that holds a bookcase, its
books and the full-text index. The Makronix Guide is one.
The packages that Makronix ships on the medium and unpacks as part of
the system. MCDE is in it. It is not registered with
pkg_add.
The Makronix Common Desktop Environment: the fork of CDE that is Makronix's desktop.
The widget toolkit CDE and MCDE are written against.
The Makronix source set: the whole tree -- the NetBSD sources, X, the
extensions in ext/, pkgsrc, the tools, the documentation,
the distfiles and the pins -- installed in /usr/src.
NetBSD's packet filter, the firewall Makronix enables by default.
The package system that supplies /usr/pkg: a tree of
recipes, the package tools, and binary repositories.
Everything a version of Makronix consists of: the sets, the kernels, the media and the name. 0.99.10 is “Camouflage”.
A group of files that the installer can select: the base sets, the X sets, the games and the source sets. The “makronix” set is the desktop and its programs.
The installer. Makronix's fork has a simple way and the full NetBSD way.
The group that may write the source tree, so that a user can rebuild the system without becoming root.
A guide is a derived work too. This one follows the structure of The NetBSD Guide and uses its general NetBSD procedures; the Makronix text, the MCDE chapters and the five output forms are Makronix's.
The Makronix text and the tools in this tree are under the CNCL 1.0
(Could Not Care Less). The preface explains what it means; this is the
licence itself, exactly as it is in LICENSE at the top of
the tree.
# CNCL — Could Not Care Less License
**Version 1.0**
*No rights reserved. No obligations imposed. Couldn't care less.*
## Preamble
Software is the product of collective human knowledge.
Every idea builds upon ideas that came before. Every invention stands on
the accumulated discoveries, mistakes, experiments, and imagination of
generations.
We do not believe in artificial boundaries around creativity.
We do not believe that creating something grants us the moral authority
to dictate what others may do with it.
We live in an age where knowledge, tools, and artificial intelligence
make creation accessible to everyone. The distinction between author,
user, modifier, and creator is becoming increasingly meaningless.
We are not here to control what happens next.
We are here to create.
## The License
This software is made available to the world.
Do whatever you want with it.
Use it. Copy it. Modify it. Break it. Fix it. Sell it. Give it away.
Incorporate it into something else. Keep your modifications private.
Publish them. Feed it to AI. Build something nobody has thought of yet.
Use it commercially or personally. Combine it with other software.
Release it under another license.
You owe the original author nothing.
No attribution required. No royalties. No source disclosure. No
reciprocal licensing. No contribution requirements. No permission
needed.
There are no conditions attached to your use of this software.
There is no expectation that you will give anything back.
There is no expectation that you will even care.
## Disclaimer
The software is provided "AS IS", without warranty of any kind.
The authors accept no responsibility for its use, misuse, modification,
distribution, or consequences.
## The CNCL Principle
We acknowledge that everything we create is built upon something that
existed before us.
We do not claim ownership over the collective intelligence of humanity.
We do not expect recognition, compensation, or control.
Take it. Change it. Make it better. Make it worse. Make something
entirely different.
Or don't.
We Could Not Care Less.
---
**CNCL — Could Not Care Less.**
*Created for everyone. Controlled by no one.*
The paragraph above is the whole licence. It has no conditions beyond the disclaimer, and the disclaimer is the only sentence that asks anything of the reader: do not blame the authors. The preface explains why Makronix uses it and what it does not cover.
The structure of this guide and the general NetBSD procedures follow
The NetBSD Guide, Copyright (c) 1998-2026 The NetBSD Foundation, Inc.,
which is distributed under the BSD 2-clause licence. NetBSD's source,
which Makronix is built from, keeps its BSD licence and its copyright
notices. The NetBSD Guide is at
https://www.NetBSD.org/docs/guide/en/.
MCDE is a fork of CDE, the Common Desktop Environment. CDE is
Copyright (c) 1993-2012 The Open Group and is distributed under the GNU
Lesser General Public License, version 2 or later. The MCDE changes keep
that licence; the MCDE source is in ext/src/mcde in the
source tree.
The Hack font, which MCDE uses for the terminal and the login screen, is by Source Foundry and is distributed under the MIT licence.
The guide's source is DocBook XML 4.5. The DocBook DTD is Copyright (c) 1992-2006 OASIS and is distributed under the OASIS licence. The MCDE Information Manager reads the older DocBook SGML dialect that CDE's tools define; the guide's build converts the XML to that dialect for the library.
docs/guide/book.xml and
docs/guide/chapters/ — the text.
docs/guide/build.sh — the build of the five
forms.
docs/guide/tools/docbook-to-cde.lua — the DocBook
XML to CDE SGML writer.
docs/guide/template-web.html — the website form of
the same text.
docs/logo/ — the logo.
www/style.css — the Camouflage palette that the
guide's colours follow.
The Makronix Guide is installed as manual pages from makronix-guide(7), as
/usr/share/doc/makronix/makronix-guide.pdf, as
/usr/share/doc/makronix/makronix-guide.html and as an
information library in
/etc/dt/infolib/en_US.UTF-8/makronix.dti.