Upgrade to Windows 10 20H1 (2004) BSOD

Today when I tried to upgrade my windows 10 1909 to windows 10 20H1, I got multiple BSOD.
Based on the information on the BSOD screen, the BSOD were caused by some drivers (aksdf.sys, hardlock.sys, aksfridge.sys)

bsod 1

bsod 2)

After investigation, looks like all these drivers were Sentinel Data Filter Device Driver/Aladdin HASP Data Filter Device Driver, Which provided by Safenet.
I have no idea how these driver got installed into my computer, and I can’t remove them from control panel.

The fix is to download the Sentinel HASP/LDK Windows GUI Run-time Sentinel HASP/LDK Windows GUI Run-time from thalesgroup website

Install, then uninstall it, reboot.

After reboot, I can upgrade to windows 10 20H1 successfully.

Install certificate for Unifi Controller

1. Request certificate. I saved my certificate as unifi2020.crt and unifi2020.key
2. Replace certificate on unifi controller

openssl pkcs12 -export -inkey unifi2020.key -in unifi2020.crt -out unifi.p12 -name unifi  -password pass:temppass
keytool -importkeystore -deststorepass aircontrolenterprise -destkeypass aircontrolenterprise -destkeystore /var/lib/unifi/keystore -srckeystore unifi.p12 -srcstoretype PKCS12 -srcstorepass temppass -alias unifi -noprompt

3. Restart unifi

/etc/init.d/unifi restart

Add Cloudflare Dynamic DNS Support on Unifi USG

It seems Unifi USG still doesn’t support Cloudflare Dynamic DNS, even though lots of users voted for this feature.
In the past I’m using dnsomatic to update cloudflare DDNS, but dnsomatic is not working anymore. So I spent sometime to find a solution.

1. Create a config.gateway.json and put it on unifi controller. Then provision USG.
If you don’t know how to create the file, please refer to https://help.ubnt.com/hc/en-us/articles/215458888-UniFi-Advanced-USG-Configuration

	"service": {
		"dns": {
			"dynamic": {
				"interface": {
					"<WAN interface eg eth0>": {
						"service": {
							"cloudflare": {
								"host-name": [
									"<insert A record name here eg. usg.example.com>"
								"login": "<CloudFlare E-Mail>",
								"options": [
									"zone=<DNS Zone eg. example.com>"
								"password": "<CloudFlare Global API Key>",
								"protocol": "cloudflare"

2. Upgrade ddclient on USG to version 3.9.0.
Save below script as a bash file:

# Run this script as sudo

# Specify the repo and the location of the apt sources list
DEB_REPO="deb http://archive.debian.org/debian/ wheezy main # wheezy #"

# Add deb repo to sources list if it isn't there
grep -q -F "$DEB_REPO" "$APT_SRC" || echo "$DEB_REPO" >> "$APT_SRC"

# Run Apt update
apt-get update; apt-get -y install libdata-validate-ip-perl

# Download new ddclient and replace the existing version
cd /tmp
curl -L -O https://raw.githubusercontent.com/ddclient/ddclient/master/ddclient
cp /usr/sbin/ddclient /usr/sbin/ddclient.bkp
cp ddclient /usr/sbin/ddclient
chmod +x /usr/sbin/ddclient

And chomod +x the file and run it with root. Then the script will install libdata-validate-ip-perl as well as ddclient 3.9.0.

3. As we are using standard ddclient, so we have to create a copy of the old ddclient configuration file.

cd /etc/ddclient
cp ddclient_eth0.conf ddclient.conf

4. Then restart ddclient.


5. Done. From system log, you should be able to see ddclient update cloudflare DDNS now.

fix “[Error28] No space left on device” when upgrade ESXi to 6.7 U2

To upgrade ESXi to 6.7U2, usually use below command is enough:

esxcli software profile update -p ESXi-6.7.0-20190402001-standard -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

But this time I got error “[Error28] No space left on device”.

Someone said to enable the swap on SSD can fix the issue, but I tried, it doesn’t work.

The fix is to manually update a vib first

[[email protected]:~] cd /tmp
[[email protected]:/tmp] wget http://hostupdate.vmware.com/software/VUM/PRODUCTION/main/esx/vmw/vib20/tools-light/VMware_locker_tools-light_10.3.5.10430147-12986307.vib
[[email protected]:/tmp] esxcli software vib install -f -v /tmp/VMware_locker_tools-light_10.3.5.10430147-12986307.vib
Installation Result
   Message: Operation finished successfully.
   Reboot Required: false
   VIBs Installed: VMware_locker_tools-light_10.3.5.10430147-12986307
   VIBs Removed: VMware_locker_tools-light_10.3.2.9925305-10176879
   VIBs Skipped:

Then run the update again, you should be able to update your ESXi host now.

expand AWS EC2 FreeBSD ZFS disk

For testing purpose, I setup a Freebsd instance on AWS, which is using zfs on root.
And then I add 10G disk space to the root volume. Even though I enabled auto-expand for zroot, it seems the 10G space is not added to system. Here are the steps to expand the disk for zroot:

1. Reboot the server.  Even though it’s said that reboot is not necessary, I suggest to reboot the server to make sure server can recognize the new size.

2. As the disk size change, we need to fix the GPT partition table first.

gpart recovery ada0

3. Some documents said can use “zpool online -e” to expand the disk. As shown in above picture, the command can’t auto update GPT and assign the space to zfs partition.

4. We need to use gpart to update GPT first, then expand the zfs partition.

#gpart resize -i 2 ada0
#zpool online -e zrrot /dev/adap2