WD My Passport Pro SSD – SMBv2 / Win 10

To enable SMBv2 compatibility on the Western Digital My Passport Pro SSD, so that it supports Windows 10, go through the following steps.

1) Enable SSH access via the admin console
2) Use PuTTy/etc to log into the console
3) nano /etc/samba/smb.conf
4) add the line
[global] workgroup = WORKGROUP
server string = MyPassport Wireless Pro
netbios name = MyPassport
protocol = SMB2

5) run /etc/init.d/S75smb restart
6) try and browse to the \\ IP of the disk drive
7) If you can’t login (username admin) reset the password by typing
8) /usr/bin/smbpasswd -a admin
Enter the new password
9) Finally restart Samba again (per 5)
10) Profit?

Note, if your username/password isn’t recognised, use [email protected] as the username within Windows.

Booting Windows 2016 on HP G8 Microserver MicroSD Card

As good as FreeNAS has been, most of the clients on my home network are Windows based and speak CIFS/SMB,  and I’ve not had great success with FreeNAS reliably/stably serving these protocols.   Under load, the shares sometimes lock up and stop responding, and permissions can be a bit hit and miss.

FreeNAS support forums drink their own special brand of cool aid, so I’ve decided to try Windows, which, whilst being part of their own borg collective has a much wider base of users and obviously native integration with my client base.  So I’m piloting Windows Server 2016 with its various storage capabilities to see how it compares.
I’ve got a HP Microserver G8 which as well as 4 disk trays, supports a fifth SATA device via an additional ODD port, an internal USB and a MicroSD port, as well as various external USBs.
My FreeNAS is a previous N54L Microserver, which installs and boots easily to a USB drive, but Windows is a bit more pig-headed at booting from USB/MicroSD devices.
However, with the help of Daniels Tech Blog  I have managed to get my Microserver booting from the MicroSD Card
Daniels instructions are more or less spot on, except for one change.
list disk
select disk x
create partition primary
format quick fs=ntfs label="SD"
assign letter=C
dism /Apply-Image /ImageFile:D:sourcesinstall.wim /index:2 /ApplyDir:C:
bootsect /nt60 C: /force /mbr
bcdboot C:Windows

I couldn’t get that final line to write to the MicroSD. I kept getting errors about BCDBOOT not being able to write the files, or unable to find the source location. However, I read the documentation about BCDBOOT at Microsofts MSDN site and happened upon the command for writing to USB devices.

bcdboot C:Windows /s C: /f ALL

This seems to work fine, and a reboot allows Windows 2016 to boot.

Windows 7 Zombie Mapped Network Drives

In Windows 7, when using mapped drives on a laptop, you may find that after moving around (undocking, connecting via Wifi etc.) that the mapped drive becomes a zombie – it still exists, but is essentially dead. This seems particularly prevalant where offline folders are used. This appears to be caused by the network drive service starting before the network connection is necessarily stable. However, you can change the behaviour with a simple registry key.

Under HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider

add a new DWORD entitled RestoreConenction

Set the DWORD value to be 0

After a reboot, network drives will only be reconnected to when you try to access them through explorer or the file system APIs.

XPerience Points

It should come as no surprise at the massive gap between computers running Windows XP and a more modern variant. Yesterday, The Register published an article which mentions how ~500 million PC’s still run XP which goes end of life in April 2014.

The problem is that XP ‘just worked’ (eventually). It’s a relatively lightweight OS, straightforward to configure, reliable and for big IT outfits, part of their master machine image for an extended period. Why upgrade to something more complex, more finicky and frankly more unstable in Vista? And then if XP was working so well, why bother changing the images for Windows 7?

Well, the time has come for businesses and home users to think about replacing XP with something more modern. Windows 8 is about to become 8.1 and whilst it doesn’t necessarily fix everything that is broken in 8, it appears to be a good leap forward. Plus, its still possible to find Windows 7 machines in certain retailers for those who don’t want to learn the new UI. For those who only use the Internet, check-out a Chromebook which gives you a nice portal onto the WWW without the cruft of a heavyweight machine. For people who consider themselves reasonably confident IT users, why not checkout one of the Linux distributions; Ubuntu comes highly recommended to those who are Linux n00bz.

Whatever you do, I urge you to upgrade from XP. From April 2014 onwards, no patches, no updates, no security fixes. I find it highly likely that with that many PC’s still running XP that those with a financial interest in attacking these machines and using them for nefarious machines may be sitting on exploits and security holes that will never get fixed. Its in your, as well as everyone else’s interests that you consider your options now, and migrate by April 14.

When a Minimal Install Isn’t…

Over the past couple of days, I’ve been rewriting the recovery script for a Linux LAMP application I wrote about 5 years ago.  I test it every so often to make sure it still works.   This year,  it doesn’t. Basically, we’ve reached a stage where the software versions don’t support the LAMP stack I chose (XAMPP).  Besides,  XAMPP isn’t really suitable for production servers even though its served us well in the intervening years.

So,  I’ve embarked on updating the recovery script to fit in with an ‘off-the-peg’ LAMP stack which will be easier to maintain going forward.

My favorite distribution is Debian and that’s the one I’ve most experience with.  However,  the preferred distro in the office is RHEL, or variants based therein.   So I got myself a fresh download of the Fedora 19 network install CD, loaded it into the virtual machine and off we go.  The installer is a bit err, low-rent – pretty graphics and the like, but not a lot of options to choose.  I suppose I’m too used to the ‘expert’ mode of the Debian network install.  Anyway,  went through the necessary steps to get the network up and running, configure it to talk to our proxy server etc,  find the disk config menu (hidden off-screen on a low-res screen) then go to the package selection screen.  Being reasonably accomplished now in administering Linux systems, I went for the minimal selection so I could add the other packages later on,  and off we went.

I quite liked how you can set the root password and create a new user whilst the OS installs – thats efficient. Then that was that,  server installed.  And that’s when the trouble started.

Giving yum proxy access was straightforward (although why the configs don’t carry across from the installer, I don’t know) and getting the LAMP stack installed was straightforward.  The httpd service came straight up after install and was ready to go.  Except that it wasn’t.  I could not for the life of me get a http page to come up.  It seemed that SSH was the only default port opened.  I checked network config and that all looked okay.  I could even wget http://localhost and get a page back.  So why no external connection?   Then I discovered SELinux was installed and running.  Disabled that, and a reboot – still no damn connection!   There looked to be a load of IPTables rules still listed;  could they be a carryover from SELinux I wondered?  Dropped the iptable rules and magically got http access back.  Rebooted and same problem again.

After reaching out to a colleague who has a little more experience with these distro’s that I,  and after installing Webmin,  we discovered that firewalld was running on startup.

Now,  when I install a minimal distro installation, I expect the following:

  • A bootloader
  • A kernel
  • A shell
  • Enough configuration to get from the bootloader to a shell
  • An ability to extend the system with a package manager.

I do not expect other things to get in the way,  especially as I hadn’t asked for them.   SELinux and Firewalls are good practice, but I do not want them imposed on me, especially if I’m not expecting them.  There were a number of other packages loaded (wpa_supplicant) that to me do not classify as essential to getting Linux up and running.

Fedora 19 and I have not immediately started as friends.

Big Data Conversations.

I’m not sure people understand big data and mining the information held within. I’ll summarise a conversation I had today.

Me: Can I have that data-set please?
Other Person (OP): Its got over 20 million records in it, what do you want to know?
Me: I am thinking about x, and think your data set may answer some questions.
OP: What exactly are you looking for?
Me: I don’t really know, until I’ve seen the data and what information it holds.
OP: How do you know my data-set has the information you need?
Me: I don’t. but its the best chance I’ve got.

and so on and so forth…

I think sometimes big data mining is a bit like mineral mining. You can take samples and investigate indicative factors, but until you take hold of your pick-axe, you’ll never know exactly what is down there. Hopefully I’ll get access to the output and see what can be discovered from it. I am already thinking about visualisation techniques to find the shiny nuggets of data held within.

Adventures with the Omnima LCD Panel

I have recently picked up an Omnima LCD panel, a 3.5” QVGA (320×240) USB powered LCD panel with an SDCard slot and the ability to control it like a serial device over the USB port using the included cable.

Having an ARM7 based processor and a 2D graphics engine, it promises to be a great little versatile display panel for outputting information not requiring a full screen (sensor information e.t.c, news feeds, that sort of thing).  Plus, many of the LCD panels available on the internet either require an additional controller or some curious interfacing to be able to drive it.  For not a lot of cash, this prebuilt solution seems to be an ideal choice.

So that’s the good bit – the bad bit is that there doesn’t seem much support for it.  The supplier forums are quiet at best (and not accepting new sign-ups) and there doesn’t appear to be much documentation other than the PDF’s on the Omnima website/forum.  I suspect there may be more available if you buy the SDK tools, but these are expensive to say the least.  Plus, I don’t have that much interest in writing new code for the screen CPU because I believe the inbuilt functionality is enough, and I’m not skilled in C++ development.

Anyway, the screen (version 3 as shown on the website) itself works with LCDSmartie (I’m using v 5.4.1) and the DLL included in the forum worked after a fashion.  The OmnimaLCD.cmd file included in the ZIP file isn’t quite right.  The standard command ends up rendering every serial command to the screen, rather than the result of the command.  The below command sets it up properly.

#@Term MW Off
#@Term FW Off
#@FrColor 0 255 0 0
#@FloatWin Open 10 10 240 320
#@Line MW 10 10 50 10
#@Line MW 10 50 10 10
#@Line MW 10 190 10 230
#@Line MW 10 230 50 230
#@Line MW 270 10 310 10
#@Line MW 310 10 310 50
#@Line MW 270 230 310 230
#@Line MW 310 190 310 230

This turns off any terminal command writing to the screen, creates a black box on the screen, creates a float window to render the text in, and draws some nice green lines at the edges screen which I think look quite nice.  One thing to be aware of,  you can use 4 x 20 screen setting as recommended, and you can use 4 x 40 setting.  However, on the latter, if the text exceeds the screen width, you get text wraparound where it runs around onto the left of the screen.  Not so bad if you don’t have scrolling text and format your text lines appropriately.  Also, the on screen left position seems to be set in the DLL file – I had a bash at editing what looked like the command in a HEX editor, but to no avail.

A note really for myself – the line plotting code consists of x horizontal poz, x vertical poz, y horizontal poz, y vertical poz. 

The one thing I need to work out now is how to render pictures to the screen – apparently supported, but I’m not getting much joy with it.  The graphics processor apparently supports JPEG pictures, but when I try and load it, the unit locks up and needs a power cycle.  The documentation suggests I need to use the “oimage tool” to convert from JPG, PNG e.t.c to a compatible format:-

To generate files suitable for loading using FileToSSD you can make use of the oimage tool. This tool can load all popular image file formats such as jpg, gif, bmp and more, and save the file in the SSD compatible format.

I’ve Googled the heck out of oimage and SSD compatible format, but can’t find anything of relevance – if anyone has any clues, please leave me a note.  I’ve asked Omnima directly, but not yet had a response.  Given that the device is basically a mini picture frame, it would be nice to be able to load and display pictures as well as vector graphics, especially as the latter can be quite slow (I would guess at 500ms per line) on the LCDSmartie example above.  The documentation suggests that picture loading can be quite quick, but we’ll see. 

Finally, id like to get it working in LCD4Linux – I cant see it being too difficult if its just got to send information via text strings, but that’s a project for another time.

e.On Smart Meter development.

I have an eOn AMPY (Now Landis Gyr+) Smart Meter to monitor my electricity usage as well as a similarly enabled Gas Meter.   It also comes supplied with an eOn branded ‘ecometer’ which shows you energy usage on a current, daily, weekly, monthly and quarterly basis.  Because the smart meter is attached to the grid via a GPRS/GSM modem link, it is also ‘tariff’ aware, such that it gives an indicative figure on your bill.

However, the bit between the ecometer and the supplier’s website is where it all goes wrong – if you want a detailed understand of your power usage, you’re a bit stuck.  Because you can only see ‘current’ usage as a number, if you want to know how much you were using 15 mins ago, you’re stuffed, because the display isn’t detailed enough, and the website only updates on a monthly basis,

So, my plan is to try and understand the technology to see if there is a way of extracting the ‘live’ data as its transmitted from from the meter to the ecoMeter display, and I intend to track my progress here.

So, to start:-

Meter is an AMPY 5236E-Y which apparently has an mbus low power radio in it.
The ecoMeter display is an AMPY Model 5262

Inside the 5262 is a PCB with the LCD soldered to the front of it. However, there is a daughterboard tucked behind the LCD with a TI CC110, what looks like a Crystal Oscillator (ACT K7 26.00SCA) and a chip I can find no data on, but has the serial number 90-13026 037 something 7373vg.
Unfortunately I can’t currently see the controllers on the main board because of the LCD, but there is one ‘major’ microprocessor, and one small one. I suspect this is really just a logic chip and LCD driver.  The motherboard has the following stickers on it:
There is also a 9 point (3×3) contact patch on the back of motherboard which may be either a programmer or output. This is accessible from outside the case, if that makes a difference.

What I need to find out:-

More about the MBus Protocol
If there is any encryption between the meter and the display panel.
Any control panel options for the ecoMeter – e.g. is there a PIN to set or the like, and how this relates to the meter itself. Additionally, are there any hidden menu’s e.t.c.

Installing Debian Lenny on ML370 G3 with RAID Controller.

Whilst Debian Lenny is compatible with the Compaq/HP ML370 G3 with RAID Controller on-board, it took me a little work to get it installed and I wanted to document my efforts for myself and others!  This was a painful process to get it working, and perhaps isn’t for the weak of heart or those early in their Linux-ninja training, but hopefully this will guide you to the path of enlightenment and joy!

An ML370 G3 with sufficient hardware to boot/install e.t.c.
A copy of HP SmartStart (I used 7.20, others may work).
A copy of Windows 2003 (2000 may also work).
Debian Lenny NetInst CD
USB Stick formatted as FAT with ‘non-free’ Array Controller Driver saved to it (ql2300_fw.bin in my case).

How I did it:-

  1. Connect up the machine, power on and insert the HP SmartStart CD
  2. Once the SmartStart has booted, configure your array(s) as per your requirement.  In my case, I used 2x147GB drives in a RAID1 and 4x72GB drives in a RAID5.
  3. Do an operating system install, choose to install Windows and let it do its own partitioning.
  4. Let Windows install, don’t bother doing any major configuratoring as you’re going to wipe the server again shortly…
  5. Once Windows is installed and on the desktop, insert the Debian CD and Reboot.
  6. Boot to the Lenny Installer, and choose a ‘Standard Install’.
  7. Configure as normal.
  8. When you get to the bit about partitioning, choose the Manual Option.
  9. Goto the NTFS partition that the Windows install created, change it to an Ext3 format, ensure it is set to be bootable, and set the mount point to be /.
  10. Id leave other partition configuration until the point that you can boot Linux.
  11. Carry on and install whatever packages/components you require as standard.
  12. When you’re prompted to install the GRUB bootloader into the MBR – SAY NO
  13. You’ll be asked where you want to install the bootloader.  My partition was /dev/cciss/c0d0p1.
  14. Finish off the Installer, remove the CD and Reboot.
  15. Fingers x’d, you’ll get GRUB boot menu.  Mine then refused to boot the OS saying that the Operating System wasn’t found.   I edited the initial boot menu because it was referring to HD (1,0).  I changed this to HD (0,0) and it booted.
  16. Login to the console.
  17. If the GRUB editing worked, make sure to edit /boot/grub/menu.lst and permanently change the setting to HD (0,0) for each of the menu items.

Cool Runnings:-
This server when running at full tilt with the fans is a noisy noisy beasty! However, you can control those fans to make them run at a dull roar rather than full hurricane force chat.  Follow the instructions from Jonas Bjork related to Ubuntu. Debian works exactly the same way, but you’ll need to install SNMPD and libstdc++2.10-glibc2.2 (the latter you’ll have to manually download the .deb from the Etch repository).  Once its all installed, run the ‘hpasm activate’ command and follow the on-screen instructions.



As you may have heard, Google have decided to step into the Operating System arena by releasing one aimed at revolutionising the desktop OS market.  At launch, it will be targeted at the lightweight ‘netbook’ range of devices specifically for people who require regular, rapid access to the Internet.   Information coming from the Mountain View chocolate factory is that it uses the Linux kernel using a ‘new windowing system’, presumably their own GUI rather than relying on X Windows and KDE or Gnome.  Presumably it is a rework of the Android platform to better support larger screens, keyboards and mice, although they do say that the two projects are not intertwined.  The OS also has Chrome Browser built in and is designed to be an interface into ‘cloud’ computing resources that have been talked about over the last couple of years.  Because the big G now provides ‘office’ resources such as E-Mail, Documents, Spreadsheets and Presentations online, they don’t see the point in having massive computing resources on the desk to write a simple document, when their server infrastructure can provide that for free (on the basis that they’ll sell advertising to you) provided you can get online.

Its an interesting approach to take, and it will be interesting to see how it pans out.  However, I do have a few concerns.  Firstly,  the Internet is NOT yet all pervasive.  Sure, you might have it wall to wall at home, and you may have access in the office.  You may even have 3G on your phone or via a dongle to get online whilst you’re mobile,  but you don’t have to travel very far to enter an internet black hole.  For example in our Office,  I can get HSDPA access with T-Mobile and 3 Internet,  but BT/Vodafone barely even has a 2G signal.  Likewise driving home,  even though I travel the M6 corridor, one of the busiest routes on the motorway network,  there are at least 3 spots where the signal drops out completely.  At the moment, this isn’t a problem, because you don’t need access to the net 100% of the time to write a document or update your e-mail.  But if you’re sat there with a blank screen because your network has dropped out, frustration levels soon start to set in.   

Of course, you can get round all this with offline synchronisation, which is the one thing currently missing from another cloud computing environment you may be exposed to – Citrix.  However,  you’re then NOT working in the cloud when you’re working offline, which means more storage, processing and memory requirements, defeating the point of a lightweight computing model.

Maybe my fears are unfounded,  or will be addressed when 4G (WiMax or LTE) appears, but I still can’t see full coverage if you’re stuck up a mountain somewhere miles from the nearest transmitter.  Still, I await this project with interest and see how it pans out in the battle with Microsoft and the soon to be released Windows 7.   Its good to see Linux continuing to make inroads into the end user environment,  I just hope it doesn’t become the pervasive kernel standard to the detriment of other Linux projects.


You may have heard the tale attributed to various IT Thinkers of the early 20th century but generally now attributed to be Thomas Watson of the IBM Corporation.  The quote believed to be from 1943 goes “There is maybe a world market for maybe five computers”,  ironic considering how ubiquitous computing now is.  But the point is that Google is now building a single massive global computer (a mainframe if you will) that we all have access to via what could be pretty ‘dumb’ devices.  This computer currently runs the worlds most popular search engine,  it hosts videos,  allows you to go shopping and send Emails.  In 50 years time,  will computing be done not at the desk, but in ‘the world’?  Will we access the internet in the same manor that we access electricity today?  We currently plug an electrical appliance into a socket and it works using electricity.  In the future, will we plug a terminal into a socket and the internet ‘just works’.   Don’t be surprised if we move to a “pay for what you use” ‘net where you don’t buy access to the grid, but you do buy access to the resources you use just like the utilities of today.