Re: questions about RAID5C, RAID6, RAID6C, can Openbsd be a good storage-server OS?

2024-02-04 Thread David Rinehart


This is a good read: 
https://research.exoticsilicon.com/articles/backup_strategies


On Sun, 2024-02-04 at 19:02 +, beecdadd...@danwin1210.de wrote:
> hello
> 
> I will make a storage server, and RAID just has to be on it, right?
> 
> is RAID6 in work or maybe plans, I would like to know
> what about RAID5 + CRYPTO or RAID6 + CRYPTO?
> I read these
> https://www.reddit.com/r/openbsd/comments/r4bydk/encrypted_raid6_support/
> and from it
> https://marc.info/?t=15434869341=1=2
> 
> encryption is a must, I won't have it unencrypted
> what about RAID controller like RAID6 and software RAIDC combination?
> it would be cool to have redundancy like RAID6 and secure data with
> CRYPTO..
> RAID1C is too expensive
> 
> does anyone run multi-TB storage servers with OpenBSD? what raid do
> you run,
> what about hardware raid? I fear/dislike hardware raid but I never
> tried it
> I want to live without OpenZFS/FreeBSD, butnot without encryption and
> redundancy
> 
> I don't have to be able to boot from it (canbe other disk which also
> maybe in
> RAID1C), but would be nice
> 
> I know OpenBSD is not meant to be run as big fancy storage server
> with maybe
> complicated reliability like RAID6 + CRYPTO, but what you expect?
> everyone
> loves OpenBSD and wants to use it for everything, not FreeBSD
> 
> thank you I am sorry if I ask too much, I don't demand, just nice
> request
> 



Re: pkg_add - error while reading header / read short file / gzheader truncated

2023-12-09 Thread David Rinehart
On Sat, 2023-12-09 at 11:55 +, Stuart Henderson wrote:
> I suggest trying a mirror instead then, and see if there's any
> difference. Pick one from www.openbsd.org/ftp.html.

Good suggestion.

Recent installer changes to simplify the sets "disk" option are
awesome.  At the same time, this likely increased the number of
installations configured for cdn.openbsd.org (and maybe load on the
server).



Re: pkg_add - error while reading header / read short file / gzheader truncated

2023-12-08 Thread David Rinehart
On Fri, 2023-12-08 at 08:37 +, Stuart Henderson wrote:
> On 2023-12-07, David Rinehart  wrote:
> > 
> > I see the same with multiple installs - Started with 7.4.  No
> > modification to default installurl.
> 
> The contents of the 'default' installurl depend on whuch mirror you
> selected to install from.
> 

I select "disk" for file sets and do not recall selecting a mirror.  I
believe this puts https://cdn.openbsd.org/pub/OpenBSD in the file.

The issue may have started before 7.4, but was not seen at 7.3 release
timeframe.

After giving it more thought, I believe I started seeing errors on
package installation before 7.4 release.  I figured it was a web site
issue because I'm running -stable and no patches seemed related (so
more likely an external issue).  Then, the errors were familiar when I
did reinstalls with 7.4.  The errors are temporary and the package
installations will complete if run again, or maybe a couple times.

Thanks, for the reply and any help!
--
David Rinehart



Re: pkg_add - error while reading header / read short file / gzheader truncated

2023-12-07 Thread David Rinehart


I see the same with multiple installs - Started with 7.4.  No
modification to default installurl.

It is amazing - For 5 years, I never considered that pkg_add(1) could
fail (and it didn't)!  Updating my install scripts to try until the
last package add, with -l option, is confirmed.  A little concerned
that a package could be partially installed / marked manual and not
work (I think this has happened and I restarted from scratch).


On Thu, 2023-12-07 at 00:07 -0800, Joe B wrote:
> Hello Misc,
> 
> I am configuring a couple of laptops for my kids, i had installed 70
> with
> i3 and gcompris in them, its been a while since the last update so i
> decided to make a fresh install.
> 
> So I installed 74 in both of them, used the autoinstall so the
> process was
> straightforward as always, rebooted, hw_update, syspatch, everything
> as
> expected.
> 
> The problem comes when trying to install a package, i am trying just
> to of
> them: feh and gcompris, in both laptops, and i get the following
> errors,
> they are several since i do a few tries and then the problem goes and
> comes
> at different packages
> 
> pkg_add: Ustar [package name, it is different every try, meaning
> lcms2-2.15.tgz, gstreamer, libass-] [?]: Error while reading header
> https://cdn.openbsd.org/pub/OpenBSD/7.4/packages/amd64/lame-3.100p1.tgz
> :
> Read short file
> 
> My configuration are:
> 1 laptop, re0, trying pkg_add feh
> 1 laptop, iwn0, trying pkg_add gcompris
> 
> both with the same results, maybe i should try in another LAN, but
> could it
> be a problem with the CDN server ?
> 
> Thank you for your time,
> 
> --  Manuel Solis
> 
> > > 
> 
> Hello,
> 
> I'm new to openBSD about 3 days old. and I ran into the same issue as
> you. I would
> 
> pkg_add something and I kept getting the header message. someone on
> IRC helped me
> 
> Simple. change the cdn to another mirror
> 
> look at https://www.openbsd.org/faq/faq15.html#Mirror
> 
> Basically You find a mirror probably ftp like I did go to vim or nano
> /etc/installurl
> 
> delete the cdn add another mirror and re-run the pkg_add you might
> need to pkg_delete
> 
> the partial and then re-run. pkg_add After all that you might need
> pkg_add -u to see if the new mirror
> 
> fixes all the other partials
> 
> 
> Hope this helps
> 
> 
> ~ Joe B



Re: OpenBSD 7.4, iOS 15.8 - sudden defunct of WiFi

2023-11-16 Thread David Rinehart


Maybe... Is the clock set to the correct time on the iPhone?


> o I tried disabling the RPZ:
>   no luck.
> 
> o I tried loading /etc/examples/pf.conf:
>   no luck.
> 
> o I tried re-naming the WiFi and changing the wpakey:
>   no luck.
> 
> o I tried enabling and disabling encryption on my WiFi:
>   no luck.
> 
> o I tried handing out different IPs / re-enabling MAC address
>   randomization:
>   no luck.
> 
> o I tried bringing down the interface, rebooting, flushing the
>   routing table:
>   no luck.
> 
> Any suggestions, ideas, tips, either network- or  software-wise - or
> is
> this simply a hardware defect / support case for Cupertino?
> 
> Best regards.
> 



Re: "OpenBSD Doc" App idea

2023-09-08 Thread David Rinehart
After an issue with mangl, from ports, I discovered and configure man.cgi

on localhost httpd after install - works great (online or offline)!


Thanks,

David Rinehart


On 9/8/23 13:54, Amarendra Godbole wrote:
> On Fri, Sep 8, 2023 at 8:02 AM Luke Call  wrote:
>> On 2023-09-07 22:47:47+0200, Daniele B.  wrote:
>>>> I don't know if Android has a similar feature, but at least on iOS you
>>>> can save a particular website to your home as a webapp from Safari.
>>> Thanks for the answer Shokara. My initiative was to call for the development
>>> in the community of a serious app, with commands directory and full-text 
>>> search,
>>> working offline on multiple device with different screen orientation.
>>>
>>> Beside the possibility to create an home link of the online site on Android.
>>>
>> If you need full-text search from the desktop, this does the job for me.
>> I put it in my path and call the script "mank" since it resembles
>> Linux's "man -K" well enough
>> for me, and has been useful when I just know I read something but can't
>> remember where well enough to use apropos.  It is not fast.  It assumes
>> bash is installed from packages, but could easily be changed to use ksh 
>> instead.
>>
>> #!/usr/bin/env bash
>> set -eux
>> TMP=$(mktemp -t mank-tmp-output_XX)
>> nice grep -irE -C "$1" /usr/share/man/* 2>&1 > $TMP || true
>> nice grep -irE -C "$1" /usr/local/man/* 2>&1 >> $TMP || true
>> less -p "$1" $TMP
>> rm -f $TMP
>> echo $?
>>
>> I also have used wget a couple of times in the past to locally mirror
>> www.openbsd.org in case I needed something and can't get online, and
>> then one could grep that also (or use google to do a full-text online search
>> of that site), but I don't know whether that wget thing is a great idea.
> [...]
>
> Alternately, you can also clone the www repo: https://github.com/openbsd/www
>
> Thanks.
>
> -ag
>



Re: Feedback on redesigned OpenBSD.org

2023-08-10 Thread David Rinehart
Great project and introduction - I think you are on the right path!

A suggestion: Do like everyone here does with other code changes -
Work in smaller steps.

Simplify and minimize (a little more).  Do not change any
colors or images on an initial pass of the changes.  Try only changing
just the formatting, to support mobile.  Once this is done, working as 
expected and approved, then try tweaking the colors and images (if
needed).


On 8/10/23 18:02, Daniele B. wrote:
> I agree with the general thoughts around these last observations.
>
> The gui you are proposing is a little too black starting from the sidebar 
> logo and the font a little small.
> Probably is that we like blood here but not the black color. (if not in 
> night mode)
>
> Also most of us are probably affectionated to the stylished standard html gui 
> and what
> I mean with this are all the classic a and a:visited colors, the classic 
> browser font, _self on links etc
> Sometimes appears more friendly and "honest" to the user leaving or adopting 
> these stylish standards.
> The server pictures are also just a little geeky meaningful stuff.
>
> Possible sidebar logo solution: adopt the foreground color of the main 
> versioned logo (if you like that sidebar logo: it is however a repetition..); 
> fonts: under a certain screen size you can adopt a vw sized font, and over a 
> certain screen size a general px sized font, it is a trick commonly used by 
> me in my web apps.
>
> -- Daniele Bonini
>
> Aug 11, 2023 02:10:52 Matthew Ernisse :
>
>> The dark mode link colors are way too dark, especially in the case of
>> previously visited links.  They are nearly unreadable.  I have not looked at 
>> light mode -- I don't use it.
>>
>> I don't know if it is font sizes or paddings but the index.html sidebar
>> links feel cramped.  One would imagine having a hard time tapping on them on 
>> mobile if one were inclined to such a thing.  In fact I that comparing the 
>> versions side by side, all the font sizes are too small.
>>
>> I don't think removing the text-decoration: underline from links has served 
>> a purpose.  If anything it makes it less usable.  There are these random 
>> cases where you have blue mono-spaced fonts for some reason and it's not 
>> immediatly obvious to me if the color is supposed to indicate a clickable 
>> link or if the color + font change is supposed to indicate something else.



DIY - APU2 - eSATA

2023-03-05 Thread David Rinehart
Parts purchased online:
- SATA 7Pin Female to 7pin Male 90 Degree Angled Adapter
- 18in 1 Port SATA to eSATA Plate Adapter

I put electrical tape over the 90 degree adapter, to avoid contact with
the case.
Used the original plate as a template to mark holes in left side of the
case.

Drilled 4 holes - 2 for the screws, 2 for slot and used a Dremel to cut
the slot between.

With 3.5 in. SATA II enclosure, seeing about 30% increased throughput as
compared to the
same disk connected to USB.

Nice, relatively easy, way to set up an APU2 external drive...

-

David Rinehart



xsnow bitmap include in base?

2023-02-11 Thread David Rinehart
Hello All,


After 7.2  install, I see this include file:

    /usr/X11R6/include/X11/bitmaps/xsnow

Just curious - With xsnow removed, is this file used for anything?


Best regards,

-- 
David Rinehart



httpd(8) - Cross-Origin Resource Sharing (CORS) header

2022-06-26 Thread David Rinehart
Hello All,

Is there a way to add a CORS header to httpd(8) responses for static
content?

Here is a summary of the issue:
    Client request -> httpd Server1
    Server1 response ->  Client
    Client jS xmlhttprequest for static content -> httpd Server2
    Server2 response -> Client
    CORS block, due to missing CORS header in Server2 response

I have not found a way to add the CORS header value for static content
from httpd(8).  Am I missing something here?

To work around this, I have created CGI to add the header and return the
file contents.  The CGI script does not add much value.

I believe relayd(8) could add the header.  This solution would add a
layer of complexity that I prefer to avoid.

Both of these solutions add complexity that would be avoided entirely if
httpd(8) could be configured to add the CORS header.

I see three options:
    1. Create a diff that adds a server CORS property to httpd.conf(5).
    2. Create a diff that adds generic header NVPs to httpd.conf(5).
    3. Create a local patch to hard code the header, along with existing
headers.

If there is not an existing solution, is there any interest in adding
the CORS header as a feature of httpd(8)?

Thanks,
--
David Rinehart



Re: Howto do "a detailed cleanup with the aid of the sysclean package"?

2022-05-05 Thread David Rinehart
To Nobody in particular:


Confucius is attributed with stating: "The beginning of wisdom is to
call things by their proper name"


I suggest that "sysclean" is not the name of the code inside this utility.


The sysupgrade utility actually upgrades my system and fw_update updates
my firmware.  sysclean does not clean anything - it makes suggestions
for a specific type of user (not really all users).  It may have
aspirations of sysclean(ing), but it is not there today and maybe should
have a different name.  Based on this conversation thread, any
suggestion I might make would sound humorous, so I will defer possible
names to others more invested in the code


The sysupgrade utility has different modes of operation with the -s
option.  Maybe the final sysclean will have a similar option?


I do not use sysclean.  After reading this thread it appears I am
correct to not use it because I'm not running from snapshots (and don't
have as much to clean).  When hearing discussion about sysclean I felt
like an outsider for not using it, along with sysupgrade.  Now, I better
understand sysclean's intended purpose.


Clearly sysclean is a difficult task and if anyone could produce a
version I would use (some day) it would be this group!


0.02 - Thanks for reading


On 5/4/22 07:36, Theo de Raadt wrote:
> Sebastien Marie  wrote:
>
>> a package could use old libraries, and such libraries will not be listed by 
>> sysclean.
> the sysclean manual page claims that it correctly identifies "obsolete
> filenames".
>
> Obsolete, adj.
>
> 1.no longer produced or used; out of date.
>
> But this is innaccurate.  By your own admission, the test it performs to
> decide on whether a file is "not used" is flawed.
>
> Yet, people continue to use rm.
>
>> yes it will. but as sysclean only inspects files under directories 
>> controlled by 
>> the admin, it means that the administrator created such files and so they 
>> know 
>> what it is doing.
> The "controlled by admin" file does not exist by default, so normally this
> will look in a lot of system locations, and falsely identify unused files.
>
> Let me be clear: the program is lying to the user.  It is documented vaguely
> to hide that what the program does is not truthful.  It says "obsolete" all
> over the place, but no actual test for that condition is performed.
>
>>> And then someone will rm -f `sysclean`.
>> sysclean isn't designed for such usage.
> Yet, that is precisely what numerous people have done.
>
>> I could saying the same about 'ls'. Someone will rm -f `ls` and a file named 
>> "/somewhere/matchingpattern/\n/etc/spwd.db" will do bad thing.
> Yet, noone is doing that.
>
>> Should we add -0 to ls ? or remove it because of possible stupid usage ?
>>  
>>> I think sysclean is below the normal standard for our group.
>> Yes. ls too. it could hurt users which might call rm -f `ls`. 
>
> Clear you don't care that people are getting hurt by this code you wrote.
>



Re: Font Path prompt in pkg_add

2022-04-28 Thread David Rinehart


Changelog (just the facts - Awesome!):

    https://www.openbsd.org/plus71.html


A search for "font" on the page shows 3 entries...


On 4/28/22 12:37, Christopher Turkel wrote:
> I'm on OpenBSD AMD64 7.1, fresh install
> I noticed when adding fonts via pkg_add it no longer prints out "You may
> wish to" after installation is finished.
>
> is this a bug, or a feature?



Re: OpenBSD Home Server + Workstation on same machine?

2022-03-23 Thread David Rinehart
On 3/21/22 20:22, Eric Thomas wrote:
> Hello,
>
> I'd like to learn about secure networking (PKI, x509 certs, DNS, IPS, etc.)
> and generally
> harden my home network using OpenBSD. Can I use OpenBSD services AND have
> it act as a desktop workstation on the same machine?
>
> Ref:
> https://superuser.com/questions/1712101/openbsd-home-server-workstation-on-same-machine
>
> Thanks,
> Eric

Secure networking - Consideration: Defense in depth - If your services machine 
is compromised, what will be exposed?

A server machine and a desktop machine are different roles, with different 
requirements.  Mixing both in one machine can be done but you may not learn as 
much.

I sent a message to the list in December describing my approach (covering 3 
years) - May be interesting reading:

https://marc.info/?l=openbsd-misc=164058491013379=2




Re: Please put vi in base

2022-03-12 Thread David Rinehart
On 3/12/22 08:39, i...@tutanota.com wrote:
> I know I am not going to get any points for this, but I had to fix a broken 
> OpenBSD box today that could not boot and I didn't have any network for a 
> couple of hours, which made me stuck with ed from the boot media.
>
> So I did "man ed", which of course didn't work as there are no man pages on 
> the install media.
>
> I know how to use vi, but ed just draws the line. We're not dealing with 
> printer output any longer.
>
> Could we please get vi into base? Even the most basic version would do.
>
> I spend hours wasting time, banging my head into the wall. Until I finally 
> got network up on another machine and figured out a way to mount another 
> OpenBSD disk in order to get access to vi in order to edit the files on the 
> broken box.
>
> Sigh!
>
The issue should repairable from single-user mode (without a need for
install media):


# Once you're at a single-user prompt (just hit Enter at the "Enter
pathname of shell or RETURN for sh:" prompt), do the following:

# Mount the root filesystem as read-write, then mount the /var and /usr
filesystems (this will allow you to run vi or any other editor of your
choice)

mount -uw /
mount /var
mount /usr

export TERM=vt220

# Once those are mounted, edit /etc/fstab.



dmesg: Compulab Fitlet2 + FC-M2LAN FACET card

2022-01-15 Thread David Rinehart
FC-M2LAN adds two 1G LAN ports, for a total of four network ports.


Observation: Base ports are em1 & em2, add-on ports are em0 & em3.

---

OpenBSD 7.0 (GENERIC.MP) #3: Wed Dec 15 13:14:26 MST 2021
   
r...@syspatch-70-amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8387846144 (7999MB)
avail mem = 8117592064 (7741MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 3.0 @ 0x7a036000 (67 entries)
bios0: vendor American Megatrends Inc. version "FLT2.0.46.02.01" date
03/07/2021
bios0: Compulab fitlet2
acpi0 at bios0: ACPI 6.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP FPDT FIDT MCFG PSDS DBG2 DBGP HPET LPIT APIC
NPKT PRAM WSMT SSDT SSDT SSDT SSDT SSDT SSDT SSDT UEFI BGRT
acpi0: wakeup devices HDAS(S3) XHC_(S4) XDCI(S4) BRCM(S0) RP01(S4)
PXSX(S4) RP02(S4) PXSX(S4) RP03(S4) PXSX(S4) RP04(S4) PXSX(S4) RP05(S4)
PXSX(S4) RP06(S4) PXSX(S4) [...]
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimcfg0 at acpi0
acpimcfg0: addr 0xe000, bus 0-255
acpihpet0 at acpi0: 1920 Hz
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Atom(TM) Processor E3950 @ 1.60GHz, 1596.32 MHz, 06-5c-09
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,MD_CLEAR,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu0: 1MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 19MHz
cpu1 at mainbus0: apid 2 (application processor)
cpu1: Intel(R) Atom(TM) Processor E3950 @ 1.60GHz, 1596.32 MHz, 06-5c-09
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,MD_CLEAR,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu1: 1MB 64b/line 16-way L2 cache
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Atom(TM) Processor E3950 @ 1.60GHz, 1596.33 MHz, 06-5c-09
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,MD_CLEAR,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu2: 1MB 64b/line 16-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 6 (application processor)
cpu3: Intel(R) Atom(TM) Processor E3950 @ 1.60GHz, 1596.32 MHz, 06-5c-09
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,DS-CPL,VMX,EST,TM2,SSSE3,SDBG,CX16,xTPR,PDCM,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,SMEP,ERMS,MPX,RDSEED,SMAP,CLFLUSHOPT,PT,SHA,MD_CLEAR,IBRS,IBPB,STIBP,SENSOR,ARAT,XSAVEOPT,XSAVEC,XGETBV1,XSAVES
cpu3: 1MB 64b/line 16-way L2 cache
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec0, version 20, 120 pins
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (RP01)
acpiprt2 at acpi0: bus -1 (RP02)
acpiprt3 at acpi0: bus 1 (RP03)
acpiprt4 at acpi0: bus 2 (RP04)
acpiprt5 at acpi0: bus 3 (RP05)
acpiprt6 at acpi0: bus 4 (RP06)
acpiec0 at acpi0: not present
acpipci0 at acpi0 PCI0: 0x 0x0011 0x0001
"INT3512" at acpi0 not configured
"INT3511" at acpi0 not configured
acpicmos0 at acpi0
acpibtn0 at acpi0: PWRB
aplgpio0 at acpi0 GPO0 uid 1 addr 0xd0c5/0x76c irq 14, 78 pins
aplgpio1 at acpi0 GPO1 uid 2 addr 0xd0c4/0x764 irq 14, 77 pins
aplgpio2 at acpi0 GPO2 uid 3 addr 0xd0c7/0x674 irq 14, 47 pins
aplgpio3 at acpi0 GPO3 uid 4 addr 0xd0c0/0x654 irq 14, 43 pins
"INT34D2" at acpi0 not configured
"INT33A1" at acpi0 not configured
"PNP0C0B" at acpi0 not configured
acpicpu0 at acpi0: C3(10@150 io@0x419), C2(10@50 io@0x415), C1(1000@1
halt), PSS
acpicpu1 at acpi0: C3(10@150 io@0x419), C2(10@50 io@0x415), C1(1000@1
halt), PSS
acpicpu2 at acpi0: C3(10@150 io@0x419), C2(10@50 io@0x415), C1(1000@1
halt), PSS
acpicpu3 at acpi0: C3(10@150 io@0x419), C2(10@50 io@0x415), C1(1000@1
halt), PSS
acpipwrres0 at acpi0: FN00, resource for FAN0
acpitz0 at acpi0: critical temperature is 125 degC
acpivideo0 at acpi0: 

I did not realize I was an OpenBSD user!

2021-12-26 Thread David Rinehart
A long read, but may be interesting...

I Wanted to get into a nix OS at home, after being away for many 
years. Researched a short list of nix OSs. To be honest, OpenBSD was at 
the bottom of the list due to text install and what seemed like a 
limited list of ports. Tried the others. If I got an install I liked, 
they all failed on updates with various script errors. I can 
troubleshoot and fix script errors - the point is I want to spend time 
working on my code. I was down to my last option - OpenBSD.

I'd been watching CDE progress to open source - Fond memories of a Sun / 
Solaris / CDE environment. When CDE / MWM did go open source, OpenBSD 
was supported. I did the OpenBSD / CDE install on my desktop at the end 
of 2018 and it has been great. I've since moved on to a more modern 
window manager but CDE got my foot in the door.

When it came time to update to a new OpenBSD version I did a clean 
install and started scripting my custom changes. From long ago, I prefer 
not to upgrade in place, due to the cruft. Sure I could figure out a way 
to analyze what is not needed but why bother. The OpenBSD install is so 
simple and fast. I install, run a script to configure and then have a 
shiny new machine. For small server roles, it takes 15-20 minutes to 
reinstall. Desktop machines take an hour or so, due to ports installs. 
With other OSs it would take several days to reinstall my desktop, 
including base system, latest drivers, GUI apps and then customizing all 
the settings. Scripting configuration and package installs is so much 
simpler.

Then, I replaced my DNS / DHCP / NTP / Web server with OpenBSD. At this 
point, I started going fanless for new machines - APU2D4 (now APU2E4) is 
more than needed but provides headroom for the future. I studied and 
configured unbound and it has been so stable. I've had a home web server 
for years which migrated from PERL to C# to C++ and from plain HTML to 
Angular with JQuery Mobile. I migrated this code to run with httpd 
slowcgi (sort of like a poor man's serverless config - perfect for home 
use).

Next, I had several off the shelf systems I wanted to replace - 
Multi-room audio, NAS, VPN Router, Wifi AP.  I estimated the lines of
code running on my existing home network and the numbers were crazy.

For multi-room audio, I set up a proof of concept with some old 
computers and configured mpd to use sndio. It worked great. I purchased 
several more APU2D4 machines and USB Behringer UCA202 DACs for the 
audio. I created C++ microservices to run with httpd slowcgi and build / 
send mpc commands to control mpd. Simple, no library dependencies and 
easy to update / test. Maybe someday I'll change the interface but this 
has been working well. For UI, I created a page to select a room and 
send commands. Wanting a single volume control, I opted to expose master 
volume (rather than mpd volume). I needed to select music, so I created 
another page to access music data. I'm only really interested in 
playlists, artists, genres and songs, so I provided these in the song UI 
and allow adding to the queue of whatever room is currently selected. 
Each room can operate independently or output to multiple rooms.

>From the beginning I have used amd to mount NAS NFS shares. Tweaked the 
mount_nfs parameters to get better throughput - It is great.

With the concept of rooms on the web page, I added more remote control 
features. I control all infrared home audio and video devices with IP2IR 
from Global Cache. Used to have an app (that had issues) - replaced it 
with my web page. Then, added control of a home theater receiver using 
it's REST API.

In my spare time, I had created a mobile first remote control for the 
whole home audio and video. Put all the remotes in a drawer. With one 
web page, it works across-platforms on any device with a browser (all 
types of phones, desktops, tablets) with zero install. The page 
refreshes when others make changes, so there are no issues with synch 
across clients.

With a few nodes on my network, I wanted to see status over time. I used 
d3js to create a network diagram web page. Added an APU2 machine to the 
network for running cron jobs. Added a script to create SVGs for CPU, 
memory, network and disk from symux RRD files. Now click a node in the 
diagram and see the machine stats. I can change the time reference for 
the last 24 hours, 7 days, 30 days or year. The SVG charts are built on 
a schedule, based on priority of the machines. It is incredible to have 
this visibility. Always wanted to monitor my network over time but did 
not have the tools.

Next, with some experience and confidence with OpenBSD, I replaced the 
VPN router with an APU2 gateway. Simple install with pf and more stats 
for the network diagram.

Auto-update - at this point, I created cron jobs to update all machines 
during off-hours. I don't notice the updates unless I look at uptime on 
the machines.

I bought two more APU2 machines and configured