A Fresh Pi2 Start


The thing about rushing in with something new is that you tend to bring your learning mistakes with you.

Firstly for new readers, why am I fascinated with the Raspberry Pi? Well I’ve been working on IOT for some time now and I’ve tried out many ideas most of which you’ll see blogged about in here. I originally used an Atmel 1284 based solution of my own (own board, own software) to control a number of Atmega328-based boards by short range radio. Indeed right now I have 3 properties – two here in the Northeast and one in Spain which are using this successfully. But there were a lot of range issues with the radios and I was running out of steam with the 1284s and along came the ESP8266 chips… This opened up so many possibilities but I really needed something more powerful at the helm without spending more money (many have heard me say “I’m not spending £60 to switch a lightbulb”) – and in the nick of time along came the Raspberry Pi2 – which for £30 is a bargain even though you really have to learn just a little Linux to make good use of it.

The Raspberry Pi 2 was so new to me a matter of weeks ago (never had the original Pi) that I loaded the entire kitchen sink onto it. In anticipation that this might happen I bought a second Pi2. That gave me all sorts of issues, stalled keyboard, memory problems.. I w2as convinced it was the microSD chip… then I realised the other day that this could all be put down to a lousy power supply! I replaced that with something meaty and I’ve never looked back.  Mindful of the fact that my 32Gb microUSB drive for the first Pi2 was taking an hour or more to back up I went out and bought a Sandisk Extreme 16Gb and an Anker USB3 adaptor and that really made a difference – but still I was basing everything on a bloated software base. So this week I sat down and started from scratch.

You can save many, many megabytes by un-installing the rubbish that comes with the Pi2, that Wolfram thing which I cannot imagine any use for, the games etc. Having stripped the Pi down to essentials I then installed Webmin (and if you are not using this, why not?) – which by its nature needs PHP and MQSQL to run – and that’s fine as I have a use for both (graphing). When fitting the WIFI dongle to the board (who wants another wire) I realised I could do with the equivalent of the Windows WiFi properties window and stumbled on Conky – I’ll let you research that one. I then installed Mosquitto with some help from Mike at ThingStud.io (and others) and finally with LOADS of help from the guys responsible for Node-Red, put that up (the installation is very different to my first attempt).

With all of that in place and all the latest updates (courtesy of Webmin) I’ve barely used over 3.5GB which is excellent because as time goes on the size of the microSD will start to shrink if nothing else because these devices have limited lives and the more expensive chips have intelligence on-board to move data around as parts of the chip die. I’m hoping to get several years of life out of this when I’m done so the more spare capacity the better.

So there we are, a clean start on which to build my ESP8266 and Arduino-based home control.


4 thoughts on “A Fresh Pi2 Start

  1. Hi there Tony

    Yes, overuse is a concern, but you raise more questions than you answer.

    1. Isn’t an SSD drive being solid state going to have the same issues?
    I don’t know how to attach. Did you happen to make notes of the installation and what you did?
    Desktop – well I’ve no shortage of RAM – using all in around 200meg of the 1Gig on the Pi2. it is kind of handy to be able to ULTRAVNC into the desktop – can you do that without having the desktop running otherwise?

    Wifi seems ok up to now. What’s WICD?

    1. I believe that SSDs were designed to take the writing punishment better than sd cards so they should last longer. I only used it because being IDE and only 30gb (and of course low power) I had no other use for it 🙂

      Re booting, I used something like this to do it-but I used a hdd/ssd instead: https://samhobbs.co.uk/2013/10/speed-up-your-pi-by-booting-to-a-usb-flash-drive

      WICD is here: http://wicd.sourceforge.net/ it is a wireless/lan controller software that works on a console rather than needing a desktop.
      Hope that helps!

      1. That’s correct Tony. Typically SSD’s last a heck of a lot longer with more punishment than an SD card ever will. They have all sorts of clever things built in including auto-leveling.

        Sadly you can never really rely on an SD card, to me it seems fairly random how long they last. Though certainly a decent one will be significantly more likely to last.

        RPi’s add another issue, it is rather too easy to pull the plug on them without shutting down and this can cause corruptions too.

        So far, the longest I’ve run a Pi is around 6 months solid with no issues on a cheap 4GB card. We will see how long the 16GB Samsung MicroSD lasts on my Pi2.

  2. If you are using mysql on the sd card you may run into problems in the future. I managed to completely corrupt mine by writing to it too many times – it completely died. I now use a small ssd drive from a left over project housed in a usb external case.
    The sd card boots to a root file structure on the ssd – ie the sd card is only there to boot to the ssd.

    I am using emoncms, mysql, nodered and other stuff so quite a bit of i/o to the storage device!.

    The other thing to look at is whether you need a desktop on the pi. Mine runs headless now attached to a lan cable. You can reclaim the graphics memory this way.

    Wifi was an intermittent problem, sometimes it dropped signal and didnt reconnect. I solved it by using wicd.

Comments are closed.