VMWare Fusion – Unable to create the installation medium.

When installing High Sierra on VMWare Fusion, I had to provide the installation files. This is done by finding High Sierra in the App Store, then clicking on “Download”. Once downloaded, the “Install macOS High Sierra.app” is to be dragged from /Applications and into VMWare, as shown here:

Unfortunately, doing so results in the error “Unable to create the installation medium.”, as shown here:

The solution is to drag “Install macOS High Sierra.app” (hold down the left options key before and while you release the app) to a directory owned by your user, such as ~/Downloads, then drag it from there to the “Select the Installation Method” window.

Mapping Caps Lock to ESC in XFCE

I prefer the Caps Lock key over ESC because the travel to that key is shorter.

To map Caps Lock to ESC add the following to a script and ensure it executes shortly after logging into X.

/usr/local/bin/xmodmap -e "clear Lock"
/usr/local/bin/xmodmap -e "keysym Caps_Lock = Escape"

In my case, I use XFCE so I auto start it by adding /home/<user>/bin/capsToEsc.sh under Settings -> Session and Startup -> Application Autostart -> Add -> Command.

Installing BitBucket on FreeBSD 11.1

Step by step instructions on installing BitBucket on FreeBSD 11.1.

Install OpenJDK

pkg install openjdk8

Mount filesystems on boot

Add the two following lines to /etc/fstab:

fdesc   /dev/fd         fdescfs         rw      0       0
proc    /proc           procfs          rw      0       0
Mount the two filesystems so you don’t have to reboot.
mount-t fdescfs fdesc /dev/fd
mount-t procfs proc /proc

Install Perl

pkg install perl5

Install Git

pkg install git

Install bash

pkg install bash
cd /bin
ln -s /usr/local/bin/bash

Install PostgreSQL

pkg install postgresql96-server
echo 'postgresql_enable="YES"' >> /etc/rc.conf
/usr/local/etc/rc.d/postgresql initdb
/usr/local/etc/rc.d/postgresql start

Configure PostgreSQL

su - postgres
createuser -sdrP dba
CREATEROLE bitbucketuser WITHLOGIN PASSWORD'foobar'VALID UNTIL 'infinity';

Create a user for BitBucket

adduser #default values for all but Shell; set bash as the shell.

Install BitBucket

Download bitbucket from Atlassian’s website. Thoose the “TAR.GZ Archive” version.
tar xzf atlassian-bitbucket-5.8.1.tar.gz -C /usr/local
cd /usr/local
mv atlassian-bitbucket-5.8.1/ bitbucket
chown -R bitbucket:bitbucket bitbucket
cd /usr/local/etc
mkdir bitbucket
chown -R bitbucket:bitbucket bitbucket
su - bitbucket
Edit bitbucket’s .profile file:
  • Add and export JAVA_HOME.
  • Append JAVA_HOME/bin to PATH (uncomment PATH if commented out)
  • Add BITBUCKET_HOME=/usr/local/etc/bitbucket; export BITBUCKET_HOME 

Start BitBucket

cd /usr/local/bitbucket/bin

Validating /etc/crontab

cron parses crontab every minute. In order to check crontab for syntax errors, check the logs output:

sleep 60; grep crontab /var/log/syslog | tail

Error “The Recovery server could not be contacted.” when reinstalling macOS High Sierra.

Received the error “The Recovery server could not be contacted.” when reinstalling macOS High Sierra on a laptop which has not be used for quite a while.

Turns out the battery had been completely drained, causing the laptops internal clock to reset to NSDate’s default value (00:00:00 UTC on 1 January 2001).

I assume that the machine connects to the recovery servers over HTTPS. As such, the server’s certificate can not be verified because the date is too far off from the actual date. One might ask why Apple do not make things easier and simply update the time using NTP before accessing the update server — doing so might enable an attacker to execute an mitm attack. The least Apple could do is to ask the user to input a correct date. Which leads us to the following solution.

To fix this, access the terminal from within the recovery GUI and execute

date mmddHHMMyy


  • mm is the month [01;12],
  • dd is the day of month [01;31],
  • HH is the hour of day [00;23],
  • MM is the minute of the hour [00:59], and
  • yy is the year [00;99].

Then try again to launch internet recovery.

Adding a new bhyve guest to FreeBSD 11.1

Installing a guest on FreeBSD’s bhyve, assuming bhyve has previously been installed and is hosting at least one vm.

The guest’s hostname will be mailpile, its shall have 100GiB of storage and 2048 MiB of RAM.

# Obtain a list of iso's known to bhyve.
vm iso

# Create debian Linux guest. It shall have the hostname mailpile and have access to 100GiB of storage space.
vm create -t debian -s 100G mailpile

# Autostart the guest when the system comes up.
add mailpile to vm_list in /etc/rc.conf

# Configure the guest (add more RAM to it, I used 2048M).
vm configure mailpile

# Install debian to the guest. Spell out an iso file from "vm iso".
vm install mailpile debian-...myversion.iso

# Connect to the guest.
vm console mailpile

You should now be in the Debian installer.