Pages

How to install an SSD in a Dell D430 laptop

Speed up your laptop with a solid-state drive
You may know from elsewhere on my blog that I have a tiny Dell D430 laptop that I use for portability when I'm out and about and want more power than just a tablet alone.

I'd been looking at ways to speed the laptop up and started to look specifically at replacing the 1.8" 4,200rpm 60G Toshiba hard disk with something a bit faster.  The Toshiba drive is tiny and very low powered, but it is sloooow.  Indeed, it is so slow that it ranks 3189 out of 3192 - literally fourth from the bottom - of Passmark's November 2014 Hard Disk benchmark!

No prizes for guessing I need to replace this to get some performance out of this laptop. The obvious direction is to install an SSD - or a Solid State Disk. The question is - How?  The Dell D430 hard disk sits under the battery and is shown outlined in red in this photograph.  You can see that there's no room for a physically larger hard disk.


Add to this the fact that the hard disk interface on the Dell D430 is a PATA or IDE interface and that would normally rule out any SATA devices too.

The only options we have therefore is to replace the disk with a purpose-made SSD that is designed to fit a 1.8" format or to seek an alternative format.  There are a few 1.8" SSDs available (there are a few shown here) so an easy approach would be to buy and install one of these. However, I was looking for something that would likely outlast the Dell, so I looked at using an mSATA SSD and running it using an mSATA to ZIF Adapter.  Not only is the mSATA SSD cheaper to buy, it's transferable and usable in other computers and laptops should the Dell die in the future.

Here's how I did it.  To start, I wanted a clean build of a new OS, so I took a backup of my data from the old hard disk before I started this procedure.  The old disk had Mint 13 on it but I wanted to move to Mint 17 with the new disk and this is best done with a clean install on the new disk.  I'm therefore going to assume that you won't need my help to manage your data or your OS - just the procedure for swapping the old disk for an SSD.

You'll therefore need:

Tools:
a small cross-head screwdriver
possibly a wooden toothpick and a wooden coffee stirrer.

Parts:
An mSATA Solid State Disk (I chose a 120G Crucial m4 mSATA SSD like this)

An mSATA to ZIF adapter card
https://www.amazon.co.uk/gp/search/ref=as_li_ss_tl?ie=UTF8&camp=1634&creative=19450&keywords=mSATA%20to%20ZIF%20Adapter&linkCode=ur2&qid=1443561019&rh=k%3AmSATA%20to%20ZIF%20Adapter%2Ci%3Acomputers&tag=vastmblog-21%22%3EmSATA%20to%20ZIF%20Adapter%3C/a%3E%3Cimg%20src=%22https://ir-uk.amazon-adsystem.com/e/ir?t=vastmblog-21&l=ur2&o=2
 

Method:
Start with the laptop powered down and the battery removed

Step 1 - Undo the two screws on the disk caddy

Step 2 - Lift and slide the caddy so it is freed from the plastic clips on the base of the laptop

Step 3 - Gently lift away the disk caddy and put it somewhere safe - with the two screws.

Step 4 - Locate the pull tape on the disk plug. Gently grip and pull this straight up to disconnect it

Step 5 - Lift the old hard drive clear

Step 6 - Ease the rubber case away from the old hard disk. Don't stretch it and don't use anything metal to loosen it.  If necessary use a wooden stirrer to ease the rubber free of the drive.

Step 7 - When the rubber case is loose, gently pick open the ZIF connector lock (it should just flick up, but don't force it)

Step 8 - Here the lock is free and the ZIF connector is ready to have the cable removed.  Slide the rubber case over the connector so you can remove the drive.

Step 9 - Gently pull the connector from the drive.  Use a toothpick to ease it out if it is sticky. Put the drive somewhere safe.

Step 10 - Start to assemble the SSD and the adapter.  Undo the two screws on the adapter

Step 11 - The SSD and adapter are ready - now to connect it up.

Step 12 - Pick open the ZIF connector on the SSD adapter and offer it to the cable.  Make sure the cable goes into the connector and not under it.  Note that here I have inadvertently put the cable in the wrong way round.  More on this later.

Step 13 - Here is the SSD with the cable connected the right way round.  The cable should sit so that it curls or wraps over the top of the SSD.

Step 14 - curl the cable loosely over the top of the SSD and place the SSD top-down in the rubber case.  It will be a loose fit.  Don't worry, it will be fine.

Step 15 - Offer the SSD in the case to the Dell laptop and connect the blue plug to the disk connector on the laptop, pressing it gently so that it clips into place.

Step 16 - Re-attach the disk caddy to hold the SSD in place.  Don't forget to do up the two screws.

Step 17 - Re-connect the battery

That's it, done.  Now turn the laptop over and turn it on.  If you enter the BIOS while the laptop is booting, the new SSD should show itself by advertising its capacity on the Device Info screen as shown here.  If you've managed to get the cable the wrong way round (see Step 12 above) you'll know because there would be no disk found by the BIOS!

For me, I next inserted a prepared USB stick with the install ISO of Mint 17 Cinnamon on it and set about installing a clean, fresh copy of Mint 17.  When this was complete, I then tweaked it from the guide here and tuned it for an SSD using this guide.


Addendum:
Two months after I completed this upgrade I experienced a little problem.  my laptop died.  Well, more exactly, I'd let the laptop go to sleep as I was busy elsewhere.  When I resumed the laptop the system didn't come back to life.  After a power off/power on the system still did not boot.  A view in the BIOS showed no hard disk found.

The SSD had died on me.

Slightly worried by this (my British stiff upper lip here...) I began to search Crucial's web site for a Returns page for SSDs when I chanced upon this article:

Why did my SSD "disappear" from my system?

It turned out that my SSD had suffered from a bug in its firmware and had apparently 'died' as a result of this bug. After following the steps in that article I once again had an operational SSD.  In that article you are also advised to update the firmware of the SSD and this I completed from following the instructions in the SSD Support page

I once again have a fully working Dell D430 with a 120G SSD on board.


Well?  How fast is it?
Let's be clear. You won't get the full speed from your new SSD with the old 100MB/s IDE disk interface on the Dell!  That said; the performance of the Dell is greatly improved by the addition of the disk.  For me, the laptop now boots from power-on to the log-on prompt in a little over twenty five seconds (the BIOS alone takes 8 seconds of this).  And then, from entering my password, it takes a further twenty or so seconds until the desktop is operational. Not bad!

As you'll see from the comments below I was asked what the measured speed differences were.  I must admit, when I first installed the SSD I didn't measure the performance, but I've since popped the old disk back in and run before-and-after speed tests.

The two tests I carried out are simple but indicative. The first uses the Linux dd command as described in Systembash's post to measure write speeds:
$ dd bs=1M count=512 if=/dev/zero of=test conv=fdatasync

When this is run it produces an output like this (this was run on the old Toshiba hard disk)
512+0 records in 512+0 records out 536870912 bytes (537 MB) copied, 36.4651 s, 14.7 MB/s

and the second test uses the hdparm command from Unixcraft's post
$ sudo hdparm -tT /dev/sda

This produces an output like this (again, for the old disk)
/dev/sda: Timing cached reads: 1090 MB in 2.00 seconds = 545.34 MB/sec Timing buffered disk reads: 32 MB in 3.07 seconds = 10.43 MB/sec

If you run the dd test above, don't forget to delete the test file when you've finished testing - it's 512MB in size!
$ rm test
The results for the Toshiba 60G hard disk and for the Crucial SSD on my laptop are shown in the table below:
ComputerBoot timedd write speedCached Read speedBuffered Read speed
D430 with Toshiba disk
90s
14.7 MB/s
545.34 MB/s
10.43 MB/s
D430 with Crucial SSD
41s
27.4 MB/s
775.91 MB/s
77.20 MB/s

You can see that the SSD is distinctly faster that the older Toshiba disk, but not by as much as you would expect.  This is due to the restrictions in the D430 design.  Dell built the D430 laptop around Intel's low-power 945GMS chipset and, while the chipset supports both SATA and IDE interfaces, Dell decided to use the much slower IDE interface rather than the SATA interface in the D430 design.  It is this IDE interface that is holding back the performance of the SSD in this laptop.

Conclusion
If you have an old Dell D420 or D430, why not try this upgrade on it rather than just throwing it out.  My costs for this were around £75 (about $120 or €95) (you can click on any of  the orange text in this blog post as they each link to suitable products and articles that back up the points I make).  You can even buy a Dell D430 to do this yourself - a good D430 can cost as little as £50/$80 on ebay.

Running Mint, it is still plenty fast enough for Internet browsing, simple office work and light picture editing.  I'm even coding on it, running IntelliJ while I learn Java.  The device does get a bit warm (I'll get round to improving the cooling later on (using the same approach as I did in this Blog post)) but the battery lasts two and a half hours and it's so light.  the casing is magnesium, so it's very strong and the keyboard is plenty big enough even for my fat fingers.

Fixing the Blinking LED on Intel WiFi cards

Introduction
I've recently got hold of a Dell D430 laptop and installed Mint 13 Maya on it intending to use it as a small laptop to carry around with my photography kit as it's small, light and lasts two hours on a battery charge. Installing Mint wasn't a problem, and I've been surprised how quick the laptop is to use. All the components work as they should and the laptop is fast becoming the first device I reach for when I want something done quickly in the field.

However, like many people, I've had one gripe with whole set up - the annoying flashing WiFi LED just below the screen. This happens because Dell, like many other manufacturers, uses an Intel WiFi chipset in their laptops and the Intel developers who put together the Linux drivers for the chipset decided in their wisdom to make the LED 'flash' to indicate that it was passing traffic. This has annoyed so many people that a quick search will reveal a large number of solutions on the Internet where people in one way or another have 'fixed' this problem in their own particular environments.

So why do I feel the need to write another?

Well, after trying a fair few of these solutions none of them actually worked on my setup. This is not to say that these other solutions do not work - just that I wasn't successful getting them to work for me. So I've written a blog explaining how I turned off the LED rather than just a prescriptive 'do-this-then-that'.

Step One - understanding how to tackle the problem
The Intel WiFi drivers are usually installed as a family of modules that work together with the linux kernel to set up and run the WiFi chipset. Judging by the people with the same hardware as me, at least one of the module names contained the letters 'iwl', so, armed with this, I listed the modules by typing this comment into a Terminal window:
$ lsmod | grep iwl
This gave me the response
$ lsmod | grep iwl iwl3945 73111 0 iwl_legacy 71134 1 iwl3945 mac80211 436455 3 iwl3945,iwl_legacy cfg80211 178679 4 iwl3945,iwl_legacy,mac80211$
So I now need to find out which of these files contain the control for the LED. This leads me to:

Step Two - installing some Linux diagnostic tools
We will need to look at the capabilities of each of these modules to see which one(s) can control the LED and to do this we need to download sysfsutils. This is a set of utilities built upon sysfs, a virtual filing system in more recent kernels that lets you investigate a systems' device tree. To install the tools open a terminal window and in the window type:
$ sudo apt-get update $ sudo apt-get install sysfsutils
Once the install is complete, you can run the systool command on each of the modules to see which module has a parameter option to control the LED. (in the examples below I chop the end of the report off to save space and make the response more meaningful):
$ systool -m iwl3945 -av Module = "iwl3945" Attributes: initstate = "live" refcnt = "0" srcversion = "301B04B4010DED41B0830D0" uevent = version = "in-tree:s" Parameters: antenna = "0" disable_hw_scan = "0" fw_restart = "1" swcrypto = "1" Sections: .altinstr_replacement= "0x00000000" .altinstructions = "0x00000000" [ -- some output removed for clarity -- ] $ systool -m iwl_legacy -av Module = "iwl_legacy" Attributes: initstate = "live" refcnt = "1" srcversion = "275221577F5CCA15EDB6755" uevent = version = "in-tree:" Parameters: bt_coex_active = "Y" led_mode = "0" Sections: .altinstr_replacement= "0x00000000" .altinstructions = "0x00000000" [ -- some output removed for clarity -- ] $
You can see from this that the module iwl3945 does not have a parameter option to set the LED mode but iwl_legacy does have such a parameter - the line led_mode = "0" in the list above. So, to stop the LED flashing we need to configure iwl_legacy to switch the LED on for WiFi active and off for WiFi inactive. But what setting for led_mode should we use? The answer lies in the output of another command:
$ modinfo iwl_legacy filename: /lib/modules/3.2.0-23-generic/kernel/drivers/net/wireless/iwlegacy/iwl-legacy.ko license: GPL author: Copyright(c) 2003-2011 Intel Corporation version: in-tree: description: iwl-legacy: common functions for 3945 and 4965 srcversion: 275221577F5CCA15EDB6755 depends: mac80211,cfg80211 intree: Y vermagic: 3.2.0-23-generic SMP mod_unload modversions 686 parm: led_mode:0=system default, 1=On(RF On)/Off(RF Off), 2=blinking (int) parm: bt_coex_active:enable wifi/bluetooth co-exist (bool) $
What we want is option 1 - On(RF On)/Off(RF Off). Now we need to configure the module to control the LED this way.

Step Three - making the change.
To make the change to the LED we need to unload the iwl_legacy module, change its configuration file and finally reload the module. In sequence then:
$ sudo modprobe -r iwl_legacy FATAL: Module iwl_legacy is in use. $
If you see this, then you've made a mistake. You will need to unload the other iwl module first, as this module is preventing the other from being unloaded. (you will naturally turn off your WiFi connection at the same time, so be careful!) :
$ sudo modprobe -r iwl3945 $ sudo modprobe -r iwl_legacy $
Now the modules are unloaded you can make the changes.
$ cd /etc/modprobe.d $ sudo nano iwl_legacy.conf
In nano enter this line then save the file and exit nano.

options iwl_legacy led_mode=1

Now re-start the two modules
$ sudo modprobe iwl_legacy $ sudo modprobe iwl3945 $ cd ~ $
Finally check that iwl_legacy is properly configured - and check on your laptop that the LED is behaving as it should.
$ systool -m iwl_legacy -av Module = "iwl_legacy" Attributes: initstate = "live" refcnt = "1" srcversion = "275221577F5CCA15EDB6755" uevent = version = "in-tree:" Parameters: bt_coex_active = "Y" led_mode = "1" Sections: .altinstr_replacement= "0x00000000" .altinstructions = "0x00000000" [ -- some output removed for clarity -- ] $
Assuming all of the above has been completed and you have a non-blinking LED, the last thing to do is to shut the laptop down completely and then restart it - just to make sure the configuration works the next time it is used.

Conclusion
You should now have a laptop without a blinking LED.  You may also find this approach to tackling the blinking LED problem may be useful with other WiFi chipsets and it would be good to know if this approach helps you stop that annoyingly blinking LED too.  Please add a comment below and let me know.

Update following Mint 17 (Qiana)
I've just updated my D430 to Mint 17 (Cinnamon) and had to repeat the steps in this blog article to stop the blinking LED again!!  You'll be pleased to know that I used the same approach as I presented in this blog and everything was the same except one of the files has changed its name in the new release.

iwl_legacy is now called iwlegacy. This means that this blog article is still valid for Mint 17 - except wherever you read iwl_legacy you should substitute iwlegacy instead.  This also applies to the line you need to put into iwlegacy.conf:

options iwlegacy led_mode=1

Good luck!

Charging your Smartphone while on the move.

Hands up anyone who has had their Smartphone run out of battery just when you needed to make or take that call? Or you turned up at a meeting and you needed to call your boss. Or, more importantly, perhaps your tablet died during the climax of that film or in the final stages of your game.

Or perhaps you're going camping or hiking at the weekend and you want to be sure you can charge your phone while you're away.

I have found a simple solution to all of the above: a charger you can carry with you and use on the go. In fact, all it is is a Rechargeable Battery Pack that you carry with you.
 
When you get the low battery warning from your phone or tablet simply plug in the battery pack, charge your phone and continue using it. It's so simple.  The battery pack I use comes with a built in short microUSB cable so it plugs directly into my work Blackberry or my own personal Sony Xperia Z2.


If I had an Apple iPhone or iPad I could plug in an Apple cable and charge my Apple device just as easily from the USB port.  I'd like to point you at an Apple micro USB to Lightning adapter, but, as usual, Apple won't let me do that.  You'll have to search for these yourselves - or you could get a non-Apple phone and avoid these restrictions altogether.
The Rechargeable Battery Pack will charge my Blackberry around three times and my Xperia one and a half times. You should get two full charges out of the pack on most phones - including the iPhone.  That should be enough for a couple of days use without needing a charger. The charger has four blue LEDs on the top that tell you how much charge is in the unit.  Four LEDs lit means the pack is fully charged; two LEDs lit shows the pack is about half-charged.  The pack is as quick to charge your phone as a high-power normal mains charger.

And an added bonus for me - this battery pack even runs my Raspberry Pi!

Technical Specifications:

  • Capacity: 5000mAh, Lithium-polymer battery capable of charging two smartphones at the same time.
  • Charges iPhone 2 to 2.5 times, Charges Galaxy S4 about 1.3 times.
  • Max output: 5V / 2.5A.
  • Suitable for Android and Windows Smartphones, iPhones, iPads and Tablets (you will need to buy an Apple adapter as none are included)
  • On a high-power charger the pack is fully recharged in 3.5 hours.
  • On a normal charger the pack is recharged in about 6 hours
  • Size: 5.1" x 2.75" x 0.31".  One of the thinnest battery packs available.  It's designed to stack behind your phone and you can still use the phone with the charger held behind it

Conclusion

There's simply no excuse.  For the little amount this unit costs - and the convenient size - you really should carry one with you at all times.  It will save you - or your friends - time and time again.

Upgrading to LED lamps really pays for itself!


I've been replacing my older tungsten bulbs for years now, starting with compact fluorescent lamps (CFLs) and more recently directly with LED lamps

Although I'm already saving money having switched to CFLs I'm getting fed up with the low light output, the long start times and the noticeable way the light output decays with time so that all too quickly the lamps become next to useless.  An example are the candle lamps I have in my dining room.

The light fitting held eight 40W tungsten lamps so the room was nice and bright, but at a total of 320W was very expensive to run (over £110 per year using the lamps an average of six hours a day).

I replaced the tungsten lamps with eight 7W compact fluorescents and for a while these have been OK but lately the light output has faded and the electronic ballasts used in the bulbs have started to whine, so these replacements have not only become annoyingly dim but also annoyingly noisy!

They have got to go.

I've been looking for a suitable replacement for these for a while - and while it is easy to justify buying LED bulbs to replace tungsten or halogen lamps you do have to be careful replacing the compact fluorescent lamps because the power savings are nowhere near as great.  However, I think I've found a bargain.  I've found a source of a triple pack of Duracell 4w LED Candle Light Bulbs at a very good price.


Not only are these slightly cooler colour temperature than the old compact fluorescent bulbs, but they are cheaper to replace and run at an even lower wattage so I will make savings when these are fitted.  To prove this I knocked up a quick spreadsheet calculator that you can download here

In the spreadsheet I have assumed that a unit of electricity costs about £0.15 and that the lamps are run for an average of six hours per day.  From this:
  • A 40W tungsten lamp costs £13.10 per year in electricity and may need to be replaced twice.
  • The 7W CFL costs £2.29 per year to run and may last five years.
  • The Duracell 4W LED lamp costs a miserly £1.31 per year to run and should last 10 years. 
When you factor in the lives of the other bulbs and their replacement costs the Duracell LED lamp will pay for itself as a replacement for the compact fluorescents in under two years - and as a replacement for the 40W tungsten bulb in about three months!

You can use the calculator to work out how much you can save, but do bear in mind that if a lamp is only used an hour or so a day (perhaps in a cupboard under the stairs) it may not be worth replacing it at all with an LED lamp.  Just enter the details of the lamps you want to compare in the yellow boxes and adjust the electricity costs and hours per day to suit you and the rest of the sheet re-calculates for you (it should be easy to convert to other currencies too but I'll leave that up to you).

Addendum:
The new LED lamps arrived today and they're all fitted. They're bright with a good colour balance and are noticeably brighter than the old 7W compact fluorescents so that's a good start.  They're instant-on, which means I get light immediately I turn the switch on (not 30 seconds to two minutes afterwards) and they're silent.  No more whistling and whining from the lamps!

Technical Data:

Energy RatingA+
Power consumption4W
Lumens250
Lumens/Watt63
Colour Temperature2700K (Warm White)
Expected life25,000 hours
Power Cyclesapprox. 40,000


Getting Devmon to start automatically with Xymon on Ubuntu

Introduction
Xymon is a brilliantly simple network management tool that runs reliably in the background and can graph, alert and track pretty much anything you want. I use Xymon for example to monitor a number of things around my home - including all my servers and devices, the quality of my Internet - and the temperature in and around the house.  I've developed many of the scripts I use to carry out this monitoring myself using Perl.  However, while Xymon supports the monitoring of remote devices via ICMP or TCP port tests or custom scripts, it doesn't currently provide any sensible form of SNMP monitoring.  Luckily, help is at hand in the shape of Devmon. Devmon is a Perl daemon that is designed to supplement and enhance the capabilities of either a BigBrother or Hobbit/Xymon monitoring server allowing that server to monitor remote devices via SNMP (Simple Network Management Protocol) and integrate this information within the same displays on the BigBrother/Hobbit display server.

However, the documentation with Devmon is sparse and rather lacking, especially around getting it started when the server starts up.  There are example scripts for Red Hat available in the package but nothing for Ubuntu.  I've set about rectifying this and I present my start-up approach to Devmon using Ubuntu's Upstart system.

While Ubuntu supports the more traditional init-based scripts to start and stop services, it is better to think about using Upstart instead, as it is a more robust services management daemon that allows for things like dependencies, custom events/triggers, pre & post initialisation steps  and resource limitations, amongst other things.

Installation of  Xymon and Devmon
The full installation of Xymon and Devmon is beyond the scope of this article, so I'll summarise what I've done here so you can adapt my scripts and notes for your own use:
  • Xymon is installed under /home/xymon with a username of xymon.  It stores its logfiles in /var/log/xymon/
  • Devmon is installed under /usr/lib/devmon with a username of xymon (so editing scripts and templates is all completed under the one username) and logs to /var/log/devmon/devmon.log
Configuring Upstart
There are plenty of Upstart tutorials on the Internet - and an excellent 'Cookbook' to check out, so I won't repeat that here.  All that is necessary is to say that:
  • Upstart's scripts are stored in the /etc/init directory and all end in .conf.
  • Upstart logs its output to logs for each script in /var/log/upstart/
To work out what I needed to get devmon running I set up PuTTY to have three sessions open to my server.  One I used to edit and test the script, one I had set to display the devmon logfile (tail -f /var/log/devmon/devmon.log) and one was set to show the upstart script (tail -f /var/log/upstart/devmon.log).  I found the easiest way to get the script I needed was to take another script as a template and then edit it to start devmon instead.  My script, devmon.conf, is shown below.

#!upstart description "DEVMON Hobbit/Xymon SNMP tool upstart script" author "Martin Davies" start on runlevel [2345] stop on runlevel [!2345] env PIDFILE="/var/run/devmon/devmon.pid" env DEVMON_USER="xymon" env DEVMON_DIR="/usr/lib/devmon/" script if [ ! -d "${DEVMON_DIR}" ]; then echo "${DEVMON_DIR} missing, aborting." exit 1 fi exec start-stop-daemon --start -c ${DEVMON_USER} -d ${DEVMON_DIR} --exec ${DEVMON_DIR}devmon -- -f end script
That's all it took.  Looking closer at the script:

These two lines comment the script and give enough info for anyone to see what the script is for
description "DEVMON Hobbit/Xymon SNMP tool upstart script"
author "Martin Davies"


These next lines simply tell Upstart when to run the script (the figures in brackes are the runlevels of Ubuntu)
start on runlevel [2345]
stop on runlevel [!2345]


Then we set up the environment variables to set the PID file, the user Devmon runs under and the directory that devmon is installed in
env PIDFILE="/var/run/devmon/devmon.pid"
env DEVMON_USER="xymon"
env DEVMON_DIR="/usr/lib/devmon/"


Finally the script itself.  First we check that the install directory exists and if it does we run devmon as per the user and directory settings set above.  While testing, I recommend that you add -vvv --debug to the end of 'exec start-stop-daemon' line.

script     if [ ! -d "${DEVMON_DIR}" ]; then         echo "${DEVMON_DIR} missing, aborting."         exit 1     fi     exec start-stop-daemon --start -c ${DEVMON_USER} -d ${DEVMON_DIR} --exec ${DEVMON_DIR}devmon -- -f end script

Addendum:
I had cause to shut down my server the other day to replace a disk and when it was restarted Devmon didn't start. The problem I saw was that the Devmon entries on Xymon pages stayed purple. Even when starting Devmon by hand I still had purple entries for devmon in the xymon web pages

martin@homeserver:~$ sudo start devmon
devmon start/running, process 28703
martin@homeserver:~$ 
You can see here that Devmon reports as starting but after a few minutes I still had purple icons. Looking at the Devmon log file gave me the answer:
martin@homeserver:~$ cat /var/log/devmon/devmon.log [14-07-28@21:51:39] Shutting down [14-07-30@22:18:12] Cant write to pidfile /var/run/devmon/devmon.pid (No such file or directory) [14-08-05@18:09:00] Cant write to pidfile /var/run/devmon/devmon.pid (No such file or directory)
It turned out that a kill script from the old init.d based setup had not only deleted the pidfile but had also deleted the directory too. So I removed the killscript and re-created the pidfile directory:
martin@homeserver:~$ sudo mkdir /var/run/devmon/
martin@homeserver:~$ sudo start devmon
devmon start/running, process 30369
And looked at the log file again and saw this line
[14-08-06@21:40:16] Cant write to pidfile /var/run/devmon/devmon.pid (Permission denied)
Meh! OK - one more step and we're done:
martin@homeserver:~$ sudo chown xymon:xymon /var/run/devmon
martin@homeserver:~$ sudo start devmon
devmon start/running, process 32309
martin@homeserver:~$ cat /var/log/devmon/devmon.log
Finally. The last few lines on the log file read
[14-08-06@21:40:16] Cant write to pidfile /var/run/devmon/devmon.pid (Permission denied) [14-08-06@21:47:09] ---Initilizing devmon... [14-08-06@21:47:09] Node 0 reporting to localhost [14-08-06@21:47:09] Running under process id: 32309 [14-08-06@21:47:09] Entering poll loop
And sure enough, after a few minutes, the Devmon icons came back to life. I'll check the script again and see if I need to put further tests in the script.  If I do, I'll update the post and let you know.

As usual, please get in touch if this has been useful and drop me a comment if you need more info - or if you find a mistake!

Tutorial: How to install a 3TB disk drive in an old PC

I'd recently run out of room on my data drive so I was looking for an easy way to increase the storage - and to give me some room to rebuild my home server at the same time.  Looking round, the best value disk drive I found was a 3TB high-capacity disk drive as a replacement  to install in my main computer.

I run a reasonably well-specced Dell Optiplex 780 equipped with a quad-core CPU, 8GB of RAM, an Intel SSD and a 500GB disk drive.  While this is fine for day-to-day use - and with a decent Sapphire low-profile Radeon HD 6670 graphics card, it's also a fair games player - it is considered an old machine these days and I thought I may run into some problems putting such a large hard disk drive into it.

I wasn't wrong.

I'll summarise the three major problems you'll face so you can see what you may be up against if you choose to install a 3TB disk drive - and then show you what I did to get the disk drive active in Windows.
  1. Older computers (such as my Dell) run a traditional BIOS rather than the newer UEFI-based systems available now.  This means that if your PC has a BIOS it cannot boot from disk drives more than 2.2TB in size.  Depending on how old your PC is, it may not even recognise a 3TB disk drive!
  2. Microsoft, in their wisdom, designed their 32-bit consumer operating systems (32- and 64-bit Windows XP, 32-bit Vista, 32-bit Windows 7) so that they do not support larger than 2.2TB disk drives.
  3. Even running the 3TB drive in an external USB enclosure may not work as many USB controllers cannot properly address a 3TB disk drive.
For me:
  • I normally boot 64-bit Windows 7 from an 80G SSD hard drive, so, although my PC is too old to boot from the 3TB drive, I am able to access the 3TB disk drive as a data drive once Windows has loaded.  
  • I used an external usb docking station to copy my existing data to the new disk drive and then swapped drives in the PC to complete the upgrade.  Even though the enclosure did not fully access the new drive I was able to get the full capacity of the drive available to use.
Here's what I did:

Step One: Check your PC recognises the drive
I temporarily took the existing disk drives out of my PC and installed the new 3TB disk drive to check that the BIOS recognised it properly as a 3TB disk drive.  It did.

Step Two: Check the Caddy recognises the drive
I put back the old disk drives and booted my PC into Windows.  I then connected the 3TB disk drive to the PC via the external USB caddy. The drive was recognised, which was positive, but there were issues.  See Stage Three below.

Step Three: Prepare the new drive
Next, you need to format the new disk drive.  The easiest way to do this is to run the Windows Disk Management tool. Click on Start, then in the Search programs and files box type diskmgmt.msc and press Enter. After a few seconds the Disk management tool starts up.  As you've a new, uninitialised disk in the computer you may get a pop-up window like this:
If you don't, hover your mouse over the new drive, right-click and click on Initialise Disk.  Note that the wizard offers you two types of initialisation: MBR or GPT.  Choose GPD and click on OK.  When the disk is initialised you may notice that Windows shows you only have 746GB of unallocated space instead of the full 3TB.  Don't worry; this happens frequently, but there is a way round it as you will see if you read on below.  Go ahead and create a New Simple Volume and use all of the unallocated space on the new volume. Finally, format the new volume ready for use and assign a drive letter.

Step Four: Copy your data to the new drive
As I was upgrading my old 500GB data drive, I wanted to copy the whole of the old drive contents to the new drive.  For this I used an excellent free product called AOMEI Partition Assistant.  This has a Partition Copy wizard which I used to copy my old Data drive to the newly created volume on the 3TB drive.  Run this wizard and set your old data drive as the Source partition and the 3TB disk drive as the Destination Space,  let it complete and then shut the PC down.

Step Five: Swap out your old Data drive
Once the PC has shut down open it up and replace your old data drive with the new 3TB one.  Put the old drive safely to one side - this is your backup while you finish the process!!  Then power up the PC.  Now, because my data was stored on Drive E and the new drive was set as Drive F, I ran into some issues because Windows could not find some of my data. If you run into the same issues as I did then run diskmgmt.msc and re-assign the drive letter to be the same as your old data drive (E: in my case - yours could well be different)  You may have to re-boot the PC to make sure everything works as it should.

Step Six: Resize your Data partition
After a successful reboot, re-run the AOMEI Partition Assistant and this time highlight the new data partition on the 3TB drive.  Run the Resize/Move partition wizard and drag the slider of the data partition to take up the full 3TB (mine showed 2,794GB.  Good enough!)
Let the wizard run until it has finished and check you can read and write files on the new disk.

Last of all - enjoy all this new-found space!  As you can see below, on my system the disk is running well and has lots of spare space - for now!



Do you want strangers emailing you? Google says you do!

Did anyone get an email in the last few days from Google's Gmail team?  Did it have the subject

"Gmail update: Reach more people you know"


Want to know what it means?  Well, Google have just introduced a new Gmail feature – the ability to send email to Google+ users whose email address you don't actually know. You'll notice this when you compose new emails as Gmail will start to suggest Google+ connections as recipients without revealing their email addresses to you until the recipient either replies to your email or follows you.

While some Gmail users may find this feature useful, others may see it as a threat to their privacy - but what you may not realise is that Google has already switched this feature on in your account without telling you.  This means, right now, your Google+ identity could be being suggested as an email recipient on someone's latest get-rich-quick scam email.

Fortunately Google have provided a way to control how visible your Google+ identity is to strangers and you can therefore control who can use your Google+ identity to send you email.


Here's how to access this control:-
  • Go to Gmail on your desktop (not on your smartphone).
  • Click the gear in the top right of your screen.
  • Select Settings.
  • Scroll down to the Email via Google+ section (stay in the "General" tab).
  • Click the drop-down menu and choose No one.
  • Click Save Changes at the bottom of the page.
This will stop your Google+ identity being suggested to others who don't already know you.

As usual, let me know what you think by commenting below.

How to make bread without adding sugar.

The BBC reports that a campaign group has been formed to reduce the amount of sugar added to food and soft drinks in an effort to tackle obesity and diabetes in the UK.  The group, Action on Sugar, has been set up to help people avoid "hidden sugars" and to persuade manufacturers to reduce the quantity of sugar they put in their food products.

Now most of us are not surprised to learn that there is a lot of sugar in fizzy drinks, or sweets, but when you find that breakfast cereals, low-fat yoghurt, pasta sauces and soups all have added sugar in them you begin to wonder.  Even our staple food - bread - has a lot of added sugar.  One average slice of shop-bought processed bread can contain as much as 3g (0.1oz) of sugar. This means that a slice of toast for breakfast and a sandwich for lunch will mean a woman would have had a quarter of her recommended daily intake for added sugar from the bread alone!

So why not bake your own bread? that's supposed to be healthy - isn't it?

Well, yes, you can, but let's look at the ingredients of a typical recipe for a 2lb / 1kg basic white loaf:

IngredientQuantity
Water
360ml
Skimmed milk powder
4 tbsp / 55g
Sunflower Oil
4 tbsp / 30ml
Sugar
3 tbsp / 42g
Salt
2 tsp / 9mg
Strong white bread flour
570g
Fast Action Dried yeast
1x 5g sachet

Let's assume you can get 12 slices from the loaf.  Then, if you look at a nutrient breakdown of these ingredients the table looks like this:

 Calories  Carbs  Fat  Protein  Sodium  Sugar 
Total:
2771
455
62
98
316
72
Per Serving:
231
38
5
8
26
6

So here we have a basic, home-made loaf with a whopping 231 calories and 6g of sugar in every slice!  Ok, you could maybe cut thinner slices, but when it's fresh, the loaf can be hard to cut (and equally hard to resist!) so I've erred on the side of caution.

However, in our household, we've been using our own basic bread loaf recipe.  We use ordinary bread-making ingredients and it works. Every time.  It takes about 10 minutes to prepare and you can add Omega seeds to it, or herbs to flavour it and I have to say it's been the standard loaf in our house with two or three loaves baked per week for almost three years.

First the ingredients:
IngredientQuantity
Water (tepid)
360ml
Olive Oil
1 tbsp / 30ml
Salt
1 tsp / 5mg
Strong white bread flour
570g
Fast Action Dried yeast
1x 5g sachet

You see? No milk powder, less oil, less salt - and no added sugar! (you don't need extra sugar to activate fast-action dried yeast - there's enough in the bread flour to do the job)

Now the method.  You may need to vary this for your Breadmaker.  For mine I simply add the ingredients to the baking pan in the order listed.  If I want to add Omega seeds or herbs, I add these on top of the flour.  Finally I sprinkle the contents of the yeast sachet evenly on top of the flour and put the pan in the breadmaker. I then bake the bread using the 'Sandwich' setting on my breadmaker which I find gives a better constituency and texture.


Once again, let's assume 12 slices from the loaf.  The nutrient breakdown now looks like this:

 Calories  Carbs  Fat  Protein  Sodium  Sugar 
Total:
1827
342
22
69
5
7
Per Serving:
152
29
2
6
0
< 1

So you see, by cutting out the sugar and adjusting the other ingredients, I have a loaf that is
  • healthier than shop-bought bread
  • has better texture and taste than shop-bought bread
  • is considerably better-tasting than the original breadmaker recipe
  • Has considerably less sugar than the original bread recipe and a lower amount than shop-bought bread

And in the great tradition of cooks everywhere, here is one I made earlier
(this one has Omega seeds in the loaf)


I hope you try this bread and like it.  Let me know how you get on and share with me any ideas you have for other reduced-sugar breads.