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

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.

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).

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).


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

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.

Windows 10: How To Fix The Biggest Security And Privacy Flops

Microsoft privacy and security critics are concerned about the default OS settings that they say leave users vulnerable to security, privacy and, in some cases, malicious attacks.

Here are the top security gripes against Microsoft, and how to fix them.

Uninformed Consent: Windows 10 Default Install Setting Labeled Intrusive

Fix : Opt Out Of Installation Privacy Shakedown
To ensure Windows 10 isn’t sharing too much about you to Microsoft, when you install the operating system don’t choose “express install.” Instead, choose “custom install,” which gives you the options of reviewing privacy settings before you hand over your privacy keys to Microsoft.
Here you’ll be presented with nearly a dozen dialogue boxes featuring options that allow you to choose and tweak what you want to share with Microsoft from your location, personal contacts, and potentially sensitive information you are working on at the time your PC crashes and is sent back to Microsoft as part of an error report.

Windows 10 Users Get Targeted

Fix : To tell only Microsoft to take a hike when it comes to targeting ads to you, go to Settings > Privacy and then turn off “Let apps use my advertising ID for experiences across apps.” This tip also works with Windows 8.1.

Wi-Fi Sense Hysteria: Here’s The Antidote

Did you hear Microsoft is secretly sharing your network passwords behind your back? That was the largely overblown synopsis of many who were critical of Windows 10’s Wi-Fi Sense feature that was automatically turned off by default when people installed or upgraded to the new OS.
The feature is designed to help you, and the contacts you explicitly handpick, to share password-protected Wi-Fi hotspot information to speed up identifying and logging onto the hotspots. Wi-Fi Sense only shares Wi-Fi passwords between Windows 10 users that opt into the service, and only encrypted passwords are shared — preventing anyone from ever actually seeing a password.
The service allows you to choose from Outlook.com contacts, Skype contacts or Facebook friends.
Fix : To double-check that this feature is disabled, go to Settings > Network and Internet > Manage Wi-Fi Settings and make sure it’s off.

You Say Cortana, I Say Corta-NO

In order for Microsoft’s digital assistant Cortana to be effective, anticipating your needs and delivering geographically relevant query results, it needs to collect personal data about who you are and where you are. For some, who may favor Google Now or Apple Siri, they just want to say “no” to Cortana.
Fix : To ban Cortana from accessing your e-mails, contacts, location information and other data, turn it off by going to Start-> Settings -> Privacy -> Speech, Inking & typing and press the “Stop getting to know me” button.

Locking Down Microsoft’s Edge Browser

Microsoft Edge browser offers a refreshing, fast and uncluttered alternative to Internet Explorer. It’s definitely worth giving a shot. But, just like Chrome, IE and Firefox, there are settings that allow you to protect your privacy from advertisers and Microsoft.
To opt out of personalized ads served up from Microsoft using Edge, you’ll want to visit Microsoft’s “Personalized Ad Preferences” to turn off the targeted ads.
The Edge browser also works seamlessly with the Cortana digital assistant. One of the things Cortana does is track the URLs of the sites you visit with Edge so it can better answer Cortana queries based on your browsing patterns.
Fix : To turn Cortana on or off in Microsoft Edge, go to More actions > Settings, and under Advanced settings, select “View advanced Settings,” and then, under Privacy and services, turn the “Have Cortana assist me in Microsoft Edge” setting on or off.

Going Over The Edge?

Microsoft also tracks URLs you type in with a feature called SmartScreen Filter. Microsoft does this so it can automatically cross-reference the site you are about to visit with its own list of websites that are known to be malicious. Edge will warn you if the webpage has been blocked by redirecting you to a Microsoft page that details why you should avoid the webpage.
Fix : This feature is not unique and is something other leading browser makers do. Nevertheless, it may irk some privacy purists. To turn off this type of keystroke monitoring in your Edge browser, go to Settings > Advanced Settings and then below Privacy and Services, turn the “Help protect me from malicious sites and downloads with SmartScreen Filter” settings off.

App Permissions

Windows 10 is similar to iOS and Android in creating an app environment and Windows Store where you can download desktop and mobile apps. And just as Android and iOS, some Windows apps want to access account data such as name, a profile picture and other personal information.
Fix : To Microsoft’s credit, unlike Android and iOS, it offers a way to opt-out of that sharing. To opt-out of sharing, head over to your systems Privacy Settings > Account Info > and turn off “Let apps access my name, picture, and other account info.”

No Permission Granted

There are a host of apps that request access to your system’s camera, microphone and location. That type of access is typically innocuous, allowing you to use an app such as Facebook to access pictures on your device and share them with someone who is close by. Want to use voice-to-text to comment on your friends Facebook status? Then Facebook needs access to your devices microphone, and there are some notorious examples, such as flashlight apps, that ask for too much permission for no reason.
Fix : By default, Windows 10 allows for this type of access. To keep the prying eyes and ears of people away, head over to Settings > Privacy > Camera (or Microphone) to turn the option off. You can choose to manage the apps on a per-app basis. To put the kibosh on sharing location data choose Settings > Privacy > Location.

Greetz, M.

Windows 7 and 8.1 ‘spy patches’

Four recent Windows 7 and 8.1 patches — KB 3022345, 3068708, 3075249, and 3080149 — are sending data to Microsoft’s servers.
According to Microsoft, the four patches are part of the Customer Experience Improvement Program and are only offered as optional downloads to users participating in this initiative.

List of telemetry updates to avoid :
KB2952664 Compatibility update for upgrading Windows 7
KB2990214 Update that enables you to upgrade from Windows 7 to a later version of Windows
KB3021917 Update to Windows 7 SP1 for performance improvements
KB3022345 Update for customer experience and diagnostic telemetry
KB3035583 Update installs get windows 10 app in Windows 8.1 and Windows 7 SP1
KB3068708 (replaces KB3022345) Update for customer experience and diagnostic telemetry
KB3075249 Update that adds telemetry points to consent.exe in Windows 8.1 and Windows 7
KB3080149 Update for customer experience and diagnostic telemetry

So make your choice in which updates to install and which to avoid !

greetz, M.

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.

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.