Skip to main content

FreeBSD

Fix Upgrade Issues After Using Pkgbase on FreeBSD 15.x

I recently upgraded my nas from 14.x to 15-RELEASE and then converted to pkgbase because I just loved the idea of being able to do pkg update and pkg upgrade for all upgrades moving forward. After the upgrade, the version I was on was 15.RELEASE-p1. After about a month or so, when I noticed p2 was out, I ran pkg update and pkg upgrade, it still kept me at p1. Investigating, I figured when I ran the lua based script to upgrade to pkgbase, it didn’t (or I forgot) to say yes for FreeBSD base repository. If you’re like me, here’s the instructions to fix it quickly.

Fastest Way to Copy Ext4 Formatted Data to FreeBSD Using WSL2 as an Intermediary

I run immich on a very old dell laptop with 100mbps ethernet with USB connected disks for data. The disks are formatted ext4 and the dell runs fedora. (Immich doesn’t run on FreeBSD yet. :( ). When the disk was full, I wanted to use my FreeBSD server as the data drive over NFS. And retire the USB disks. This required copying about 500GB of data from the USB disk to my FreeBSD server before I could switch over.

Exploit the benefit of security and stability of FreeBSD by running webservers in jails along with reverse proxy jail, database jail and a redis jail

This holiday season I read up on FreeBSD jails. I’ve always wanted to be able to set up secure and stable websites. And Jails were the answer. I’ve used Bastille as a jail tool, there are many out there and you can even do it without a tool, the FreeBSD handbook has enough to set them up.

How to Enable Sending Email From Your FreeBSD Machine Using Dragonfly Mail Agent (DMA)

After you’ve set up your FreeBSD box, having the box email you for all sorts of reports, cron updates etc is really useful. You don’t have to login to the machine to see them, you can get them in your email. With DragonFly Mail Agent, the setting of such an email system is quick and easy. Here’s the instructions:

How to Upgrade FreeBSD to a Newer Version or Release

Commands: freebsd-update upgrade -r 14.1-RELEASE freebsd-update install shutdown -r now freebsd-update install shutdown -r now Notes: “14.1-RELEASE” –> You can use replace it with “14.2-RELEASE” or any other release in that format. Before running the final “shutdown -r now”, you might have to do an additional “freebsd-update install” if any application is asking for it. 👅

Rsync Fails When Copying Files With Tilde: rsync: [sender] fstat failed: No such file or directory

Rsync Error: send_files(71922, /source/TQR6~B) rsync: [sender] fstat failed: No such file or directory (2) Trying to rsync between two different machines, I found rsync fails when it finds files that have ~ (tilde) in their filenames. I initially thought this was an issue specific to copying from a Samba Share to FreeBSD zpool. I couldn’t solve the issue entirely but figured escaping the awful tilde was a way to finish copying without rsync crashing. Here’s the command:

Unlocking FreeBSD's Potential: Learn, Use and Elevate Your Experience with Generative AI

The benefits of FreeBSD are numerous. (Just ask chatgpt!). For me, it’s a very stable system, one that runs on any hardware, old and new, installs very quickly, configurations are in text and the pkg system that installs extra software is simple and powerful. But for a long time, anyone wanting to set up a home server or a VM to try with had to read lots and practice lots and even after practice, if you forget the commands, which happens when you use it infrequently, you have to google feverishly and many a time, the results the search engine finds might not be correct or actually be wrong. Enter ChatGPT and generative AI and things have changed drastically, for the good!

How to Read IDE Hard Disk Formatted With NTFS on FreeBSD

·204 words·1 min
I came across one of my first hard disks when home so I took it out and brought it with me to copy the data out. It was an IDE HD so I bought a cheap IDE to SATA adapter and connected it to my FreeBSD machine to copy the data. (Feeding the power directly from the motherboard’s molex connector was more stable for the old hard drive.) Here’s the steps that worked for me.

ZFS: unsupported feature: com.klarasystems:vdev_zaps_v2

·153 words·1 min
Note of caution: Read the FreBSD Release Notes carefully at https://www.freebsd.org/releases/14.0R/relnotes/ especially the section called “Upgrading from Previous Releases of FreeBSD”. If you recently upgraded to FreeBSD 14 but you get the above error displayed before the beastie logo (see image below), here’s a solution for those with the boot loader in the MBR and that use the GPT partition scheme.

How to Install Tailscale on FreeBSD

Tailscale.com’s download page doesn’t list if it’s available for FreeBSD. But it does work on FreeBSD (tested on Release 14). Here’s how: Install the package: pkg install tailscale Edit /etc/rc.conf to add tailscaled_enable="YES" Run service tailscaled start. If you get an error, reboot. After reboot, run tailscale login. Grab the url, copy paste in a browser and approve the connection. You can now ssh into the machine from another ’tailscaled’ machine from within your LAN or outside your home/office. How to update Tailscale # Once installed, when you run the command tailscale on FreeBSD as root, you get a list of all the commands. Use tailscale update to update.

Install Hugo on FreeBSD, commit to Github and deploy to Cloudflare pages

·127 words·1 min
Prerequisites # Install PHP Install nginx Install Hugo # pkg install gohugo (install as root or do sudo) follow this after install - https://web.archive.org/web/20231202094641/https://developers.cloudflare.com/pages/framework-guides/deploy-a-hugo-site/ remember to remove hugo.toml from the root directory otherwise you’ll get a “not Found” error! Tip # Install the GUI (maybe xfce or Kde5) so you edit md files, update them on the fly. Copy pasting and updating is easier with the gui and the terminal available. Refer to Hugo Cheatsheat if you need instructions to create the new site. If you start getting weird errors from Git, just create a new hugo site, copy your contents and config.toml and follow instructions again. IMO Github has a lot to be done before it becomes user friendly. I’ll write about it separately someday. 🌶️

Configure FreeBSD on an Old Intel Machine with ATI Graphics

·156 words·1 min
Steps # Default install using Ventoy USB with FreeBSD install ISO update pkg by running to install any package ex. pkg install vim pkg install bash Install video drivers for ati - ref AMD section in https://docs.freebsd.org/en/books/handbook/x11/. This should take the screen to VGE mode with max resolution Make default shell bash: chsh and edit (vim editor runs) the tcsh out with bash install kde5, xorg, xfce, firefox-esr, mc, elinks, htop, libreoffice allow root to login as ssh: edit /etc/ssh/sshd_config and set PermitRootLogin to yes; restart sshd Tips # Make root writable in single user mode (if you cannot login as root because you messed up the shell or have some corruption:

Install FreeBSD via pxeboot Using mfsbsd for Systems That Have Less Than 512MB Memory

·178 words·1 min
If you are PXE booting a client machine with an ISO file that is bigger than available memory on your client, the PXE boot will probably fail. This is because PXE boot is copying the ISO into memory. Nowadays, most of the OS install ISOs are more than 512MB, even for FreeBSD. So here’s the process to install FreeBSD on your very old hardware with 512MB memory or less.