Every time I screw up badly, I end up having to go through to the house, swap SDs on the Raspberry Pi and start another backup. AND I’m told by our friend from Raspbian that I should not be doing this as live backups are asking for problems. Now, to be fair I’ve never HAD A problem with the Raspberry Pi SD copy program but that’s not to say I won’t – and of course none of the other Pi-like machines I own have such a simple backup facility (don’t go giving me a lecture on complex Linux backups please).
And so it was that one of our readers (MrShark) put me onto a VPS (virtual Private Server) facility this week – for less than £3 a month you can have your own virtual Debian. I took this up for a trial as I’d had immense difficulty in the past with Virtual PC etc. on my computer due to making the mistake of installing Docker. So I’ve been playing over the weekend with this VPS service called OVH. Now, their service works really, really well - but the customer service is virtually non-existent as far as I can tell. It was with that in mind that I grabbed some coffee today and sat down to clean up my Windows 10 PC and install VirtualBox.
I followed the instructions and downloaded a virgin Debian – expecting the same kind of experience that I got out of OVH or one of my little SBCs (I should say at this point that my script – which installs the kitchen sink – works absolutely perfectly on OVH). Up came a fully-laden Debian complete with graphical desktop and all the trimmings… I went into a terminal and the first thing that came to mind was “sudo apt-get update”. Well, that’s what you do, isn’t it.
Nope. No “sudo” – never heard of it, mate. This came as something of a shock. Anyway turns out it wasn’t installed, I sorted that and did an update. After a file edit to stop it looking for repositories on a DVD that the VM doesn’t have – I was away with a full update and upgrade. Dare I try my script.
Well, that failed at the first hurdle – virtually every one of the general pre-requisites and utilities I normally install failed miserably. So much for Linux not having the version issues Windows (supposedly) does! Debian isn’t even the same as Debian!
It was at that point of utter despair that my pal Jonathan called in on Skype as if sensing I was getting annoyed. No – you don’t want to do it like that, he said, there’s a ready-built DIETPI image for VirtualBox.
And so there was.
I grabbed the image from the DIETPI website, loaded it in, created a PI user (I’ve a short script for that, too) and loaded up my script. NOT A SINGLE ERROR – it’s not even this clean on a proper PI !!! Mosquito, Node-Red, my start-up page, MQTT, SQLITE – it’s all there!!
I’ve done a backup of the basic Debian and a backup of Debian plus all my tools and toys – and now I’m ready to take on the world. For those who don’t know, VirtualBox, DietPi and my script are all available on the web and all available for free. What a great way to test stuff out, now I can make changes to the script fearlessly (my ain is to make it a lot “cleaner” – without all the messages you can’t do anything about), safe in the knowledge that if the whole thing explodes, I’m a button-push away from starting again and it’s all a LOT faster than a PI on my Windows 10 machine (which was super fast about 4 years ago).
Can’t QUITE see how to get the USB emulation going so I can mess with SDs, but no doubt someone reading in here will have figured that out. If you do try out my script – make sure you tell it that this is NOT a real Pi – and don’t try adding GPIO….