Install Domoticz on the Raspberry PI 3

Posted by ronald on februari 1, 2018 in Nieuws with Comments closed |

Raspberry PI 3B

32GB Class 10 MicroSD




Installatie van Domoticz package:

sudo curl L | bash


Remove LUN from RHEL 6.5

Posted by ronald on april 29, 2015 in RHEL with Comments closed |

Logon as root


First remove LUN from Volume group:

vgreduce /dev/mapper/mpathX


Then remove pv signature:

pvremove /dev/mapper/mpathX


First remove scsi devices from the multipath device of mpathX.

The following script will display what to remove:


if [ -L /dev/mapper/$LUN ]
multipath -l $LUN | grep -v policy | grep -v size  | grep -v “$LUN” | sed “s/.*sd/sd/g” | awk ‘{ print $1 }’ | while read devnode
nodeloc=$(lsscsi | grep -w “${devnode}” | awk ‘{ print $1 }’ | tr -d ‘[‘ | tr -d ‘]’)
echo echo 1 \> \”/sys/class/scsi_device/$nodeloc/device/delete\”

Example output:

echo 1 > “/sys/class/scsi_device/0:0:1:6/device/delete”
echo 1 > “/sys/class/scsi_device/1:0:1:6/device/delete”
echo 1 > “/sys/class/scsi_device/0:0:0:6/device/delete”
echo 1 > “/sys/class/scsi_device/1:0:0:6/device/delete”


Run this output.

After this run:

multipath -F

multipath -r






Show all LUN’s on RHEL 6.5

Posted by ronald on april 29, 2015 in RHEL with Comments closed |

Logon as root


Create a script called showluns

echo “pvscan…”
pvscan > /tmp/pvscan.out
echo “collecting mpaths”
mpathlist=$(multipath -ll -v 1 | sort)
echo “”
for mpath in $mpathlist
multipath -l $mpath > /tmp/multipath.$mpath.out
size=$(cat /tmp/multipath.$mpath.out | grep “size=” | awk ‘{print $1 }’ | sed “s/size=//g”)
lunid=$(cat /tmp/multipath.$mpath.out | head -n 1 | awk ‘{print $2 }’ | tr -d ‘)’ | tr -d ‘(‘ )
vgname=$(grep -w /dev/mapper/$mpath /tmp/pvscan.out | grep -w VG | awk ‘{ print $4 }’)
ispv=$(grep -w /dev/mapper/$mpath /tmp/pvscan.out | grep -w PV | awk ‘{ print $4 }’)

if [ -z “$vgname” ]


if [ -z “$ispv” ]




vgname=”FREE PV”



echo “$mpath $lunid $size $vgname ”
rm -f  /tmp/multipath.$mpath.out

RHEL6.5 Scan for new SAN LUN’s

Posted by ronald on april 29, 2015 in RHEL with Comments closed |

Logon as root


Depending on how many ports/adapters issue: (in my case 2 ports)

echo 1 > /sys/class/fc_host/host0/issue_lip
echo 1 > /sys/class/fc_host/host1/issue_lip


Remap found devices with multipath.

multipath -r



RHEL65: Rename the operating system volume group

Posted by ronald on februari 17, 2015 in Nieuws with Comments closed |


Login as root


# vgrename  oldvgname newvgname


# vi /etc/fstab

replace vgnames


# vi /etc/grub.conf

replace vgnames


# this will cause an extra reboot because of rebuilding SElinux database

# touch /.autorelabel

# reboot


SELinux errors “Unable to get valid context for” after cloning system

Posted by ronald on februari 17, 2015 in Nieuws with Comments closed |

The simplest way to solve this:


# touch /.autorelabel

# reboot


If you’re system is crashing first boot from DVD or recovery media. Mount the root filesystem and:

# touch /mnt/.autorelabel

# reboot


mkvmerge voorbeelden

Posted by ronald on februari 6, 2015 in Nieuws with Comments closed |


# verwijderen subtitles

mkvmerge –nosubs -o outputfile-nosubs.mkv inputfile.mkv


# Toevoegen van nederlandse ondertiteling aan bestaande mkv file

mkvmerge -o ouputfile-nlsub.mkv inputfile.mkv –language 0:dut


# mkv file maken met mp4 en srt file

mkvmerge -o outputfile.mkv inputfile.mp3 –language 0:dut


PXE Boot for ESXi5.x deployment on RHEL6.5

Posted by ronald on juli 20, 2014 in Nieuws with Comments closed |

Install necessary packages


Install PXE boot stuff

mount /dev/cdrom /mnt
rpm -ivh syslinux-4.02-8.el6.x86_64.rpm mtools-4.0.12-1.el6.x86_64.rpm
Install http server for kickstart file
rpm -ivh httpd-2.2.15-29.el6_4.x86_64.rpm apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm  httpd-tools-2.2.15-29.el6_4.x86_64.rpm  apr-util-1.3.9-3.el6_0.1.x86_64.rpm apr-1.3.9-5.el6_2.x86_64.rpm
umount /mnt

Prepare the tftp boot directory for PXE boot

In my case I change the tftpboot directory to /tftpboot
cd /tftpboot/
mkdir -p pxelinux.cfg
cp /usr/share/syslinux/pxelinux.0 /tftpboot/
cp /usr/share/syslinux/menu.c32 /tftpboot/


Prepare ESXi iso image

# copy content esx install iso
mkdir -p /tftpboot/esxi5.1.2
mount -o loop ESXi-5.1.2-1483097-IBM-20140305.iso /mnt
cp -var /mnt/* /tftpboot/esxi5.1.2/

cd /tftpboot/esxi5.1.2/
vi /tftpboot/esxi5.1.2/boot.cfg
Remove all / with vi commando :1,$s/\///g


Create a default PXE start file

vi /tftpboot/pxelinux.cfg/default
DEFAULT menu.c32
MENU TITLE ESX server PXE Boot Menu

LABEL hddboot
MENU LABEL ^Boot from local disk 0
LABEL deploy ESXi
KERNEL esxi5.1.2/mboot.c32
APPEND -c esxi5.1.2/boot.cfg ks=http://ipaddresswebserver/ks.cfg
LABEL manual ESXi install
KERNEL esxi5.1.2/mboot.c32
APPEND -c esxi5.1.2/boot.cfg
MENU LOCAL ^ manual ESXi install

 Create a default kickstart file

vi /var/www/html/ks.cfg

vmaccepteula” > /var/www/html/ks_$macaddress.cfg
# generate with  openssl passwd -1
rootpw –iscrypted \$1\$ANP7EE9q\$5QOi7ryY40AlX0lOQJTPm1
clearpart –firstdisk=usb-storage
install –firstdisk=usb-storage”
network –bootproto=dhcp –device=vmnic0

# Enable SSH and the ESXi shell
vim-cmd hostsvc/enable_ssh
vim-cmd hostsvc/start_ssh
vim-cmd hostsvc/enable_esx_shell
vim-cmd hostsvc/start_esx_shell
esxcli network firewall ruleset set -e true -r httpClient

Setup local time server for iMac on Mac OS X

Posted by ronald on november 10, 2013 in Nieuws with Comments closed |


Just run:

sudo systemsetup -setnetworktimeserver “ iburst”


Check with:

ntpdc -p


Other commands:

sudo systemsetup -getusingnetworktime

sudo systemsetup -getnetworktimeserver

Add reply-to header in Mac OS X Mail

Posted by ronald on oktober 15, 2013 in Overigen with Comments closed |


Mac OS X Mail

To make Mac OS X Mail add a custom “Reply-To” header line to all emails you send:

  • Open Terminal.
  • Type “defaults read UserHeaders”.
  • Press Enter.
  • If that command returns “The domain/default pair of (, UserHeaders) does not exist”:
    • Type “defaults write UserHeaders ‘{“Reply-To” = “reply-to@address”; }'” (excluding the outermost quotation marks) and replace reply-to@address with the address you want to be used for replies.
  • If the “defaults read” command above returns a line of values that starts with “{” and ends in “}”:
    • Highlight the entire line. It might read something like {Bcc = “bcc@address”; }, for example.
    • Press Command-C.
    • Type “defaults write UserHeaders ‘” (excluding the outer quotation marks).
    • Press Command-V.
    • Type “‘”.
    • Insert ‘”Reply-To” = “reply-to@address”; ‘ in front of the closing “}” character, replacing reply-to@address with the email address you want to be used for replies.
      The line might now read defaults write UserHeaders ‘{Bcc = “bcc@address”; “Reply-To” = “reply-to@address”; }’, for example.
  • Press Enter.


Unfortunately, this method of adding a Reply-To header works too well in some situations. Once in place, there is no way to make Mail not append it to a particular mail. You cannot change the address while composing a message either.

To make any changes to the Reply-To header, you have to go the route of the terminal.

Disable Automatic Reply-To Headers Again in Mac OS X Mail

To turn off all “Reply-To:” headers:

  • Execute “defaults delete UserHeaders” at a Terminal prompt to delete all custom headers or set UserHeaders back to what it was before you added “Reply-To”.

Copyright © 2012-2018 Dutch Ronaldo All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from