Skip to main content
5 votes
Accepted

cp, trailing slash, and copying to the same vs. to another directory

The difference in behavior between cp -R dir1 dir2 and cp -R dir1/ dir2 is a feature that was added to FreeBSD in version 5.4. At least, that's when the following sentence was added to the manual for ...
Gilles 'SO- stop being evil''s user avatar
5 votes

using dd for clean MBR code doesn't work on pfSense

It's been a very long time since I last used a BSD system, and my memory of them regarding disk devices is that you must write full blocks (or multiples). It seems that this is still the case, and in ...
Chris Davies's user avatar
4 votes
Accepted

using dd for clean MBR code doesn't work on pfSense

Ok, I did many test and came to this conclusion... Because pfsense is a damn stripped version of freebsd and LOT of tools are missing I had to do this to clear the first 446 byes in the disk ...
user3450548's user avatar
  • 2,954
3 votes
Accepted

How to make the script, configured via sendmail aliases file, run as the user to whom that email is addressed?

I would simply use sudo. In a default installation, sendmail executes alias scripts as user mailnull. It's possible to allow mailnull to use sudo to pose as only those users, and to do so only for ...
Jim L.'s user avatar
  • 8,152
3 votes

Figuring out the time until midnight, and output the result in a text file

You can calculate the time left until midnight using this for example (assuming GNU date): #!/bin/bash - mid=$(date -d 'tomorrow 00:00' +%s) now=$(date +%s) hours=$(((mid - now) / 3600)) mins=$(((mid -...
Stephen Kitt's user avatar
3 votes

How can I use cloud-init NoCloud with OPNsense 21?

I'm working on expanding cloud-init support to BSDs*. The errors should be fixed by now since at least https://github.com/canonical/cloud-init/pull/1779 And by now, Vultr is fairly well supported. If ...
Mina Galić's user avatar
3 votes

using dd for clean MBR code doesn't work on pfSense

Several answers have correctly pointed out that one writes characters to character devices, and blocks to block devices. I don't know what tools pfSense includes and which it omits, but on a full-...
Jim L.'s user avatar
  • 8,152
3 votes
Accepted

Automate deploying a bunch of thin jails

The automation tool would be simple shell scripts or if you are already using Bastille you would create an equally simple template. You can either do your actions from "outside" the jail by ...
Claus Andersen's user avatar
2 votes

Do other Unix-like kernels have stable syscall ABIs?

Generally, the answer is no, although it is likely developers of operating systems will be nice for compatibility reasons. You should not rely on it though. FreeBSD freebsd No. No compatibility for ...
Justine Krejcha's user avatar
2 votes

How to sort and filter images by modification time and view them in nsxiv on FreeBSD

If it is important for you to be able to make it work on a vanilla FreeBSD system there is another answer with find/xargs/cut/stat. If you are able to install additional utilities there is a cleaner ...
Claus Andersen's user avatar
2 votes

Persistent naming of root device when booting FreeBSD

It is human nature to ask the way you do. But it requires that people know both Linux and wants FreeBSD to behave in the same way. A much better approach would be to flesh out what you are ...
Claus Andersen's user avatar
2 votes

How to sort and filter images by modification time and view them in nsxiv on FreeBSD

You'll have to properly go through xargs to get the sorting done; so, something like find . -maxdepth 1 -type f \ \( -iregex '.+\.jpe?g$' -o -iregex '.+\.png$' \) \ -newermt 2023-10-01 \ -...
Marcus Müller's user avatar
2 votes

What Causes PHP Forks to Consolidate on a Single CPU Core in FreeBSD 13.3?

The problem, and solution, have now been found. It is a bug in the LLVM code. From GitHub issues: It's a bug in the atfork() handler on Unix systems + logic in reinitializing the child process. The ...
Adam Ellis's user avatar
1 vote

Recommended and alternate dependencies in FreeBSD .pkg

FreeBSD packages are binary packages (see pkg(7)). While you theoretically can create a bottom up binary package it would be very unusual. You would rather start with a ports(7) source based "...
Claus Andersen's user avatar
1 vote

LibreOffice on FreeBSD (GhostBSD) is missing GnuPG encryption entry fields

The pkg binary packages are made from ports with default settings. My initial reaction was that LibreOffice probably was not compiled with that option and you would need to go to ports and do a make ...
Claus Andersen's user avatar
1 vote

'ls name' and 'ls | grep name' with accent different

This works: ls --show-control-chars A* Amnésia As does this, ls A* | cat Amnésia The documentation for the version of ls I have on Debian (ls (GNU coreutils) 8.32) writes, --show-control-chars show ...
Chris Davies's user avatar
1 vote

Are FreeBSD binaries compatible with macOS?

macOS use the Mach-O binary format and FreeBSD use the ELF binary format. To answer your question: FreeBSD binaries are not compatible with macOS, but you can recompile a FreeBSD program (with ...
Ortomala Lokni's user avatar
1 vote
Accepted

How to sort and filter images by modification time and view them in nsxiv on FreeBSD

I have found a solution that works in FreeBSD's /bin/sh. I have tried it in FreeBSD 13.2. It seems to properly handle filenames that contain backslashes and whitespace (spaces, tabs, and newlines), ...
Flux's user avatar
  • 2,978
1 vote

drm-kmod-20220907_2 not supported for this configuration / NVIDIA : Failed to initialize the NVIDIA kernel module

NVIDIA and DRM NVIDIA has its own DRM module as the NVIDA Unified Driver was built for FreeBSD and Linux systems using Kernel Object files. The .ko file "attaches" itself to the running/...
eyoung100's user avatar
  • 6,715
1 vote

Mounting a disk image

The base FreeBSD system does not support NTFS or EXT2 filesystems by default. You will need to install the ports sysutils/fusefs-ntfs and sysutils/fusefs-ext2 as well as their dependencies. As root, ...
wmorgan's user avatar
  • 11
1 vote

pfSense (FreeBSD 14.0) - Prometheus Node Exporter gives log errors - fix or suppress in log

I finally found a solution. I couldn't get any syslog configuration to work, but I managed to edit the node_exporter config file like this: # This file is generated by the pfSense node_exporter ...
Artur Meinild's user avatar
1 vote
Accepted

Is FreeBSD's UNIX Filesystem (UFS) best suited having a microSD storage?

UFS is certainly simple to configure, but doesn't offer as much protection for your data as say, ZFS does. I run my Raspberry Pi on ZFS. Even with a single-device VDEV, having the ZFS check-summing ...
Jim L.'s user avatar
  • 8,152
1 vote

How to sort and filter images by modification time and view them in nsxiv on FreeBSD

You could do: zsh +o caseglob -c ' autoload after print -rN -- *.(jp(e|)g|png)(.e[after 2023-10-01]om)' | nsxiv -0 - For portability + reliability, perl is likely your best bet: perl -MTime::...
Stéphane Chazelas's user avatar
1 vote
Accepted

Figuring out the time until midnight, and output the result in a text file

No need to apologize for asking questions; we're here to help! To calculate the remaining time until midnight and save it to a text file in the format "x hours and y minutes remaining until ...
Silfrede's user avatar
  • 179
1 vote

Improving NFS performance on FreeBSD system

Increase NFS read and write buffer sizes sudo mount -o remount,rsize=262144,wsize=262144 myserver:/export/path /mnt/tmp Adjust the number of NFS threads sudo sysctl -w vfs.nfsd.maxthreads=256 ...
warashi nguyen's user avatar
1 vote

Embedding binary data into an executable using LLVM tools

I would like to offer a simplistic tool called res_embed. It has a similar scope, but not based on LLVM. It basically uses NASM or gas to embed the binary through the assembly files. It's wrapped into ...
Dmitry Mikushin's user avatar
1 vote

Freebsd12: Process killed instead of swapping out

TLDR; Why? No guarantees to who survives when you run out of resources. Large memory use paints a target on your back. And how can I avoid it? Be careful when you allocate memory. Do not allocate more ...
Claus Andersen's user avatar
1 vote

How to mount a Veracrypt volume on FreeBSD?

I've made it. The key to understand what's happend was to create 2 brand new VeraCrypt volumes. one on Linux one on FreeBSD During the creation I noticed that Veracrypt offers different filesystems ...
xliiv's user avatar
  • 899
1 vote

GPU usage monitor for FreeBSD?

If it's the same tools as under Linux, the program you're looking for is probably nvidia-smi.
Marcus Müller's user avatar
1 vote
Accepted

Failing distribution checksum during FreeBSD automated install (bsdinstall)

It was a bug introduced last year in commit 1f7746d81f. That commit replaced: exec 3>&1 export BSDINSTALL_DISTDIR=$(`dirname $0`/fetchmissingdists 2>&1 1>&3) FETCH_RESULT=$? exec ...
larsks's user avatar
  • 35.7k

Only top scored, non community-wiki answers of a minimum length are eligible