Prep Raspberry for PiHole

Raspberry Pi is great for filtering adds (and more). Build your PiHole 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 PiHole (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.

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.

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.

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.

helpful tcpdump command options

When creating a tcpdump, you don’t want to exclude to much information, to prevent a trace becoming useless. However large output files can be a pain to load and examine in Wireshark. There are some solutions though.

Create multiple files

tcpdump -n -C 128 -W 100 -i eth0 -w /tmp/packetlog.pcap &

  • -n don’t do reverse lookup on IPs, don’t convert port numbers to text descriptions, don’t convert MAC addesses to names, etc..
  • -C 128 rotate capture files every 128,000,000 bytes (128MB)
  • -W 100 limit the number of capture files being rotated (see -C) to 100
  • -i eth0 capture on interface eth0
  • -w /tmp/packetlogs/packetlog.pcap use file name /tmp/packetlogs/packetlog.pcap
  • & this is parsed by bash; indicates that the command should be run in the background (asynchronously)

Split the output file into smaller chunks

how to split a pcap file into a set of smaller ones :

tcpdump -r old_file -w new_files -C 10

The “-C” option specifies the size of the file to split into. Eg: In the above case new files size will be 10 million bytes each.

Enjoy ! M.

Failed to deploy OVF package: The task was canceled by a user (Solution)

Tried to deploy a OVF package. After finishing the wizard, vSphere stopped the deployment with the message “Failed to deploy OVF package: The task was canceled by a user.“. However there was no other user logged in !

The fix for this is very easy :

  • Deleted *.mf file and change settings in the ovf file

If your not deploying an OVF package but an OVA package, extract the files from the OVA package (e.g. using 7zip). There are files with different extensions :

  • ovf – OVF descriptor, written in XML, which describes the hardware requirements
  • mf – contains SHA1 checksums of the .OVA and .VMDK
  • vmdk – the virtual hard disk for the virtual machine.

I immediately discarded the .mf. If you modify the .ova and don’t update the .mf, it’ll complain that the checksum is invalid. Removing this file seems to prevent vSphere from checking the checksums, which is useful, seeing as we want to poke around the .ova. After fiddling around inside the .ovf, I stumbled across the following line…

<rasd:ResourceSubType>vmware.cdrom.iso</rasd:ResourceSubType>

Changing the above line, to read…

<rasd:ResourceSubType>vmware.cdrom.atapi</rasd:ResourceSubType>

…appears to have fixed my deployment issues. Perhaps changing the ‘CD Drive Device type’ in the virtual machine’s settings would’ve fixed it. But by that point, I had already exported the OVA and deleted the source virtual machine.

Hopefully someone will stumble across this one day, and it’ll save them a few hours !

Greetz, M.

Installing the XBMC SuperRepo

Most of the best XBMC addons are available on SuperRepo (http://superrepo.org/), which is highly recommended if you have a XBMC box. The following steps will take you through how to install the XBMC SuperRepo on your media center using only a keyboard.

  • Once you have started XBMC navigate to the “system” menu and open the file manager.
  • Select “Add Source” on the left panel of the screen.
  • Click on the textbox with says “None” to open up the keyboard entry.
  • Type the url http://srp.nu and click done.
  • Enter a name for the media source in the textbox below.
  • The repo will now be added to your file manager.
  • Go to “System” and then “Addons”.
  • Click “Install from Zip”.
  • Locate the relevant repository for your XBMC version.
  • This should now be added to your “Get Add Ons” screen

Greetz, M.