Skip to content

Instantly share code, notes, and snippets.

@rma92
rma92 / Auto-saved 4eacaa96.xml
Created November 21, 2025 12:55
rma92 Windows 11 LTSC 2024 Lite with no components removed.
<?xml version="1.0" encoding="utf-8"?>
<Preset isAutoSaved="true" xmlns="urn:schemas-nliteos-com:pn.v1">
<Date>11/21/2025 12:42:09</Date>
<AppInfo>
<Version>2025.8.10552</Version>
<Licensed>Yes</Licensed>
<Protections>Yes</Protections>
<Host>Windows 10 EnterpriseS 21H2 x64 - 10.0.19044.6575 (en-US)</Host>
</AppInfo>
<ImageInfo>
@rma92
rma92 / Auto-saved c297fbaf.xml
Created November 21, 2025 11:40
Windows 10 LTSC 2021 rma92 Lite
<?xml version="1.0" encoding="utf-8"?>
<Preset isAutoSaved="true" xmlns="urn:schemas-nliteos-com:pn.v1">
<Date>09/12/2022 13:25:18</Date>
<AppInfo>
<Version>2.3.8.8890</Version>
<Licensed>No</Licensed>
<Protections>Yes</Protections>
<Host>Windows Server 2022 Standard x64 - 10.0.20348.405 (en-US)</Host>
</AppInfo>
<ImageInfo>

Building a small base for embedded systems on OpenBSD

The following will be removed

  • clang
  • relinking sources

Steps

  • Install OpenBSD normally. I put it in a single partition for processing. Only base.tgz install (and bsd/bsd.mp) are needed.
    • If this is a local VM, possibly enable root SSH so that commands can be pasted into terminal more easily.
  • Boot into the new system with the cd inserted, login as root
  • Notes:

Alpine ZFS Root

  • Ideally, follow the steps in "Build a custom virt kernel and ISO with ZFS", and use that install to avoid using unnecessary space and building an unnecessarily large kernel (RAM usage). This produces a system that installs in under 90MB.
  • Boot from Alpine ISO. Login as root (no password). //* Run setup-alpine to set up network/package repositories, hit ctrl+c when you get to the disk prompt
  • To set up network with DHCP and the first mirror, run the following, or manually use setup-intefaces -r and setup-apkrepos to set something more specifically. Optionally, use set a root password setup-sshd to set up remote console.
setup-interfaces -ra
setup-apkrepos -1c

echo 'root:9' | chpasswd

Building a small base for embedded systems on OpenBSD

The following will be removed

  • relinking sources
  • libs for X11 and base will be stripped. The following will be moved from base and X11 to comp
  • Clang (which is huge, and only present in the base image to help with the relinking)
  • All include files for X11 The following will be moved from base, and X11 to the man package
  • All man, info, and doc files

user

If I build a file server for my uncle's office on FreeBSD running some samba shares, backed by ZFS, root on ZFS, takes ZFS snapshots every 15 minutes of the core data, and ZFS sends to my backup server off site by cron once in a while, would this be a reasonably set-it-and-forget-it-setup?

assistant

Short answer: yes, architecture-wise that’s a solid, grown-up setup — if you bolt on a few things so it can survive being ignored.

Let’s go through the important bits and what I’d add so you’re truly close to “set it and mostly forget it”.


user

how do I make a crontab entry for root's crontab on freebsd to make a zfs snapshot of zroot/datashare:

zfs snapshot zroot/datashare@[ISO8601 Date-Time]

I also want to zfs send the latest snapshot every so often to server.com

assistant

Alpine: Disable password complexity requirements on Alpine Linux from Vultr

vi /etc/pam.d/base-password

Comment everything out, and add password required pam_unix.so sha512 shadow. The file should look like:

#%PAM-1.0
#password    requisite   pam_pwquality.so enforce_for_root
#password    required    pam_unix.so use_authtok sha512 shadow
password required pam_unix.so sha512 shadow
@rma92
rma92 / largefile.md
Created November 8, 2025 17:04
Find largest files on Linux / Unix / BSD

Find large files on Linux

Run this du command in the directory from which you want to search. Adjust it to exclude other mounted file systems

cd /
sudo du -sh --exclude=proc --exclude=media --exclude=mnt --exclude=tank * | sort -rh | head -n 20
@rma92
rma92 / 20251105-AlpineXrdpDesktops.md
Last active November 9, 2025 13:57
Some configurations to set up Alpine as an RDP server, can be used with diskless or read-only file system, to make lightweight immutable images.

Alpine Xrdp Desktops

Some xrdp terminal server configurations

General useful things

You may want to add a tmpfs for user's .cache files to /etc/fstab. vi /etc/fstab:

tmpfs /home/*/.cache    tmpfs   size=512M,nodev,nosuid  0   0

You may want to add the user home directories to lbu:

lbu add /home