Skip to content

Author: xavier

Adding Unraid Mount Share via Tag to FSTAB

Create a share on the VM machine itself in Unraid.

Screenshot of Unraid Share and Unraid Mount tag example.

Let’s assume your mount tag is “test”.

Make sure you create your mount folder within the VM. In our case its “/whatever”. Modify your /etc/fstab file like this to mount the share. Then reboot.

test  /whatever 9p trans=virtio,version=9p2000.L,_netdev,rw 0 0
Leave a Comment

Network stopped working in Ubuntu 18.04

I had a Ubuntu VM that lost its ability to get an IP. I have no idea why but I finally found the issue and it seems that the interface name changed.

Maybe its a bug : https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1881832

So I found out that the network interface that was trying to do DHCP did not exist. You’ll find this in /etc/netplan/50-cloud-init.yaml . For some reason, it showed that my interface was enp1s0 but it wasn’t, it was enp3s0. So I modified the file and rebooted the server. Everything is fine now.

Leave a Comment

UnRaid Expanding qcow2 drive, Windows 10

To expand your drive size in UnRaid.

  • Go to VMs
  • Click on the name of the VM you want to expand
  • A new bar will appear, disk devices. Click on the capacity.
  • Set a new size and hit enter.
  • Start the machine, log in, etc.
  • Go to administrative tools, computer management, storage, disk management
  • Right click “disk management” and hit refresh
  • You should now see the additional space
  • Expand your disk
  • Done
Leave a Comment

WordPress Errors

Had the following WordPress errors on a website I was working on. I had migrated from one server to another.

  • Cookie nonce is invalid
  • 404 errors for wp-json/wp/v2/posts

I finally tried this trick, adding index.php, to test the URL giving the 404 and it worked http://localhost/myproject/index.php/wp-json/wp/v2/posts.

I switched the Settings -> Permalinks from post name to plain and that worked as well. I put it back and the errors returned.

It ended up being that somehow during migration the .htaccess file was not copied over and was not set up on the new server. Once I copied the .htaccess file from the old to the new server it worked.

Here is a copy of what my .htaccess file looked like at that time.

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.

RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


# END WordPress
Leave a Comment

Let’s Encrypt with win-acme (exporting certificate IIS)

Using https://www.win-acme.com for SSL.

To make a certificate exportable in Windows make sure that you modify the “settings.json” that is included with win-acme. Change “PrivateKeyExportable”: false to “PrivateKeyExportable”: true .

If you already created the certificate you might need to delete it then reboot the machine to keep it from giving you a cached version of the SSL certificate.

Leave a Comment

Clear Chrome DNS

For the most part I use chrome and every time I do a modification to my hosts file I don’t want to close the browser because it caches DNS. This seems to work to clear cache chrome://net-internals/#dns

Leave a Comment

Visual Studio 2019 and Sitecore (Troubleshooting) error MSB4036: The “GetReferenceNearestTargetFrameworkTask” task was not found

I have a Sitecore solution built for 2017 but just recently got a fresh computer with only Visual Studio 2019 on it. So I’ve been running through some problems.

This was the error I was getting while running gulp to build the solution. I had installed the VS 2017 build tools earlier. Looks like you need to install the NuGet items as well.

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64\Microsoft.Common.CurrentVersion.targets(1657,5): error MSB4036: The “GetReferenceNearestTargetFrameworkTask” task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is “public” and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the “C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64” directory

Leave a Comment

Duplicati on Ubuntu 16.04 – Headless

Install Mono
https://www.mono-project.com/download/stable/#download-lin-ubuntu

sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo apt install apt-transport-https ca-certificates
echo “deb https://download.mono-project.com/repo/ubuntu stable-xenial main” | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update

sudo apt install mono-devel

Install Duplicati
wget https://updates.duplicati.com/beta/duplicati_2.0.5.1-1_all.deb
apt install ./duplicati_2.0.5.1-1_all.deb

To Test
duplicati-server –webservice-interface=any –webservice-port=8200 –webservice-allowed-hostnames=*

Modify the following file, /etc/default/duplicati, to allow access for any IP
DAEMON_OPTS=”–webservice-interface=any –webservice-port=8200 –webservice-allowed-hostnames=*”

Add the following as /etc/systemd/system/duplicati.service
[Unit]
Description=Duplicati web-server
After=network.target

[Service]
EnvironmentFile=-/etc/default/duplicati
ExecStart=/usr/bin/duplicati-server $DAEMON_OPTS

[Install]
WantedBy=multi-user.target

To enable duplicati
systemctl enable duplicati

Check if the service is now running
systemctl status duplicati.service

If its not, try the following then check the status again
systemctl start duplicati.service

Leave a Comment

WordPress Error – The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

WordPress was installed on a windows machine and recently started getting this error. Seems that the web.config was modified.

To fix the error above I updated the web.config to look like this and it fixed the problem.

<configuration>
<system.webServer>
    <rewrite>
      <rules>
        <rule name="Main Rule" stopProcessing="true">
                <match url=".*" />
                <conditions logicalGrouping="MatchAll">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                </conditions>
                <action type="Rewrite" url="/" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>
</configuration>
Leave a Comment

Pi-hole static DNS entry

This is more docker related but should be similar to just a plain jane install. You can add your static entries to the /etc/hosts file or you can add it the the dnsmasq.d configuration file.

Create a file under /etc/dnsmasq.d, something like myhosts.conf and add the following. Keep adding entries until your done.

host-record=hostname.com,192.168.1.1

Find your pi-hole dns configuration under /etc/dnsmasq.d. Open the file and add the following line to end of your the configuration file.

conf-file= /etc/dnsmasq.d/ myhosts .conf

Go back to the pi-hole GUI and restart the DNS under settings/system “restart DNS resolver”.

Leave a Comment

Windows Server 2016 Standard Evaluation – “This Edition Cannot Be Upgraded”

I got this error when trying to enter a product key via the GUI, “This Edition Cannot Be Upgraded”. Not sure why. However, I was able to run the following command via command prompt to activate my product key. It does take about 5 minutes to complete the process then your asked to reboot.

Dism /online /Set-Edition:ServerStandard /AcceptEula /ProductKey:"put product key here"
Leave a Comment

UNRAID – Increase Storage for Windows 10 VM

  1. Go to your UNRAID GUI
  2. Click on VMs
  3. Make sure the VM you want to make the modifications to is stopped
  4. Click the Name of the VM
  5. Disk devices should display
  6. Under capacity there should be links to the drive you want to add space too, click that link and enter the new capacity. Hit Enter.
  7. Start the VM
  8. Now reboot the VM (this is necessary for it to find the new space available – not sure why)
  9. Log in to your Windows VM
  10. Open Computer Management
  11. Go to Disk Management
  12. You can now expand the partition to its capacity
Leave a Comment