VNCserver with GParted on headless Ubuntu server

I need to grow a disk on my Ubuntu server but only have SSH access to the machine and need GParted to do that.

Here’s how I’ve done it:

sudo apt-get install vnc4server openbox gparted
vnc4server 
vnc4server -kill :1
sed -i -e 's/x-window-manager/openbox-session/g' ~/.vnc/xstartup
vnc4server

Open port 5901 incoming, and access with a VNC client. Right-click to start the terminal within openbox, and you’ll be able to run any GTK+ apps, including gparted.

Disable BitLocker on Windows (perhaps for a HW change)

In a tight spot with BitLocker on your Windows system?
For example wanting to do a hardware change(s) to your system?
Become IT dept independent!

Disable BitLocker, do your changes, and turn it back on.

Please note : You will need an admin shell – not God mode, just a ‘run as admin’ dos box.

1) In the shell type:

 manage-bde -protectors -disable C:

2) Do the changes.

3) Turn it back on:

 manage-bde -protectors -enable C:

Thats it. YMMV
This is also a decent resource:
http://technet.microsoft.com/en-us/library/dd875513(v=ws.10).aspx

Elenco streaming radio per Radio 105, RMC & Virgin Radio

105 Best 4U  		http://shoutcast.unitedradio.it:1213
105 Channel 1 - 105 FM	http://shoutcast.unitedradio.it:1101
105 Classics		http://shoutcast.unitedradio.it:1105
105 Hip Hop/R&B		http://shoutcast.unitedradio.it:1113
105 Hits  		http://shoutcast.unitedradio.it:1109
105 House  		http://shoutcast.unitedradio.it:1203
105 Latino  		http://shoutcast.unitedradio.it:1209
105 Music Star Vasco  	http://shoutcast.unitedradio.it:1409
105 Rock  		http://shoutcast.unitedradio.it:1117
105 Story  		http://shoutcast.unitedradio.it:1313
GROOVE 80  		http://shoutcast.unitedradio.it:1119
MALIBOOMBOOM RADIO  	http://shoutcast.unitedradio.it:1201
MyRadio  		http://shoutcast.unitedradio.it:1305
Radio Bau & Co		http://shoutcast.unitedradio.it:1405
Revolver  		http://shoutcast.unitedradio.it:1411
RMC  			http://shoutcast.unitedradio.it:1103
RMC 60  		http://shoutcast.unitedradio.it:1317
RMC 70  		http://shoutcast.unitedradio.it:1407
RMC 80  		http://shoutcast.unitedradio.it:1401
RMC 90  		http://shoutcast.unitedradio.it:1403
RMC Film  		http://shoutcast.unitedradio.it:1123
RMC Great Artists	http://shoutcast.unitedradio.it:1111
RMC Italia  		http://shoutcast.unitedradio.it:1211
RMC Love Songs  	http://shoutcast.unitedradio.it:1121
RMC Marine  		http://shoutcast.unitedradio.it:1311
RMC The Best  		http://shoutcast.unitedradio.it:1205
RMC Nights Story	http://shoutcast.unitedradio.it:1115
RMC2  			http://shoutcast.unitedradio.it:1107
Virgin palestre  	http://shoutcast.unitedradio.it:1315
Virgin Radio  		http://shoutcast.unitedradio.it:1301
VIRGIN Rock Alternative http://shoutcast.unitedradio.it:1513
VIRGIN Rock Classico 	http://shoutcast.unitedradio.it:1307
VIRGIN Rock Extreme  	http://shoutcast.unitedradio.it:1309
ZOO RADIO  		http://shoutcast.unitedradio.it:1413

VMware ESXi – expand RAID and resize VMFS datastore – also on non-HP server hardware

Recently, I extended my RAID 5 array with 2 extra disks from 3x 146GB to 5x 146GB, creating thus a logical RAID 5 volume of (5x 146 – 146=) 584GB. Since I didn’t want to move my VM’s to another box and reformat the datastore, I gathered all the info on the internet and made this manual.

Notes:

    * All the instructions are executed on a whitebox (i7 3770) and a SmartArray P400 controller.
    * I already modified the HP ESXi tools to be able to run on non-HP hardware.
    * It is highly recommended that you backup all your VM’s before executing a single command.
    Everything worked fine for me but one error in a command could lead to a complete data loss of everything!
    * To see the rebuilding status, HP has a tool called hpacucli which allows you to control the array and see the status of it out of the ESXi console.
    * I’m NOT responsible for YOUR mistakes. See note 3.

This is my old situation:

The steps:

– Add disks to your RAID array using ACU (offline boot CD)
hpacuoffline-9.10-22.0.iso

Explaining how to add disks is beyond the scope of this guide.

If you’re using non-HP server, get these modified HP tools:
hpacucli-9.10-22.0-esxi_mod.vib
hpbootcfg-01-01.02-esxi_mod.vib
hponcfg-04-00.10-esxi_mod.vib
char-hpilo-500.9.0.0.9-esxi_mod.vib

– Install HP tools on your non-HP ESXi server

scp *.vib root@esxserver:/tmp/
ssh root@esxserver
esxcli software vib install -f -v /tmp/hpacucli-9.10-22.0-esxi_mod.vib
esxcli software vib install -f -v /tmp/hpbootcfg-01-01.02-esxi_mod.vib
esxcli software vib install -f -v /tmp/hponcfg-04-00.10-esxi_mod.vib
esxcli software vib install -f -v /tmp/char-hpilo-500.9.0.0.9-1OEM.500.0.0.434156.x86_64-esxi_mod.vib

OR

– Get HP’s ESXi5 Offline Utilities
hp-HPUtil-esxi5.0-bundle-1.3-6.zip

– Install HP tools on your HP ESXi server
scp hp-HPUtil-esxi5.0-bundle-1.3-6.zip root@esxserver:/tmp/
ssh root@esxserver
esxcli software vib install -d /tmp/hp-HPUtil-esxi5.0-bundle-1.1-38.zip

After installing the tools, reboot ESXi server. Login again on your ESXi server using SSH or console.

– Check and expand logical drive to max
/opt/hp/hpacucli/bin/hpacucli controller slot=18 show config
/opt/hp/hpacucli/bin/hpacucli controller slot=18 array all show detail
/opt/hp/hpacucli/bin/hpacucli controller slot=18 logicaldrive 1 modify size=max
/opt/hp/hpacucli/bin/hpacucli controller slot=18 array all show detail
If you don’t know your controller slot number, use
/opt/hp/hpacucli/bin/hpacucli controller all show config

Reboot ESXi server. Login again on your ESXi server using SSH or console.

– Get the ID of your VMFS datastore
vmkfstools -P “/vmfs/volumes/datastore-nameIn my case:
Partitions spanned (on “lvm”):
mpx.vmhba1:C0:T0:L0:3

– Get the starting sector size of the VMFS partition
partedUtil getptbl “/vmfs/devices/disks/mpx.vmhba1:C0:T0:L0″

In my case:
3 10229760 573367046 AA31E02A400F11DB9590000C2911D1B8 vmfs 0

– Find usable sectors (free space)
partedUtil getUsableSectors “/vmfs/devices/disks/mpx.vmhba1:C0:T0:L0

In my case:
1146733318

– Resize VMFS partition
partedUtil resize “/vmfs/devices/disks/mpx.vmhba1:C0:T0:L03 10229760 1146733318

– Grow VMFS partition
vmkfstools –growfs “/vmfs/devices/disks/mpx.vmhba1:C0:T0:L0:3” “/vmfs/devices/disks/mpx.vmhba1:C0:T0:L0:3

Yes, you need to specify twice the same partition.

– Refresh the datastore in vSphere

New situation:

Done.

Windows 2008 R2 Server & Windows 7 Pro: Unidentified network unchangeable

After installing Windows 2008 R2 inside VMware, I changed the network driver from E1000 to VMNET3. No problem, Windows 2008 R2 recognized the new adapters after a reboot. I only had to change the DHCP IP address to fixed IP. And then the problems started: apparently Windows 2008 (or Windows 7) won’t let you change the network location as soon as it has put the network in the ‘Unidentified network’ category. Trying ‘to fix’ this problem using the Windows ‘Diagnose’ tool just removed the fixed IP address and put it back on DHCP (and strangely, now the network category is Public).

This, of course, sucks.

However, this little trick should work:

1. Start –> run –> MMC –> press enter

2. In MMC console , from menu file select Add/Remove Snap-in

3. Select Group Policy Object editor –> Press Add –> select Local computer –> press OK –>press OK

4. Open Computer configration –>Windows Settings –>Security Settings –>select Network list manager policies

5. Double click –>Unidentified networks

Then you can select the option to consider the Unidentified networks as private.

This worked for me !

Synology DSM 4.1’s VideoStation and DVB-T channels list fix

Tried to get my EyeTV Diversity DVB-T USB stick to work with my Synology DS-1512 and the VideoStation program.
DSM recognises the USB stick but when I tried a channel scan (selecting Country: Italy and Region: Italy), nothing came up.

So, it must be a faulty channel list then. DSM VideoStation uses this list:

/volume1/@appstore/VideoStation/etc/synodvb_t/Italy

and this contains:

# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy

### VHF - Band III ###
# 5
T 177500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
# 6
T 184500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
# 7
T 191500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
# 8
T 198500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
# 9
T 205500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
# 10
T 212500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
# 11
T 219500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE
# 12
T 226500000 7MHz 2/3 NONE QAM64 8k 1/32 NONE

… etcetera, etcetera. Using this (Italian) channel site http://www.dgtvi.it/copertura.php, I looked up the stations that are available in my are (Monte Fasce) and put them manually in a new file called ‘My Region’:

/volume1/@appstore/VideoStation/etc/synodvb_t/My Region
T 682000000 8MHz AUTO AUTO AUTO AUTO AUTO NONE
T 786000000 8MHz AUTO AUTO AUTO AUTO AUTO NONE
T 642000000 8MHz AUTO AUTO AUTO AUTO AUTO NONE
T 674000000 8MHz AUTO AUTO AUTO AUTO AUTO NONE
T 546000000 8MHz AUTO AUTO AUTO AUTO AUTO NONE
T 514000000 8MHz AUTO AUTO AUTO AUTO AUTO NONE
T 626000000 8MHz AUTO AUTO AUTO AUTO AUTO NONE
T 722000000 8MHz AUTO AUTO AUTO AUTO AUTO NONE
T 594000000 8MHz AUTO AUTO AUTO AUTO AUTO NONE
T 698000000 8MHz AUTO AUTO AUTO AUTO AUTO NONE
T 758000000 8MHz AUTO AUTO AUTO AUTO AUTO NONE

Now, turning back to VideoStation, I was able to select this new region file and WOW: it’s working!
VideoStation is now happily scanning for channels.

HP Smart Array RAID management on ESXi 5 – hpacucli

I’ve got a nice ESXi 5 whitebox with a HP P400 RAID controller wich I would like to configure and monitor. But, HP won’t let you install there software if the Hardware Vendor ID is not from HP. You’ll get errors like this when try to install:

/tmp # esxcli software vib install -f -v /tmp/hpacucli-9.10-22.0.vib
[NoMatchError]
BIOS vendor HP is required but host BIOS vendor is To Be Filled By O.E.M.
BIOS vendor Hewlett-Packard Company is required but host BIOS vendor is To Be Filled By O.E.M.
BIOS vendor Hewlett-Packard is required but host BIOS vendor is To Be Filled By O.E.M.
BIOS vendor hp is required but host BIOS vendor is To Be Filled By O.E.M.
id = (Updated) ESXi-5.0.0-20120302001-standard
Please refer to the log file for more details.

There are tips on the internet where you can download the software, un-7Zip the .vib, modify the descriptor.xml by removing any hardware reference to HP, recreate the .deb package, move it to the ESXi server, renaming it to .vib and voilà, a lot of work later you installed the tool.

Or just get my pre-modified package and install 🙂

Download, scp to your server, ssh into your server and run:

esxcli software vib install -f -v /tmp/hpacucli-9.10-22.0-esxi_mod.vib

Mac OSX 10.7 on ESXi and ‘root device uuid is xxx.xxx’ error

I moved my (fully working) OSX 10.7.4 installation from my old ESXi 5 white-box (with an Intel i5 720) to a new one (with an Intel i7 3770). And guess what: OSX didn’t boot.

Just some lines and this last output:

Root device UUID is xxxx.xxx.xx.xxxx

Crap. Google just came back with two (2 !) search results, neither of them giving me a solution. But wait, I’ve found it anyway:

– edit the VM settings with the VM powered off
– click on the Options tab
– click on the CPUID Mask menu item
– click Advanced
– scroll to the bottom of the window on the Virtual Machine Default tab
– under “Level 1” set “eax” to 0000:0000:0000:0001:0000:0110:1010:0101.

After clicking OK and OK, boot up the VM and voilà, your OSX installation is running again!

Yahoo!

VMware ESXi 5 and LSI1068E controller crap

Had lots of problems using my IBM BR10i and Dell SAS 5I/r controllers; performance under ESXi 5 was terrible.
Just 3.5 MB/s on write. Under Linux, write performance was around 110-120 MB/s. So WTF ?

I thought that all this was needed (disable Interrupt Routing):

# esxcli system settings kernel list -o iovDisableIR
# esxcfg-advcfg -k TRUE iovDisableIR (just the above command wasn't enough)
# auto-backup.sh
# auto-backup.sh (yes, twice!)
# reboot

Check:

# esxcfg-advcfg -j iovDisableIR
# esxcli system settings kernel list -o iovDisableIR


But in the end, this wasn’t it. Seems that LSI1068E based controllers disable all disk caching built into the drives by default.

If the server has battery backup you can enable basic drive caching on the Logical Volumes without risk (or, without a battery, WITH risk).

Goto www.LSI.com (The controller is made by LSI) and download and install MegaRAID Storage Manager. In short, install the VIB on your ESXi machine, the Manager on a Windows or Linux machine, sync their host names and enable all ports on the ESXi firewall for incoming TCP traffic.

Highlight the Virtual Raid Volume, right click, properties. Enable Cache and save. You have to do this on every logical raid volume.

Your performance difference is incredible.

And I just lost a day of looking for the solution. Crap.

Publish the Daily Garfield on Facebook shell script

For years now, I’m posting the daily Garfield and Dilbert comic on my Facebook page.

This is the (clumsy) script that does that:

#!/bin/sh
URLBASE="http://comics.kamens.brookline.ma.us/cgi-bin/comics?which=specified&Garfield=include&specified=Garfield&numdays=1&width=&height=&noheaders=on&reload=reload"
wget -O page.html -erobots=off ${URLBASE}/
IMGURL=`grep "assets.amuniversal.com" page.html | awk -F'"' '{print $8}' | head -1`
wget -O garfield.gif ${IMGURL}
./mail.pl garfield.gif your-mobile-FB-emailaddress "Daily Garfield"
rm -rf page.html && rm -rf garfield.gif

Since I don’t want to use Mutt or sendmail, I’m using perl and Mail::Sender:

Mail.pl:

#!/usr/bin/perl -w
# Usage: ./mail.pl attachment to-address subject
my $file = $ARGV[0];
my $tolist = $ARGV[1];
my $subject = $ARGV[2];
my $datum= `date "+%d-%m-%Y"`; # optional
use Mail::Sender;
$sender = new Mail::Sender;if ($sender->MailFile({ 
smtp => 'localhost', 
from => 'fromuser@domain.com', 
to => "$tolist", 
subject => "$subject - $datum", 
msg => " ", 
file => "$file", 
}) < 0) { 
die "$Mail::Sender::Error\n"; 
} 
print "Mail sent OK.\n";

As always, YMMV.