Upgrade Your Raspberry Pi to Raspbian Buster, Without Losing Data

In-Place Upgrade
First check if all your applications are supported under Raspbian ‘Buster’.

Open a terminal, and type the following:

Update Raspberry firmware :
sudo rpi-update

Change sources files from Stretch to Buster :
grep -rl stretch /etc/apt/ | sudo xargs sed -i ‘s/stretch/buster/g’

This finds all the source definitions for the apt package manager referring to ‘Stretch,’ the previous version of Raspbian, and replaces them with ‘Buster’.

Once finished, update package lists and start upgrade, type:
sudo apt update && sudo apt dist-upgrade

Note that this process can take several hours to complete. During the process check frequently if user interaction is needed. The upgrade process will ask you several times what to do whith existing configuration files.

When it has finished, reboot the Raspberry Pi.

Finally, tidy up the now-unsupported applications which have come through from Raspbian ‘Stretch’ with the following terminal command:
sudo apt purge timidity lxmusic gnome-disk-utility deluge-gtk evince wicd wicd-gtk clipit usermode gucharmap gnome-system-tools pavucontrol
or just use : sudo apt autoremove -y

Visitor Score
[Total: 0 Average: 0]

Securing Batch scripts

When using credentials in batch scripts, anyone who has access to the script can access the credentials. Instead you can store the credentials in a seperate file (which only the user executing the batch script can access) and use these in the script. Here’s how to do this …

First create a text file containing the credentials (in this example vault.txt).

Add these lines to your batch script :

for /f “delims=” %%x in (c:\scripts\vault.txt) do set Vault=%%x
net use x: \servername\share /user:username %Vault%

The first line puts the password in the variable and in the second line the variable is added to the command.

Visitor Score
[Total: 0 Average: 0]

Auto update Pi-hole lists

One way of updating the lists on a Pi-hole system is to edit the /etc/cron.d/pihole file.

However there is another way. You can use the php script “/home/pi/listupdate.py” below

#!/usr/bin/env python
# run this directly on the pihole in cron:
# 00 07 * * * /usr/bin/python3 /home/pi/listupdate.py

import json
import urllib
import csv
from time import strftime
from urllib.request import urlopen
from subprocess import call

# set date
tdate = strftime("%d.%m.%Y")
# dns requests and blocked domains
ddata = urlopen('').read()
dbody = ddata.decode('utf-8')
ddata = json.loads(dbody)
queries = ddata['dns_queries_today']
blocked = ddata['ads_blocked_today']

# before update
bdata = urlopen('').read()
bbody = bdata.decode('utf-8')
bdata = json.loads(bbody)
before = bdata['domains_being_blocked']

# listupdate
call(["/usr/local/bin/pihole", "-g"])

# after update
adata = urlopen('').read()
abody = adata.decode('utf-8')
adata = json.loads(abody)
after = adata['domains_being_blocked']
domains_change = after - before

# append csv
outrow = [tdate,queries,blocked,before,after,domains_change]
with open(r'/home/pi/domainchange.csv', 'a') as f:
writer = csv.writer(f)

Don´t forget to add the script to the crontab (crontab -e).

Visitor Score
[Total: 0 Average: 0]

Prep Raspberry for Pi-hole

Raspberry Pi is great for filtering adds (and more). Build your Pi-hole on a Raspberry Pi !

First purchase your Raspberry Pi (starterkit with all you need or grab the stuff you need yourselves).

During the first boot of Raspbian (the operating system), answer all questions (defaults are OK in most cases).

Now launch the settings menu and set a fixed IP address and enable SSH

Update all packages on you Raspberry (from a terminal) :

$ sudo apt-get update && dist-upgrade or sudo apt-get update && sudo apt-get upgrade

open a terminal and install “Webmin” for easy maintenance :

$ sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
$ wget -qO- http://www.webmin.com/jcameron-key.asc | sudo apt-key add
$ sudo add-apt-repository "deb http://download.webmin.com/download/repository sarge contrib"
$ sudo apt update
$ sudo apt -y install webmin

Install Pi-hole (still in the terminal) :

$ curl -sSL https://install.pi-hole.net | bash

answer all questions (again defaults are OK in most cases).


Visitor Score
[Total: 0 Average: 0]

PC voeding connector layout en spanningen

Hier vind je op welke pinnen wélke spanningen staan. Zoals je ziet zijn een groot aantal verschillende uitgangsspanningen aanwezig op een PC voeding: AT/ATX: +5V, -5V, +12V, -12V en ATX: 3.3V.

Let wel op: dit is de gespecificeerde kleurenstandaard en pinout. Er zijn echter ook voedingen die afwijkende kleuren gebruiken, terwijl ze wel dezelfde pinout gebruiken. Héle oude voedingen, of voedingen van OEM’s zoals Compaq / HP / IBM / Dell (vóór 2002) en nonPC voedingen (Apple bijv. met afwijkende 28VDC) hebben soms een afwijkende pinout. Vaak kun je deze vinden via Google of bij de supportafdeling van de fabrikant. Dit zijn dan strikt genomen geen AT/ATX voedingen. Fujitsu-Siemens gebruikt soms voedingen met afwijkende kleurcode, maar meestal zijn deze wel ATX compliant, zie ook hier
Kleur zegt niets, en meten is weten!

Bij het meten van spanningen bij een niet aangesloten moederbord, moet pin “PS_ON” (groene draad) aan “ground” gelegd worden met een draadbrug, anders wordt de voeding niet ingeschakeld en meet je niets !!

PC voeding connector layout en spanningen PDF

Visitor Score
[Total: 0 Average: 0]

Kodi TVAddons

Kodi is an open source media player software developed by the XBMC Foundation. It is now on it’s fifteenth version and works on a wide variety of platforms and devices ranging from home computers, to tablets and mobile phones, to set top boxes.

Once you’ve installed Kodi, you’ll need to enable third party add-ons in order to gain access to all that endless content you want to watch.
Instead of searching for the addons manually and then install them one by one, there is an easier solution : TVAddons.ag

There are a few different ways to install add-ons to your Kodi setup, but first you’ll need to configure the Fusion Installer server onto your device. Once that’s done, go ahead and use the Config Wizard (best) or the Addon Installer tool to get all the goodies.

Enjoy, greetz M.

Visitor Score
[Total: 0 Average: 0]

How to change soft returns with hard returns in Microsoft-Word and Libre Office Writer

How to change soft returns with hard returns using the Microsoft-Word find-and-replace function.
How do I do this?
Open the find-and-replace window (CTRL-H) and Find ^l (lower case L) and Replace with ^p (lower case P).

When using Libre Office Writer :

Open the find-and-replace window (CTRL-H) and Find \n (lower case N) and Replace with \n (lower case n). Under More Options check Regular Expressions

I know, both parameters are the same ! Don’t ask me why, but it works ….

Easy as that ! Greetz, M.

Visitor Score
[Total: 0 Average: 0]

The promised free Windows 10 upgrade can become a real disappointment

So Microsoft got you really exited about the free Windows 10 upgrade. Unfortunately not all systems are able to run the new Windows 10 OS, even if the Windows 10 upgrade is presented.
Here’s what Microsoft says you need to run Windows 10 :

  • Processor: 1 GHz or faster
  • RAM: 1 GB for 32-bit or 2 GB for 64-bit
  • Free hard disk space: 16 GB for 32-bit or 20 GB for 64-bit
  • Graphics card: Microsoft DirectX 9 graphics device with WDDM driver
  • A Microsoft account and Internet access

So in order to be able to run Windows 10 (or Windows 8/8.1), you need a processor that supports PAE, NX, and SSE2. Without this, your Windows 10 fun comes to an end.

Now if you’re the sort of person who is a walking encyclopedia of tech trivia, then you might notice how these specs are the same as those for Windows 7. But there is one gotcha that you need to be aware of, and this only becomes apparent if you pull up the specs for Windows 8/8.1 and look closer at the processor specs:

  • Processor: 1 gigahertz (GHz) or faster with support for PAE, NX, and SSE2

Microsoft offers a handy primer on what these mean.

  • PAE gives 32-bit processors the ability to use more than 4 GB of physical memory on capable versions of Windows, and is a prerequisite for NX.
  • NX helps your processor guard the PC from attacks by malicious software.
  • SSE2 is a standard instruction set on processors that is increasingly used by third-party apps and drivers.

So, how can you tell if your processor supports all of this? There are a few ways:

  • Download and run the Windows 8/8.1 Upgrade Assistant. If your hardware is not up to spec, it’ll tell you, saving you gigabytes of downloads.
  • Try installing Windows 8/8.1. If it won’t work, the installer will tell you before you wade out beyond your depth.
  • Start the Windows 10 upgrade. The Assistant will check your system and tell you if the system will run Windows 10.
  • Download and run a handy utility called CPU-Z (portable version). Look under Instructions and if you see SSE2, EM64T (indicates the processor has support for PAE) and either VT-d or VT-x (which is what’s needed for NX support) then you’re ready to rock.
  • Manually check out your CPU by wading through this list. This will tell you directly if the CPU supports NX, and it will be listed as "NX / XD / Execute disable bit".

NX can be a pain in the behind because while your processor might support it, it could be disabled in the system BIOS, which then means having to dig around looking for the on switch.

To install a 64-bit version of Windows 8.1 (not Windows 8) on a 64-bit PC, your processor also needs to support CMPXCHG16b(which also, annoyingly, needs motherboard support, so it can be hard to test for), PrefetchW, and LAHF/SAHF, which adds more confusion. Fortunately, most people will have this already.

If you’re running Windows 8/8.1 then you’re probably good to go. If you’re not then the installer will tell you. Beyond that, the older your PC is, the more likely you are to be outta luck.

Se be prepared and don’t be disappointed when your upgrade to Windows 10 fails !

Greetz, M.

Visitor Score
[Total: 0 Average: 0]

How do I remove old kernel versions to clean up the boot menu

When running a Ubuntu instance with limited disc space, the /boot can get filled with old (obsolete) kernels. If you run out of disk space on /boot, this is hou to clean up space.

First make sure there is still about 20 percent of disk space left on /boot by removing old kernel files (pick the large ones, but don’t delete the files with the highest kernel version !!)

If needed, fix any pending updates :
sudo apt-get install -f

Now run this command to “cleanup” old kernel versions :
dpkg –list|grep linux-image|awk ‘{print $2}’|sort -V|sed -n ‘/’`uname -r`’/q;p’|xargs sudo apt-get -y purge

Only uname -r is between quotes on ~ key, rest are regular single quotes

greetz, M.

Visitor Score
[Total: 0 Average: 0]

Force Windows 7, 8, or 10 to Boot Into Safe Mode Without Using the F8 Key

So you are reading instructions on some article that tells you to reboot into Safe mode. You ask how you do that, and are told to use the F8 key when the computer boots up. But you just can’t seem to get the F8 key to work… so how do you boot into Safe mode?

There’s an option in the well-known System Configuration utility that will let you force Windows to always boot into Safe mode… until you turn the option off.
Force Windows to Boot into Safe Mode

Open up the start menu search or run box, and type in msconfig and hit the enter key. This should work in any version of Windows, including Windows 8 or 10. You can also use WIN + R to open the Run box and type it in there.

Select the Boot tab, and then check the box for “Safe boot” and make sure the radio button below is set to “Minimal”.

Once you hit the OK button you’ll be asked if you want to Restart now or wait until later. Either way, the next boot will take you into safe mode.

Once you restart, you’ll realize that you are in Safe Mode because it not only places that text in the four corners of the screen, but it even opens up the safe mode page from the help file in Windows 7 or Vista.

Once you are done fixing whatever you were working on, you’ll probably want to turn safe mode off and go back to normal mode. Just open up msconfig the same way as above, and then on the Boot tab you’ll uncheck the “Safe boot” checkbox.

So don’t forget to turn Safe Mode Back Off !!!!

This method especially helps if you need to repeatedly boot into Safe mode.

Greetz, M.

Visitor Score
[Total: 0 Average: 0]