Split Audio Files into Parts

I recently got in the need of splitting quite large amount of audio files into smaller equal parts. The first thought that came to my mind was – probably thousand or more people had similar problem in the past so its already solved – so I went directly to the web search engine.

The found solutions seem not that great or work partially only … or not work like I expected them to work. After looking at one of the possible solutions in a bash(1) script I started to modify it … but it turned out that writing my own solution was faster and easier … and simpler.

Today I will share with you my solution to automatically split audio files into small equal parts.

Existing Solutions

In my search for existing solutions I indeed found some tools that will allow me to achieve what I need. I will not try to talk them one after another.

mp3splt

The first one I found was the audio/mp3splt port (and package) available on FreeBSD. So I installed it with typical pkg(8) command as shown below.

# pkg install mp3splt

It installed properly … but returned Segmentation Fault instead of actually working. I even submitted a PR for that in the FreeBSD Bugzilla – 264866 – but no update till now.

Thus I removed that package and went to search for something that works.

Brasero

Someone on some forum suggested using CD/DVD burning software – Brasero – because one of its features is audio splitting – so I installed the sysutils/brasero package now.

# pkg install brasero

It turns out that it really works. Some screenshots below.

brasero.1

brasero.2

… but that did not satisfied my because I wanted an automated/unattended solution instead of ‘clicking’ each file separately to split them. I also did liked the fact that I needed to specify time in seconds.

mp3split

Do not confuse with mentioned earlier mp3splt command. The mp3split is a unattended one created in a bash(1) script – https://diegosanchezp.github.io/blog/mp3split/ – available and described here. One of its downsides (for me) was that it needed additional external ‘list’ file with times and titles for the parts.

I did not wanted to write this each time so I generated a long enough list file that will cover any possible file no matter the length with the following loop.

% seq 0 10 10000 \
    | while read MIN
      do
        seq 0 10 50 \
          | while read SEC
            do
              echo ${MIN}:${SEC}
            done
      done > list.txt

% head list.txt
0:0
0:10
0:20
0:30
0:40
0:50
10:0
10:10
10:20
10:30

I needed to split these audio files every 10 minutes. I redirected that output into the list.txt file. I then fetched and made executable the mentioned mp3split script.

% fetch https://raw.githubusercontent.com/diegosanchezp/mp3split/master/mp3split.sh

% chmod +x mp3split.sh

% ./mp3split.sh --help
zsh: ./mp3split.sh: bad interpreter: /bin/bash: no such file or directory

% head -1 ./mp3split.sh
#!/bin/bash

So now we will have to remove linuxisms from the script. Lets hope its only the interpreter part.

% head -1 ./mp3split.sh
#! /usr/bin/env bash

% ./mp3split.sh --help
./mp3split.sh: illegal option -- -
Invalid option: -
Usage:
  mp3split [OPTIONS] inputaudio tracklist
Options:
  -s: do a simulation without writing anything to disk
  -h: print this help
  -e extension: set output extension, if extension is equal to "" keep extension of input file
  The script will output all the splitted files in the
  current/working directory.


Better. Lets try to use it.

% ./mp3split.sh LARGE-AUDIO-FILE.mp3 list.txt

=== Begin to create mp3 split files ===
0:0.mp3: Protocol not found
Processed 0:0 to 0:10; 0:0.mp3
0:10.mp3: Protocol not found
Processed 0:10 to 0:20; 0:10.mp3
0:20.mp3: Protocol not found
Processed 0:20 to 0:30; 0:20.mp3
0:30.mp3: Protocol not found
Processed 0:30 to 0:40; 0:30.mp3
0:40.mp3: Protocol not found
Processed 0:40 to 0:50; 0:40.mp3
0:50.mp3: Protocol not found
Processed 0:50 to 10:0; 0:50.mp3
10:0.mp3: Protocol not found
Processed 10:0 to 10:10; 10:0.mp3
10:10.mp3: Protocol not found
Processed 10:10 to 10:20; 10:10.mp3
10:20.mp3: Protocol not found
Processed 10:20 to 10:30; 10:20.mp3
10:30.mp3: Protocol not found
Processed 10:30 to 10:40; 10:30.mp3
10:40.mp3: Protocol not found
Processed 10:40 to 10:50; 10:40.mp3
10:50.mp3: Protocol not found
Processed 10:50 to 20:0; 10:50.mp3
20:0.mp3: Protocol not found
Processed 20:0 to 20:10; 20:0.mp3
20:10.mp3: Protocol not found
Processed 20:10 to 20:20; 20:10.mp3
20:20.mp3: Protocol not found
Processed 20:20 to 20:30; 20:20.mp3
^C

Some strange error message Protocol not found … after small investigation it turns out that two characters fix for the ffmpeg(1) command will do. The diff(1) is available below.

% diff -u mp3split.sh mp3split.sh.FIXED.sh
--- mp3split.sh 2022-06-25 22:34:25.499718000 +0200
+++ mp3split.sh.FIXED.sh        2022-06-25 22:37:45.580845000 +0200
@@ -25,7 +25,7 @@
   outfile="$tracktitle.$ext"

   # Begin splitting files with ffmpeg
-  [ ! "$simulate" = true ] && ffmpeg -nostdin -y -loglevel error -i "$inputaudio" -ss "$start" -to "$end" -acodec copy "$outfile"
+  [ ! "$simulate" = true ] && ffmpeg -nostdin -y -loglevel error -i "$inputaudio" -ss "$start" -to "$end" -acodec copy ./"$outfile"

   echo "Processed $start to $end; $outfile"
 }

Now lets try to use the fixed version.

% ./mp3split.sh.FIXED.sh LARGE-AUDIO-FILE.mp3 list.txt

=== Begin to create mp3 split files ===
Processed 0:0 to 0:10; 0:0.mp3
Processed 0:10 to 0:20; 0:10.mp3
Processed 0:20 to 0:30; 0:20.mp3
Processed 0:30 to 0:40; 0:30.mp3
Processed 0:40 to 0:50; 0:40.mp3
Processed 0:50 to 10:0; 0:50.mp3
Processed 10:0 to 10:10; 10:0.mp3
Processed 10:10 to 10:20; 10:10.mp3
Processed 10:20 to 10:30; 10:20.mp3
Processed 10:30 to 10:40; 10:30.mp3
Processed 10:40 to 10:50; 10:40.mp3
Processed 10:50 to 20:0; 10:50.mp3
Processed 20:0 to 20:10; 20:0.mp3
Processed 20:10 to 20:20; 20:10.mp3
Processed 20:20 to 20:30; 20:20.mp3
Processed 20:30 to 20:40; 20:30.mp3
Processed 20:40 to 20:50; 20:40.mp3
Processed 20:50 to 30:0; 20:50.mp3
Processed 30:0 to 30:10; 30:0.mp3
Processed 30:10 to 30:20; 30:10.mp3
Processed 30:20 to 30:30; 30:20.mp3
Processed 30:30 to 30:40; 30:30.mp3
Processed 30:40 to 30:50; 30:40.mp3
Processed 30:50 to 40:0; 30:50.mp3
Processed 40:0 to 40:10; 40:0.mp3
Processed 40:10 to 40:20; 40:10.mp3
Processed 40:20 to 40:30; 40:20.mp3
Processed 40:30 to 40:40; 40:30.mp3
Processed 40:40 to 40:50; 40:40.mp3
Processed 40:50 to 50:0; 40:50.mp3
Processed 50:0 to 50:10; 50:0.mp3
Processed 50:10 to 50:20; 50:10.mp3
Processed 50:20 to 50:30; 50:20.mp3
Processed 50:30 to 50:40; 50:30.mp3
Processed 50:40 to 50:50; 50:40.mp3
Invalid duration specification for to: 60:0
Processed 50:50 to 60:0; 50:50.mp3
Invalid duration specification for ss: 60:0
Processed 60:0 to 60:10; 60:0.mp3
Invalid duration specification for ss: 60:10
Processed 60:10 to 60:20; 60:10.mp3
Invalid duration specification for ss: 60:20
Processed 60:20 to 60:30; 60:20.mp3
Invalid duration specification for ss: 60:30
Processed 60:30 to 60:40; 60:30.mp3
Invalid duration specification for ss: 60:40
Processed 60:40 to 60:50; 60:40.mp3
Invalid duration specification for ss: 60:50
Processed 60:50 to 70:0; 60:50.mp3
Invalid duration specification for ss: 70:0
Processed 70:0 to 70:10; 70:0.mp3
Invalid duration specification for ss: 70:10
Processed 70:10 to 70:20; 70:10.mp3
^C

Great … so after the file ended it will still try EVERY goddamn position from the list.txt file. It was also not able to reach the final ‘ending’ part without ‘visiting’ each time from the list.txt file. Enough is enough. I tried.

Custom Script Solution

After trying to modify the mp3split script even more I came to the conclusion that it will take less time to write my own solution from scratch … and this is exactly what I did. I wrote the audio-split.sh in POSIX /bin/sh interpreter for portability. After an hour later 50 lines of code did exactly what I needed – not counting the __usage() function for help information.

code

Here is the __usage() contents by the way.

help

The idea/needs were:

  • split large file automatically/unattended into equal parts
  • create new dir in which these parts are created
  • new dir must have same name as specified file (without extension)
  • each part will get a ' - xxx' suffix (like ' - 001' for first part) with original extension

… and they were met.

Here is the output of running audio-split.sh command.

% ffmpeg -i LARGE-AUDIO-FILE.mp3 2>&1 | grep Duration
  Duration: 00:44:55.99, start: 0.025057, bitrate: 171 kb/s

% audio-split.sh 10 LARGE-AUDIO-FILE.mp3
LARGE-AUDIO-FILE/LARGE-AUDIO-FILE - 001.mp3
LARGE-AUDIO-FILE/LARGE-AUDIO-FILE - 002.mp3
LARGE-AUDIO-FILE/LARGE-AUDIO-FILE - 003.mp3
LARGE-AUDIO-FILE/LARGE-AUDIO-FILE - 004.mp3
LARGE-AUDIO-FILE/LARGE-AUDIO-FILE - 005.mp3

% du -sm LARGE-AUDIO-FILE.mp3
56      LARGE-AUDIO-FILE.mp3

% du -smc LARGE-AUDIO-FILE/*
13      LARGE-AUDIO-FILE/LARGE-AUDIO-FILE - 001.mp3
13      LARGE-AUDIO-FILE/LARGE-AUDIO-FILE - 002.mp3
13      LARGE-AUDIO-FILE/LARGE-AUDIO-FILE - 003.mp3
13      LARGE-AUDIO-FILE/LARGE-AUDIO-FILE - 004.mp3
7       LARGE-AUDIO-FILE/LARGE-AUDIO-FILE - 005.mp3
56      total

The total size is the same (or similar in larger files). After listening to the parts I came to the conclusion that it works properly. The audio file is about 45 minutes long and the script created 4 10 minutes long files and 1 that is less then 5 minutes. Not sure if you also have such needs but if yes then you may now use another solution – audio-split.sh – for it πŸ™‚

EOF

Valuable News – 2022/06/20

The Valuable News weekly series is dedicated to provide summary about news, articles and other interesting stuff mostly but not always related to the UNIX or BSD systems. Whenever I stumble upon something worth mentioning on the Internet I just put it here.

Today the amount information that we get using various information streams is at massive overload. Thus one needs to focus only on what is important without the need to grep(1) the Internet everyday. Hence the idea of providing such information ‘bulk’ as I already do that grep(1).

UNIX

Demonstration of FreeBSD Boot Time Performance for 12.1/12.2/12.3/13.0/13.1 Releases.
https://twitter.com/ed_maste/status/1536528750212521987

FreeBSD User Video Magazine #0.
https://www.youtube.com/watch?v=PCzD8N-TUjk

Cool Beans – 5 Java Goodies on FreeBSD.
https://www.youtube.com/watch?v=NXf0QFMV4cc

KDE Plasma 5.25 New Looks.
https://kde.org/announcements/plasma/5/5.25.0/

Linux Containers Run on FreeBSD.
https://github.com/containerd/containerd/pull/7000

Using Netgraph for FreeBSD Bhyve Networking.
https://klarasystems.com/articles/using-netgraph-for-freebsds-bhyve-networking/

What is GhostBSD Like? Is It for You?
https://www.youtube.com/watch?v=EwKZ6it4U8Q

GhostBSD 22.04 Review.
https://www.youtube.com/watch?v=xwyYTAYg4ws

Citus – Distributed PostgreSQL Database Extension – Makes Enterprise Features Open Source.
https://github.com/citusdata/citus/commit/184c7c0bce6b7bca61d25b828855fac5fba64816

FreeBSD Developers Continue Work on Shortening Boot Time and Improving WiFi.
https://www.phoronix.com/scan.php?page=news_item&px=FreeBSD-Q1-2022-Status

FreeBSD CheatSheet.
https://www.cambus.net/freebsd-cheatsheet/

CVE-2022-23088 – Exploiting Heap Overflow in FreeBSD WiFi Stack.
https://www.zerodayinitiative.com/blog/2022/6/15/cve-2022-23088-exploiting-a-heap-overflow-in-the-freebsd-wi-fi-stack

Modos Paper Laptop.
https://www.modos.tech/blog/modos-paper-laptop

BSD Now 459 – NetBSD Kernel Benchmark.
https://www.bsdnow.tv/459

GhostBSD 22.06.15 ISO is Now Available.
https://www.ghostbsd.org/22.06.15_iso_is_now_available

In Other BSDs for 2022/06/18.
https://www.dragonflydigest.com/2022/06/18/27050.html

Journey into FreeBSD.
https://cyberprawn.net/index.php/2022/06/16/journey-into-freebsd/

Help Us Celebrate FreeBSD Day All Week Long.
https://freebsdfoundation.org/blog/help-us-celebrate-freebsd-day-all-week-long/

The rsync(1) Article 1: Scenarios.
https://michael.stapelberg.ch/posts/2022-06-18-rsync-article-1-scenarios/

GhostBSD 22.06.15 Released – FreeBSD Distribution.
https://meterpreter.org/ghostbsd/

Is FreeBSD a Real UNIX?
https://vermaden.wordpress.com/2022/06/19/is-freebsd-a-real-unix/

FreeBSD Adds Comprehensive UFS/FFS Superblock Integrity Checks When Reading Superblock.
https://cgit.freebsd.org/src/commit/?id=076002f24d35962f0d21f44bfddd34ee4d7f015d

Legends Start at 1.0 – FreeBSD in 1993 – Part 1.
https://eerielinux.wordpress.com/2022/06/18/legends-start-at-1-0-freebsd-in-1993-pt-1/

Hardware

Getac Introduces New X600 Fully Rugged Mobile Workstation.
https://www.techpowerup.com/295860/getac-introduces-new-x600-fully-rugged-mobile-workstation

AMIGA Tank Mouse Gets Laser Upgrade and Refurbishment.
https://lyonsden.net/amiga-tank-mouse-gets-laser-upgrade-refurbishment/

Supermicro SYS-E100-12T-H Embedded Mini PC Review.
https://www.anandtech.com/show/17424/supermicro-syse10012th-review-fanless-tiger-lake-for-embedded-applications

GEEKOM Mini IT8 Mini PC Review.
https://www.techpowerup.com/review/geekom-mini-it8-mini-pc-intel-i5/

LG Announces Pricing and Availability of DualUp Monitor.
https://www.techpowerup.com/295911/lg-announces-pricing-and-availability-of-dualup-monitor

The MonsterLabo Beast is Back.
https://www.fanlesstech.com/2022/06/the-beast-is-back.html

Other

Plans for Thunderbird on Android.
https://blog.thunderbird.net/2022/06/revealed-thunderbird-on-android-plans-k9/

Firefox Rolls Out Total Cookie Protection by Default to All Users.
https://blog.mozilla.org/en/products/firefox/firefox-rolls-out-total-cookie-protection-by-default-to-all-users-worldwide/

IPv4 Price History.
https://www.ipxo.com/blog/ipv4-price-history/

Hertzbleed Frequency Side Channel Attack in AMD/Intel CPUs.
https://www.hertzbleed.com/

Fork of Mozilla Firefox Send.
https://github.com/timvisee/send

EOF

Is FreeBSD a Real UNIX?

That question has been asked and answered many times … but the answer was not always obvious to everyone.

Also today is the FreeBSD day – FreeBSD was created exactly 29 years ago – also on 19th on June.

UNIX System

The first UNIX was the AT&T UNIX whose development started in 1969 at Bell Labs. Then AT&T licensed UNIX to outside parties in late 1970s which have life many UNIX variants like:

  • AIX from IBM
  • BSD (Berkeley Software Distribution) at University of California
  • SunOS/Solaris from Sun Microsystems
  • HP-UX from HP
  • Xenix from Microsoft

Of course AT&T also worked on UNIX and in the late 1980s jointly with Sun Microsystems they released the UNIX System V Release 4 (SVR4). Then in early 1990s the AT&T company sold its UNIX rights to Novell. Then Novell sold UNIX trademark to Open Group. This UNIX journey ends here as its Open Group ownership and they allow the use of the UNIX trademark for certified operating systems that comply with the Single UNIX Specification (SUS) (and pay $100 000 in the certification process).

BSD UNIX

The BSD UNIX had quite unusual version numbering with 1BSD, 2BSD, 3BSD for subsequent releases.

Below you will find most of them listed with some of their features.

1BSD

  • run PDP-11
  • ex(1) editor

2BSD

  • run PDP-11
  • vi(1) editor
  • C shell

3BSD

  • run VAX-11
  • DEC VT100 terminal

4BSD

  • run VAX-11
  • DARPA funding for CSRG
  • job control in C shell
  • delivermail(8) – antecedent of sendmail(8)
  • improved signals
  • Curses programming library

4.1BSD

  • performance improvements
  • on par with VMS on many benchmarks

4.2BSD

  • BBN preliminary TCP/IP implementation
  • Berkeley Fast File System
  • disk quotas
  • job control
  • run Motorola 68000
  • introduction of Daemon mascot

daemon.1983

4.3BSD

  • improved performance
  • more diverged TCP/IP implementation from BBN

4.3BSD-Reno

  • move towards POSIX compliance
  • NFS implementation
  • status key (CTRL-T)
  • run HP 9000
  • named as “Greatest Software Ever Written”

4.3BSD-Net/1

  • most standard UNIX utilities reimplemented without AT&T code
  • nvi(1) – new vi(1)
  • only few AT&T files remained in kernel

4.3BSD-Net/2

  • all AT&T standard UNIX utilities reimplemented without AT&T code
  • nearly complete operating system that was freely distributable

386BSD (sometimes also called 386/BSD)

  • run Intel 80386
  • basically 4.3BSD-Net/2 ported to x86
  • base for NetBSD
  • base for FreeBSD on 1.0-2.2.8 releases

BSD/386 (later renamed BSD/OS) by BSDi

  • legal trouble with AT&T
  • AT&T USL versus BSDi lawsuit filed against 4.3BSD-Net/2
  • from 18,000 files only 3 had to be removed and 70 modified to show AT&T USL copyright.

4.4BSD-Encumbered

  • released only to AT&T USL licensees

4.4BSD-Lite

  • no longer requires AT&T USL license
  • contained other changes over 4.4BSD-Encumbered

4.4BSD-Lite2

  • last BSD UNIX release
  • after this release CSRG was dissolved
  • FreeBSD since 3.0 also used that code

Intel/x86 Port

The 386BSD UNIX (sometimes also called 386/BSD) was port of the 4.3BSD-Net/2 UNIX to the Intel/x86 architecture. Like recently FreeBSD added support for RISC-V or ARM64. When 386BSD UNIX existed – a group of people took that code and decided that they will develop it under FreeBSD name with their our own way of doing things like serving packages etc.

As you can see the FreeBSD UNIX is – with large simplification – nothing more then 4.3BSD-Net/2 ported to the x86 architecture. But can you call it UNIX? That depends.

FreeBSD UNIX

Let me give you an example from other industry. Can you call Tesla a ‘car’? Yes. Why? Because no one has the copyright for the ‘car’ term. Now imagine this – some company owns the copyright to the ‘car’ term. Now you would not be allowed to call Tesla a ‘car’ without first asking that company for permission. Without such permission you could name Tesla only a car-like vehicle … or automobile – but not simply a ‘car’.

Lets get back to the computing world. Can you officially name FreeBSD a UNIX? No. That is because Open Group company owns copyright to the ‘UNIX’ term. You can call it only a UNIX-like system … but that does not mean its not UNIX. You just can not call it like that because of the lawyers.

NetBSD team also gave good example with their ‘duck’ explanation – https://mollari.netbsd.org/about/call-it-a-duck.html – available here.

Apple paid $100 000 to call their Mac OS X (now macOS) system a UNIX officially.

Linux UNIX

Can you call Linux a UNIX system? Depends which one πŸ™‚ Currently RHEL (Red Hat Enterprise Linux) is not a certified UNIX – Red Hat did not made the $100 000 worth official certification process with Open Group – you can not name RHEL a UNIX system … but RHEL fork can be called officially UNIX. The Inspur-UX is official UNIX because they did that $100 000 certification with Open Group. Probably because they thought that calling their RHEL fork ‘UNIX’ will make their business better.

Does it makes sense? No. But that is just business. Do not seek logic here. Money only.

Summary

Depends if you want the truth or just what the law officially allows πŸ™‚ If you want the truth then yes – FreeBSD is a UNIX system – same as NetBSD or OpenBSD for example. But if you want to obey the law then you can not name these systems UNIX.

EOF

Valuable News – 2022/06/13

The Valuable News weekly series is dedicated to provide summary about news, articles and other interesting stuff mostly but not always related to the UNIX or BSD systems. Whenever I stumble upon something worth mentioning on the Internet I just put it here.

Today the amount information that we get using various information streams is at massive overload. Thus one needs to focus only on what is important without the need to grep(1) the Internet everyday. Hence the idea of providing such information ‘bulk’ as I already do that grep(1).

UNIX

The qorg Experiences with OpenBSD.
https://qorg11.net/openbsd.xhtml

Why OpenBSD Includes Perl in Base. [2020]
https://marc.info/?l=openbsd-misc&m=159041121804486

Audio on FreeBSD – Quick Guide.
https://freebsdfoundation.org/freebsd-project/resources/audio-on-freebsd/

Hacker News – Does Anyone Here Use BSD for Their Main OS?
https://news.ycombinator.com/item?id=31639797

FreeBSD RELEASE/STABLE/CURRENT – Which is Right for You?
https://www.youtube.com/watch?v=GuuM4E3Vh7c

Dashy Helps Organize Your Self Hosted Services.
https://github.com/Lissy93/dashy

Setup Remote Desktop in FreeBSD.
https://www.jeremymorgan.com/tutorials/freebsd/how-to-remote-desktop-in-freebsd/

XigmaNAS 12.3.0.4.9073 Available.
https://sourceforge.net/projects/xigmanas/files/XigmaNAS-12.3.0.4/12.3.0.4.9073/

Useful Utilities and Services over DNS.
https://www.dns.toys/

Porting Doom to Apple A/UX.
https://katelibc.medium.com/porting-doom-to-a-ux-8cecab02b531

Add/Delete/Grant sudo(8) Privileges to Users in FreeBSD 13.
https://ostechnix.com/add-delete-and-grant-sudo-privileges-to-users-in-freebsd/

Install cgit with Gitolite and Nginx on FreeBSD 13.
https://herrbischoff.com/2021/10/how-to-install-cgit-with-gitolite-and-nginx-on-freebsd-13/

FreeBSD on EC2 Enables Ephemeral SWAP by Default.
https://cgit.freebsd.org/src/commit/?id=1d2e46d40861aff2e4f3147e7a242e7bc808978e

Backup and Restore List of Installed FreeBSD Packages.
https://www.cyberciti.biz/faq/how-to-backup-restore-a-list-of-installed-freebsd-packages/

BSD Now 458 – Traceroute interpretation.
https://www.bsdnow.tv/458

FreeBSD 2022/Q1 Quarterly Status Report.
https://www.freebsd.org/status/report-2022-01-2022-03/

OpenBSD 7.1 on PINE64 RockPro64.
https://bsandro.tech/posts/openbsd-7.1-on-pine64-rockpro64/

Reset FreeBSD root Password.
https://www.youtube.com/watch?v=4hrZTyyVwFY

FreeBSD Foundation Elects New Officers – Interviews Outgoing Board Members.
https://freebsdfoundation.org/blog/foundation-elects-new-officers-interviews-outgoing-board-members/

DragonFly 6.2.2 Out.
https://www.dragonflydigest.com/2022/06/10/27047.html

WindowMaker Theme Inspired by Windows 10.
https://www.tumfatig.net/2022/windowmaker-theme-inspired-by-windows-10/

In Other BSDs for 2022/06/11.
https://www.dragonflydigest.com/2022/06/11/27029.html

MidnightBSD 2.2 Release Notes.
https://www.midnightbsd.org/notes/

GhostBSD – Read This Before Upgrading to 22.06.07.
https://www.ghostbsd.org/before_upgrading_to_22.06.07

Worm is Tiny Dynamic Tag Based Window Manager with Floating Mode and Master Stack Support.
https://github.com/codic12/worm

The colcolor is Python Script to Colorize Command Outout.
https://github.com/eborisch/colcolor

Hardware

Aaeon AMD Ryzen V2000 Based PICO-V2K4 Pico-ITX Motherboard.
https://www.techpowerup.com/295467/aaeon-launches-amd-ryzen-v2000-based-pico-v2k4-pico-itx-motherboard

AMD Announces Genoa-X – 4th Gen EPYC with 96 Zen 4 Cores and 1GB L3 V-Cache.
https://www.anandtech.com/show/17438/amd-genoax-4th-gen-epyc-with-up-to-96-zen-4-cores-coming-in-2023

Xbox 360 Architecture.
https://www.copetti.org/writings/consoles/xbox-360/

GEEKOM MiniAir 11 Celeron N5095 Mini PC for $200 with 8GB RAM and 256GB SSD.
https://www.cnx-software.com/2022/06/13/geekom-miniair-11-celeron-n5095-mini-pc-sells-for-200-with-8gb-ram-256gb-ssd/

Other

How to Make Pixel Art – Step by Step Guide.
https://smoldungeon.com/pixel-art

Action Quake 2 (AQ2) is Fast Action Open Source FPS.
https://q2online.net/action

Windows 9x Video Minidriver HD+ for VirtualBox.
http://www.os2museum.com/wp/windows-9x-video-minidriver-hd/

Great ASCII Elements/Animations on Oxide Page.
https://oxide.computer/

If OpenSSL Were a GUI.
https://smallstep.com/blog/if-openssl-were-a-gui/

EOF

Valuable News – 2022/06/06

The Valuable News weekly series is dedicated to provide summary about news, articles and other interesting stuff mostly but not always related to the UNIX or BSD systems. Whenever I stumble upon something worth mentioning on the Internet I just put it here.

Today the amount information that we get using various information streams is at massive overload. Thus one needs to focus only on what is important without the need to grep(1) the Internet everyday. Hence the idea of providing such information ‘bulk’ as I already do that grep(1).

UNIX

Step by Step Guide to Upgrade to FreeBSD 13.1 from FreeBSD 12.x.
https://ostechnix.com/how-to-upgrade-to-freebsd-13-from-freebsd-12/

FreeBSD Adds zpoolreguid Script to the rc(8) Subsystem.
https://cgit.freebsd.org/src/commit/?id=227caacc918a8c9b32608cff42116e7d890b9ddc

Compiling NetBSD Kernel as Benchmark.
https://blog.anotherhomepage.org/post/2022/05/25/Compiling-the-NetBSD-kernel-as-a-benchmark/

Klara Systems – Managing Boot Environments.
https://klarasystems.com/articles/managing-boot-environments/

OpenBSD Performance Test with SMT Enabled or Disabled.
https://www.youtube.com/watch?v=whtOXx1rYgc

FreeBSD 13.1 Review – Future Looking Great for BSD.
https://www.youtube.com/watch?v=7ppuGzp8ZoE

Graham TWM Page 2.
http://www.custompc.plus.com/twm2/Grahams_TWM_page2.html

FreeBSD Preview for Ten64!
https://forum.traverse.com.au/t/freebsd-preview-for-ten64/173

Fix CVE-2022-23088 Heap Based Buffer Overflow Vulnerability in FreeBSD.
https://thesecmaster.com/how-to-fix-cve-2022-23088-a-heap-based-buffer-overflow-vulnerability-in-freebsd/

Give WindowMaker macOS Mojave Look.
https://www.tumfatig.net/2022/give-windowmaker-a-macos-mojave-look/

I am Decade Late to Printing Game.
https://jrgsystems.com/posts/2022-06-01-ten-years-late-to-printer/

Blender Interested in Supporting FreeBSD – Developers Needed!
https://forums.freebsd.org/threads/blender-is-interested-in-supporting-freebsd-developers-needed.85346/

How Fast Are Linux Pipes Anyway?
https://mazzo.li/posts/fast-pipes.html

BSD Now 457 – NetBSD Wheelbarrow.
https://www.bsdnow.tv/457

By the Way – Kubernetes for FreeBSD.
https://medium.com/@norlin.t/by-the-way-kubernetes-for-freebsd-d0ba4dab8d8e

State of Drivers in Install ISO Between Windows 11/Linux/BSD for 2020 Laptops.
https://news.ycombinator.com/item?id=31598571

Minecraft Server on OpenBSD.
https://dataswamp.org/~rjc/running_minecraft_server_on_openbsd.html

HardenedBSD 2022/05 Status Report.
https://hardenedbsd.org/article/shawn-webb/2022-06-01/hardenedbsd-may-2022-status-report

Linux is Native to PC and FreeBSD is Not?
https://rubenerd.com/linux-is-native-to-the-pc-freebsd-isnt/

In Other BSDs for 2022/06/04.
https://www.dragonflydigest.com/2022/06/04/26973.html

7 Human Benefits of FreeBSD – Vocal Essay.
https://www.youtube.com/watch?v=hPJUBgrBGWY

Hardware

Disable WiFi on Samsung Fridge.
https://eattherich.club/@swaggboi/108382897807037127

Add Two 13.3 Monitors to Any Laptop with Single USB Cable.
https://www.portabl.com/

Destination 30 TB – HDD Vendors Plan Different Routes to Hit Storage Milestone in 2023.
https://www.anandtech.com/show/17419/destination-30-tb-hdd-vendors-planning-for-2023

Orange Pi 800 Keyboard PC Powered by Rockchip RK3399.
https://www.cnx-software.com/2022/06/04/orange-pi-800-raspberry-pi-400-keyboard-pc-alternative-rockchip-rk3399/

Life

OCEAN Software Co-Founder Dies at 75.
https://www.geeksaresexy.net/2022/05/10/ocean-software-co-founder-dies/

Great Employees Do Not Complain – They Walk Away.
https://www.linkedin.com/pulse/great-employees-dont-complain-walk-away-ian-daley/

Its Nice to Be Important – But Its More Important to Be Nice.
https://www.linkedin.com/pulse/its-nice-important-more-brigette-hyacinth/

Other

Is Firefox OK?
https://arstechnica.com/gadgets/2022/02/is-firefox-ok/

If Kubernetes is Solution – Why Are There So Many DevOps Jobs?
https://news.ycombinator.com/item?id=31580763

Canon EF Lens Mount for Game Boy Camera.
http://ekeler.com/game-boy-camera-canon-ef-mount

EOF

Valuable News – 2022/05/30

The Valuable News weekly series is dedicated to provide summary about news, articles and other interesting stuff mostly but not always related to the UNIX or BSD systems. Whenever I stumble upon something worth mentioning on the Internet I just put it here.

Today the amount information that we get using various information streams is at massive overload. Thus one needs to focus only on what is important without the need to grep(1) the Internet everyday. Hence the idea of providing such information ‘bulk’ as I already do that grep(1).

UNIX

Making Splash in FreeBSD – Video Request.
https://www.youtube.com/watch?v=hd_LUxpPers

Speed Daemon – Quick Overview of FreeBSD 13.1.
https://www.youtube.com/watch?v=kYyFAe5J9Zs

FreeBSD on Graviton 3.
https://www.daemonology.net/blog/2022-05-23-FreeBSD-Graviton-3.html

BastilleBSD Upgrade and Downgrade Procedures.
https://gist.github.com/cedwards/1e00c3d0aa6fbb14bc5b16fca8df0c35

Running Solaris 11.4 CBE as QEMU/NVMM Guest on NetBSD.
https://retrobsd.ddns.net/s2dwt9.htm

Using pkgsrc on Solaris 11.4 CBE.
https://retrobsd.ddns.net/dxta77.htm

FreeBSD Just Landed LLVM/Clang 14.
https://twitter.com/FreeBSDHelp/status/1529262415011278849

OpenZFS Native Encryption – Differences Between GELI and OpenZFS Encryption.
https://klarasystems.com/articles/openzfs-native-encryption/

Solaris Doors IPC Mechanism Implementation for FreeBSD.
https://twitter.com/FreeBSDHelp/status/1529743196561227778

Welcome FreeBSD Participants of Google Summer of Code 2022.
https://freebsdfoundation.org/blog/welcome-freebsd-google-summer-of-code-participants/

FreeBSD Foundation Work in FreeBSD 13.1-RELEASE.
https://freebsdfoundation.org/blog/freebsd-foundation-work-in-the-13-1-release/

BSD Now 456 – FreeBSD 13.1.
https://www.bsdnow.tv/456

Unix Command Line Conventions Over Time.
https://blog.liw.fi/posts/2022/05/07/unix-cli/

New FreeBSD Core Elected.
https://twitter.com/FreeBSDHelp/status/1529994505713500160

Homebridge Open Source HomeKit Platform Added FreeBSD Support.
https://github.com/oznu/homebridge-config-ui-x/releases/tag/4.46.0

New FreeBSD pkg(8) Release from 1.18.x Line.
https://twitter.com/_bapt_/status/1530112900031037441

Script to Automate Installation of Nextcloud on FreeBSD.
https://github.com/theGeeBee/NextCloudOnFreeBSD

Advocacy – Why I Personally Prefer FreeBSD over Linux.
https://sekrit.de/webdocs/freebsd/advocacy.html

Install Instructions for Cardano Node on FreeBSD for amd86 and arm64.
https://pastebin.com/raw/AE3Cvuy4

In Other BSDs for 2022/05/28.
https://www.dragonflydigest.com/2022/05/28/26962.html

Time Machine Like Backups on OpenBSD.
https://xosc.org/timemachine.html

Install FreeBSD 13.1 – FreeBSD Installation Guide for Beginners.
https://ostechnix.com/install-freebsd/

Decade of Dotfiles.
https://evanhahn.com/a-decade-of-dotfiles/

FreeBSD Can Not Find WiFi Hotspot.
https://pbpiece.com/freebsd-cant-find-wifi-hotspot/

How We Are Migrating Our Servers from Linux to FreeBSD – Part 2 – Backups and Disaster Recovery.
https://it-notes.dragas.net/2022/05/30/how-we-are-migrating-many-of-our-servers-from-linux-to-freebsd-part-2/

Hardware

ZBOX PI336 Pico.
https://www.fanlesstech.com/2022/05/meet-zbox-pi336-pico.html

Beelink SEi8/SER3 Review Γ’β‚¬β€œ Intel Core i3-8109U and AMD Ryzen 3 3200U Mini PCs.
https://www.cnx-software.com/2022/05/24/beelink-sei8-ser3-review-intel-core-i3-8109u-amd-ryzen-3-3200u-mini-pcs-windows-11/

Forgotten Benefits of Low Tech User Interfaces.
https://uxdesign.cc/the-forgotten-benefits-of-low-tech-user-interfaces-57fdbb6ac83

Biostar MP-J4125 Mini PC.
https://www.biostar.com.tw/app/en/minipc/introduction.php?S_ID=5

Building Budget Homelab NAS Server (2022 Edition).
https://mtlynch.io/budget-nas/

NanoPi R5S Rockchip RK3568 Mini Router Launched for $59.
https://www.cnx-software.com/2022/05/30/buy-nanopi-r5s-rockchip-rk3568-mini-router-sbc/

Life

Great Junk Transfer is Coming.
https://www.theglobeandmail.com/canada/article-the-great-junk-transfer-inheritance-decluttering-canada/

Other

The Streets of Monaco.
https://tech.marksblogg.com/streets-of-monaco-openstreetmap-postgis-qgis.html

Belgium Wants to Ban Signal – Harbinger of European Policy to Come.
https://edri.org/our-work/belgium-wants-to-ban-signal-a-harbinger-of-european-policy-to-come/

Google Has Been DDoSing SourceHut for Over a Year.
https://drewdevault.com/2022/05/25/Google-has-been-DDoSing-sourcehut.html

8 Reasons to Ditch Chrome and Switch to Firefox.
https://www.pcworld.com/article/704687/8-reasons-to-ditch-chrome-and-switch-to-firefox.html

EOF

Valuable News – 2022/05/23

The Valuable News weekly series is dedicated to provide summary about news, articles and other interesting stuff mostly but not always related to the UNIX or BSD systems. Whenever I stumble upon something worth mentioning on the Internet I just put it here.

Today the amount information that we get using various information streams is at massive overload. Thus one needs to focus only on what is important without the need to grep(1) the Internet everyday. Hence the idea of providing such information ‘bulk’ as I already do that grep(1).

UNIX

FreeBSD 13.1-RELEASE Now Available.
https://lists.freebsd.org/archives/freebsd-announce/2022-May/000032.html

FreeBSD 13.1-RELEASE Release Notes.
https://www.freebsd.org/releases/13.1R/relnotes/

FreeBSD Tutorials.
https://milesianmusings.wordpress.com/2022/05/16/freebsd-tutorials/

Journey to ZFS raidz1 with Different Sized Disks on NetBSD.
https://netbsd0.blogspot.com/2022/05/the-journey-to-zfs-raidz1-with.html

FreeBSD 13.1 Released with UEFI Boot Enhancements and Driver Improvements.
https://www.phoronix.com/scan.php?page=news_item&px=FreeBSD-13.1-Released

Microbhyve – Generate Bootable Minimal Installation of FreeBSD for Bhyve VM.
https://github.com/cbsd/microbhyve

OpenBSD on Partaker H2 with Core i5-1135G7.
https://www.tumfatig.net/2022/openbsd-on-partaker-h2-i5-1135g7/

Inkscape 1.2 Release Notes.
https://inkscape.org/release/inkscape-1.2/

FreeBSD 13.1 Was Released with Various Improvements.
https://cloud7.news/linux/freebsd-13-1-was-released-with-various-improvements/

Understanding OpenZFS SLOGs – What Makes Good Time to Use It and When Should You Avoid It.
https://klarasystems.com/articles/what-makes-a-good-time-to-use-openzfs-slog-and-when-should-you-avoid-it/

FreeBSD Containers with Podman and Buildah.
https://docs.freebsd.org/cgi/getmsg.cgi?fetch=283615+0+current/freebsd-jail

SCO UnixWare 7 Definitive 2018 Re-release Now Available.
https://vimeo.com/711194929

WIP Echo FreeBSD Kernel Module Written Rust.
https://github.com/johalun/echo

Evaluating FreeBSD CURRENT for Production Use.
https://klarasystems.com/articles/evaluating-freebsd-current-for-production-use/

MyBee 13.1.0-RELEASE Available.
https://www.reddit.com/r/freebsd/comments/usytyq/mybee_1310release/

Memory Safety for SerenityOS.
https://awesomekling.github.io/Memory-safety-for-SerenityOS/

Week with FreeBSD and Raspberry Pi 400.
https://www.youtube.com/watch?v=7kfOlxVWV8E

FreeBSD 13.1 is Out for Everything from PowerPC to x86-64.
https://www.theregister.com/2022/05/20/freebsd_131/

In Other BSDs for 2022/05/21.
https://www.dragonflydigest.com/2022/05/21/26953.html

Nightmare of Getting DOOM Running on AIX on IBM RS/6000 Machine.
https://www.youtube.com/watch?v=XzhCGSE7KKw

How to Install FreeBSD.
https://www.kersed.rip/2022/05/freebsd-how-to-install-freebsd.html

Isolation Alloc (IsoAlloc) with FreeBSD Support and Security/Performance Improvements.
https://github.com/struct/isoalloc

NetBSD Announcing Google Summer of Code 2022 Projects.
https://blog.netbsd.org/tnf/entry/announcing_google_summer_of_code3

FreeBSD VNET Jails Networking. [2020]
https://blog.uidrafter.com/freebsd-jails-network-setup

Hardware

AMD Ryzen 4800U vs Intel Core i7-10700T Industrial PCs from OnLogic.
https://www.phoronix.com/scan.php?page=article&item=onlogic-ubuntu-2204

I Want iPhone Mini Sized Android Phone!
https://smallandroidphone.com/

DeskMini UM350 Manjaro Edition is Linux Mini PC with AMD Ryzen 5 3550H.
https://www.cnx-software.com/2022/05/19/deskmini-um350-manjaro-edition-is-a-linux-mini-pc-powered-by-an-amd-ryzen-5-3550h-soc/

Introducing New and Upgraded Framework Laptop.
https://community.frame.work/t/introducing-the-new-and-upgraded-framework-laptop/18646

Mixtile Blade 3 Pico-ITX SBC with Rockchip RK3588.
https://www.crowdsupply.com/mixtile-limited/mixtile-blade-3

Minisforum HX90 AMD Ryzen 9 5900HX Mini PC Review.
https://www.servethehome.com/minisforum-hx90-amd-ryzen-9-5900hx-mini-pc-review/

Deciso DEC740 – OPNsense Firewall Appliance Review.
https://wiki.junicast.de/en/junicast/review/opnsense_dec740

Life

Loneliness of Pretty Good Developer.
https://news.ycombinator.com/item?id=31438426

On Aging Alone.
https://thewalrus.ca/on-aging-alone/

Other

We Would Love to See Dodge Charger ‘Magnum’ Wagon.
https://www.carscoops.com/2020/05/we-would-love-to-see-a-dodge-charger-magnum-wagon/

Windows XP Delta Edition.
https://xpdelta.weebly.com/

EOF

NFS Server Inside FreeBSD VNET Jail

FreeBSD Jails is a great piece of container technology pioneered several years before Solaris Zones. Not to mention 15 years before Docker was born. Today they still work great and offer some new features like entire network stack for each Jail called VNET. Unfortunately they also have downsides. For example anything related to NFS is broken inside FreeBSD Jails (especially when they are VNET based Jails) and the relevant 251347 Bug Report remains unsolved.

There is however a way to run NFS server inside VNET based FreeBSD Jail – we will use userspace NFS server implementation instead of using the FreeBSD base system kernel space NFS server. Its available as net/unfs3 package and this is exactly what we will gonna use for this guide.

unfs3


Same in plain text below.

/ % cd /usr/ports/net/unfs3

/usr/ports/net/unfs3 % cat pkg-descr
UNFS3 is a user-space implementation of the NFSv3 server specification. It
provides a daemon for the MOUNT and NFS protocols, which are used by NFS
clients for accessing files on the server.
Since it runs in user-space, you can use it in a jail.

WWW: https://unfs3.github.io/

/usr/ports/net/unfs3 % pkg info -l unfs3           
unfs3-0.9.22_2:
        /usr/local/man/man7/tags.7.gz
        /usr/local/man/man8/unfsd.8.gz
        /usr/local/sbin/unfsd
        /usr/local/share/licenses/unfs3-0.9.22_2/BSD3CLAUSE
        /usr/local/share/licenses/unfs3-0.9.22_2/LICENSE
        /usr/local/share/licenses/unfs3-0.9.22_2/catalog.mk

Its also pity that VNET feature for FreeBSD Jails is not well documented. Search the FreeBSD Handbook or FreeBSD FAQ for the VNET or VIMAGE keywords. Not a single match. There are only man pages and some stuff left in the /usr/share/examples/jails dir. There is also FreeBSD Mastery: Jails book by Michael W. Lucas but its 3 years old already.

Setup

Below you will find the list of systems we will use in this guide.

10.0.10.250  host
10.0.10.251  nfs_server

The host is a common FreeBSD server installed on a physical or virtual machine. We will also use it as out NFS client and mount the NFS share there. The nfs_server is a FreeBSD Jail with VNET separate network stack enabled. We will run NFS server from this host nfs_server system. Both of them run latest FreeBSD 13.1-RELEASE but I suspect that it should also work the same on older versions.

FreeBSD Host and NFS Client (host)

First we will setup the host machine. Its typical default ZFS FreeBSD install – nothing special about that. To use the VNET enabled Jails we will use jib tool from the /usr/share/examples/jails directory as we will need it to automate epair(4) interfaces management.

root@host:/ # install -o root -g wheel -m 0555 /usr/share/examples/jails/jib /usr/sbin/jib

Our next step would be to fetch and setup the nfs_server FreeBSD Jail. We will not waste time in compilation – we will fetch the base.txz directly from FreeBSD page.

root@host:/ # mkdir -p /jail/BASE
root@host:/jail/BASE # cd /jail/BASE
root@host:/jail/BASE # fetch http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/13.1-RELEASE/base.txz
root@host:/jail/BASE # mv base.txz 13.1-base.txz

Now the nfs_server FreeBSD Jail.

root@host:/ # mkdir -p /jail/nfs_server
root@host:/jail/nfs_server # cd /jail/nfs_server
root@host:/jail/nfs_server # tar -xzf /jail/BASE/13.1-base.txz --unlink

The main FreeBSD /etc/rc.conf configuration file does not hold any special setting – pretty usual stuff.

root@host:/ # cat /etc/rc.conf
# NETWORK
  hostname="host"
  ifconfig_em0="inet 10.0.10.250/24 up"
  defaultrouter="10.0.10.1"
  gateway_enable="YES"

# DAEMONS
  dumpdev="AUTO"
  sshd_enable="YES"
  zfs_enable="YES"
  sendmail_enable="NO"
  sendmail_submit_enable="NO"
  sendmail_outbound_enable="NO"
  sendmail_msp_queue_enable="NO"
  update_motd="NO"

# JAILS
  jail_enable="YES"
  jail_parallel_start="YES"
  jail_list="nfs_server"

The nfs_server FreeBSD Jail as configured in the /etc/jail.conf config file.

root@host:/ # cat /etc/jail.conf
nfs_server {
  path = "/jail/${name}";
  host.hostname = "${name}";
  allow.raw_sockets = 1;
  allow.set_hostname = 1;
  allow.sysvipc = 1;
  mount.devfs;
  exec.clean;
  vnet;
  vnet.interface = "e0b_${name}";
  exec.prestart += "/usr/sbin/jib addm -b _bridge0 ${name} em0";
  exec.poststop += "/usr/sbin/jib destroy ${name}";
  exec.start += "/bin/sh /etc/rc";
  exec.stop = "/bin/sh /etc/rc.shutdown";
  exec.consolelog = "/var/log/jail_${name}_console.log";
}

… and last but not least lets make sure the following DNS haiku will not bother us πŸ™‚

dns

Setup the /etc/hosts on the host system.

root@host:/ # tail -3 /etc/hosts
10.0.10.250 host
10.0.10.251 nfs_server

FreeBSD NFS Server VNET Jail (nfs_server)

As our FreeBSD Jail is installed we will now start it and configure it.

root@host:/ # service jail onestart nfs_server

root@host:/ # jls
   JID  IP Address      Hostname                      Path
     1                  nfs_server                    /jail/nfs_server

root@host:/ # jexec 1

root@nfs_server:/ # 

First we will install latest net/unfs3 package – this userspace NFS server is also very minimal and does not have any dependencies.

root@nfs_server:/ # echo nameserver 1.1.1.1 > /etc/resolv.conf

root@nfs_server:/ # sed -i '' s/quarterly/latest/g /etc/pkg/FreeBSD.conf

root@nfs_server:/ # pkg install unfs3

root@nfs_server:/ # pkg info -qoa
ports-mgmt/pkg
net/unfs3

Now we will configure our NFS share under /share dir and start the unfsd(8) userspace NFS server.

root@nfs_server:/ # mkdir /share

root@nfs_server:/ # cat /etc/exports
/share  10.0.10.250(rw,no_root_squash,no_all_squash)

… last but not least – DNS πŸ™‚

root@nfs_server:/ # tail -3 /etc/hosts
10.0.10.250 host
10.0.10.251 nfs_server

As we are using VNET network stack in a FreeBSD Jail we will have to address the network interface in the Jails /etc/rc.conf file. The unfsd(8) daemon does not start without rpcbind service so we will also enable it.

root@nfs_server:/ # cat /etc/rc.conf
# NETWORK
  hostname="nfs_server"
  ifconfig_e0b_nfs_server="10.0.10.251/24 up"
  defaultrouter="10.0.10.1"

# DAEMONS
  sshd_enable="YES"
  rpcbind_enable="YES"
  sendmail_enable="NO"
  sendmail_submit_enable="NO"
  sendmail_outbound_enable="NO"
  sendmail_msp_queue_enable="NO"

We will make unfsd(8) start automatically at Jails start with plain old /etc/rc.local file.

root@nfs_server:/ # cat /etc/rc.local 
/usr/local/sbin/unfsd &

We will not restart our FreeBSD Jail to make these changes take effect.

root@host:/ # service jail onerestart nfs_server

root@host:/ # jls
   JID  IP Address      Hostname                      Path
     2                  nfs_server                    /jail/nfs_server

root@host:/ # jexec 2

root@nfs_server:/ # 

After startup we can see that unfsd(8) is listening on a NFS 2049 port.

root@nfs_server:/ # sockstat -l4
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS      
root     sshd       1261  4  tcp4   *:22                  *:*
root     sendmail   1241  5  tcp4   127.0.0.1:25          *:*
root     unfsd      1223  3  udp4   *:2049                *:*
root     unfsd      1223  4  tcp4   *:2049                *:*
root     rpcbind    1196  9  udp4   *:111                 *:*
root     rpcbind    1196  10 udp4   *:842                 *:*
root     rpcbind    1196  11 tcp4   *:111                 *:*
root     syslogd    1188  6  udp4   *:514                 *:*
  

We should have our epair(4) interface called e0b_nfs_server addressed properly.

root@nfs_server:/ # ifconfig 
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
e0b_nfs_server: flags=8863<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 0e:27:dd:b3:81:88
        hwaddr 02:30:0d:9f:57:0b
        inet 10.0.10.251 netmask 0xffffff00 broadcast 10.0.10.255
        groups: epair
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

Mount /share on NFS Client

I added that NFS entry to the /etc/fstab file on the host machine.

root@host:~ # cat /etc/fstab 
#DEV         #MNT       #TYPE    #OPT  #DUMP/PASS
/dev/ada0p1  /boot/efi  msdosfs  rw    2 2
/dev/ada0p3  none       swap     sw    0 0

#DEV                #MNT  #TYPE  #OPT       #DUMP/PASS
10.0.10.251:/share  /mnt  nfs    rw,noauto  0 0

We will now attempt to mount the /share NFS export on the host machine.

root@host:/ # mount /mnt

root@host:/ # mount | grep share
10.0.10.251:/share on /mnt (nfs)

root@host:/ # cd /mnt

root@host:/mnt # :> FILE

root@host:/mnt # ls -l FILE
-rw-r--r-- 1 root root 0 2022-05-21 22:53 FILE

root@host:/mnt # rm FILE

Seems to work properly.

Here are also network interfaces on the host machine.

root@host:/ # ifconfig 
em0: flags=8963<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=4810099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,VLAN_HWFILTER,NOMAP>
        ether 08:00:27:b3:81:88
        inet 10.0.10.250 netmask 0xffffff00 broadcast 10.0.10.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
em0_bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 58:9c:fc:10:ff:dd
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: e0a_nfs_server flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 4 priority 128 path cost 2000
        member: em0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 1 priority 128 path cost 20000
        groups: bridge
        nd6 options=9<PERFORMNUD,IFDISABLED>
e0a_nfs_server: flags=8963<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 02:27:dd:b3:81:88
        hwaddr 02:30:0d:9f:57:0a
        groups: epair
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>


Future of NFS Server in Jails

This setup – while allowing to run the NFS server inside FreeBSD Jail with even VNET enabled has its drawbacks unfortunately. First is that it is run in userspace instead of kernel space – which means its slower. Second is that the unfsd(8) only implements NFS version 3 – so no version 4 is not possible.

freebsd-foundation-logo

Where we can go from here? Like with WiFi stuff IMHO the FreeBSD Foundation could step in to sponsor the missing bits of NFS server and VNET to make these native tools work they should. Its up to you to put the pressure on the FreeBSD Foundation when they as what are you missing from the FreeBSD UNIX system that could be improved with one of their projects. You may also join the discussion at the 251347 Bug Report of course.

I think its a big loss that native kernel space NFS server is not currently possible with VNET FreeBSD Jails.

EOF

Valuable News – 2022/05/16

The Valuable News weekly series is dedicated to provide summary about news, articles and other interesting stuff mostly but not always related to the UNIX or BSD systems. Whenever I stumble upon something worth mentioning on the Internet I just put it here.

Today the amount information that we get using various information streams is at massive overload. Thus one needs to focus only on what is important without the need to grep(1) the Internet everyday. Hence the idea of providing such information ‘bulk’ as I already do that grep(1).

UNIX

OPNsense 22.1.7 Released.
https://forum.opnsense.org/index.php?topic=28303.0

TrueNAS 13.0 Succeeds TrueNAS 12.0.
https://www.truenas.com/blog/truenas-13-0-succeeds-truenas-12-0/

OpenBSD on 2020 M1 MacBook Air.
https://kernelpanic.life/hardware/openbsd-m1-macbook-air.html

Enterprise Strength FreeBSD Based TrueNAS 13.0 Released.
https://www.theregister.com/2022/05/11/truenas_13_released/

Thunderbird 102 – 7 Great New Features Coming.
https://blog.thunderbird.net/2022/05/7-great-new-features-coming-to-thunderbird-102/

Nvidia Releases Open Source GPU Kernel Modules.
https://developer.nvidia.com/blog/nvidia-releases-open-source-gpu-kernel-modules/

Modernize Your Oracle Workloads to PostgreSQL with Database Migration Service.
https://cloud.google.com/blog/products/databases/migrate-oracle-to-postgresql

Customizing FreeBSD Ports and Packages.
https://klarasystems.com/articles/customizing-freebsd-ports-and-packages/

Get Started with Bareos – Open Source Client Server Backup Solution.
https://opensource.com/article/22/5/bareos-open-source-client-server-backup-solution

BSD Now 454 – Compiling 50% Faster.
https://www.bsdnow.tv/454

FreeBSD as Desktop – Here is How.
https://www.youtube.com/watch?v=94RWnYI0Ul0

Power of Red Hat Ecosystem.
http://aikchar.me/blog/power-of-the-red-hat-ecosystem.html

FreeBSD Networking Basics – WiFi and Bluetooth.
https://freebsdfoundation.org/freebsd-project/resources/networking-basics-wifi-and-bluetooth/

Lets Have a Look at FreeBSD Bhyve VMs.
https://www.youtube.com/watch?v=1B89B9TQXuI

The as-tree(1) Prints List of Paths as Tree.
https://github.com/jez/as-tree

In Other BSDs for 2022/05/14.
https://www.dragonflydigest.com/2022/05/14/26919.html

Starting at Beginning – FreeBSD Shell.
https://klarasystems.com/articles/interacting-with-freebsd-learning-the-fundamentals-of-the-freebsd-shell-2/

Own Your Calendar and Contacts with OpenBSD/Baikal/FOSS Android.
https://baak6.com/baikal-openbsd-fossdroid/

FreeBSD 13.1-RELEASE Release Notes.
https://www.freebsd.org/releases/13.1R/relnotes/

OpenZFS: All About Cache vdev or L2ARC.
https://klarasystems.com/articles/openzfs-all-about-l2arc/

Hardware

MIPS unveils RISC-V eVocore P8700 and I8500 Multiprocessor IP Cores.
https://www.cnx-software.com/2022/05/11/mips-unveils-risc-v-evocore-p8700-and-i8500-multiprocessor-ip-cores/

Internal Computer Storage Types – Pros and Cons.
https://www.onlogic.com/company/io-hub/internal-computer-storage-types-pros-and-cons/

Wireless is a Trap.
https://www.benkuhn.net/wireless/

Other

Hackers – 20 Years of Awesome.
https://www.scip.ch/en/?labs.20151112

Fallout 2 Reference Edition – Reverse Engineering by Alexander Batalov.
https://nma-fallout.com/threads/fallout-2-reference-edition-reverse-engineering-fallout-2-by-alexander-batalov.221139/
https://medium.com/@alex.batalov/reverse-engineering-fallout-2-5dad1421de21

Firefox 100 Improved Process Isolation.
https://hacks.mozilla.org/2022/05/improved-process-isolation-in-firefox-100/

50 Years Ago Andrei Tarkovsky Made Most Disturbing Sci-Fi Movie Ever.
https://www.inverse.com/entertainment/solaris-50-year-anniversary

ONKYO Has Gone Bankrupt.
https://www.lbtechreviews.com/news/hi-fi/onkyo-has-gone-bankrupt

EOF

Valuable News – 2022/05/10

The Valuable News weekly series is dedicated to provide summary about news, articles and other interesting stuff mostly but not always related to the UNIX or BSD systems. Whenever I stumble upon something worth mentioning on the Internet I just put it here.

Today the amount information that we get using various information streams is at massive overload. Thus one needs to focus only on what is important without the need to grep(1) the Internet everyday. Hence the idea of providing such information ‘bulk’ as I already do that grep(1).

UNIX

Branching for NetBSD 10.
https://mail-index.netbsd.org/current-users/2022/05/02/msg042278.html

Compiling OpenBSD Kernel 50% Faster.
https://flak.tedunangst.com/post/compiling-an-openbsd-kernel-50-faster

OmniOSce v11 r151042 Release Notes.
https://github.com/omniosorg/omnios-build/blob/r151042/doc/ReleaseNotes.md

PyScript is Pythonic Alternative to Scratch/JSFiddle/Other Programming Frameworks.
https://github.com/pyscript/pyscript

Forgetting About Problem of Memory.
https://davmac.wordpress.com/2022/04/30/forgetting-about-the-problem-of-memory/

How to Contribute to OpenBSD Project.
https://dataswamp.org/~solene/2022-05-03-contributing-to-openbsd.html

Export Your FreeBSD iocage Jails.
https://www.youtube.com/watch?v=UuxBuUO32Xs

Bash Oneliners.
https://github.com/onceupon/Bash-Oneliner

FreeBSD ZFS Image for Vultr.
https://github.com/5u623l20/vultr-freebsd-zfs

FreeBSD Driver Updates for Apple Mac Models.
https://twitter.com/FreeBSDHelp/status/1521997142889762816

AppManager is GUI for OpenBSD Package Manager.
https://tildegit.org/solene/AppManager

FreeBSD 13.1-RC6 Now Available.
https://lists.freebsd.org/archives/freebsd-stable/2022-May/000762.html

FreeBSD 13.1-RC6 Released Due to Lingering Bugs.
https://www.phoronix.com/scan.php?page=news_item&px=FreeBSD-13.1-RC6-Released

FreeBSD Foundation – Lets Talk About Foundation Funding.
https://freebsdfoundation.org/blog/lets-talk-about-foundation-funding/

Top 5 Features of FreeBSD!
https://www.youtube.com/watch?v=sfQcjIt9vTE

SmartOS 20220505 Release.
https://smartos.topicbox.com/groups/smartos-discuss/T51a4f5f4992e2624-Mc0572c1592472d3679eecffa/smartos-release-20220505

MyBee – Most Simplified FreeBSD Based API for Creating and Destroying K8S and Cloud VMs.
https://myb.convectix.com/
https://github.com/myb-project/guide

BSD Now 453 – TwinCat/BSD Hypervisor.
https://www.bsdnow.tv/453

XigmaNAS 12.3.0.4.9047 Released.
https://sourceforge.net/projects/xigmanas/files/XigmaNAS-12.3.0.4/12.3.0.4.9047/

FreeBSD in the Office – Blue Sky Thinking!
https://www.youtube.com/watch?v=O-UM7aDv_xE

My OpenBSD Desktop – Move from FreeBSD.
https://blog.passwordclass.xyz/blogs/2022/05/my-openbsd-desktop.html

How to Mount NTFS Filesystem on FreeBSD/NetBSD/OpenBSD.
https://www.pc-freak.net/blog/how-to-mount-ntfs-windows-xp-filesystem-on-freebsd-netbsd-openbsd/

In Other BSDs for 2022/05/07.
https://www.dragonflydigest.com/2022/05/07/26892.html

Viable Alternative – FreeBSD 13.0 not RPi OS on Raspberry Pi.
https://www.youtube.com/watch?v=Cx7_zvh-b6k

OpenBSD 7.1 Fan Noise and High Temperature Solution.
https://dataswamp.org/~solene/2022-04-21-openbsd-71-fan-noise-temperature.html

ZFS on SMR Drives.
https://vermaden.wordpress.com/2022/05/08/zfs-on-smr-drives/

Hardware

India Launches Digital India RISC-V (DIR-V) Program.
https://pib.gov.in/PressReleaseIframePage.aspx?PRID=1820621

Flagship cirrus7 System is Now Available with AMD and Intel Latest CPUs.
https://www.fanlesstech.com/2022/05/alder-lake-nimbus-available.html

Wide (and Weird) World of Two Screen Laptops. [2008]
https://www.technologizer.com/2008/12/19/two-screen-laptops/

Corsair K70 RGB TKL Optical Mechanical Keyboard.
https://www.techpowerup.com/review/quick-look-corsair-k70-rgb-tkl-champion-series-optical-mechanical-keyboard/

Topton M6 Quad Core Intel N5105 with 16GB RAM and 2.5GbE LAN Mini PC Review.
https://www.servethehome.com/topton-m6-review-an-intel-jasper-lake-mini-pc-with-2-5gbe-n5105/

Firefly RK3588S – Fastest ARM Based SBC We Ever Tested.
https://www.youtube.com/watch?v=WlECRxfqWrs

Explaining RISC-V – x86 and ARM Alternative.
https://www.youtube.com/watch?v=Ps0JFsyX2fU

Life

My Experience Getting Tech Job with No Degree or Relevant Work Experience.
https://lowlyswe.substack.com/p/my-experience-getting-a-tech-job?s=r

IBM Asshole Test.
https://johnpublic.mataroa.blog/blog/the-asshole-test/

Other

Real Reason First Version of Windows NT Was Called 3.1.
https://liam-on-linux.dreamwidth.org/83538.html

EOF