This blog has been much maligned of late… I’d like to get more time to write and I have literally hundreds of part-written posts, some of which are now just a collection of links for me to unpick…
In the meantime, a couple of snippets that may be useless, or may help someone one day…
Using SSH with a custom port number
My Synology NAS complains about poor security if I leave SSH enabled on port 22. It’s fine if I change it to another port though (security by obscurity!). Connecting then needs a bit more work as it’s ssh user@ipaddress -p portnumber (found via the askubuntu forums)
Logging on to a Synology NAS from SSH as root
On a related topic, I recently needed to SSH to my NAS as root (not admin). ssh root@ipaddress -p portnumber wasn’t authenticating correctly and then I found Synology’s advice on how to login to DSM with root permission via SSH/Telnet. It seems I have to first log on as admin, then sudo -i to elevate to root.
Unfortunately, when I migrated DNS and DHCP a few months ago, I just stopped the service with sudo service dnsmasq stop so, after a power outage last week, when the Pi came back up, so did dnsmasq – and having two DNS/DHCP servers on the network produced some strange results (as might be expected…).
So, to do the job properly, I ran sudo nano /etc/default/dnsmasq and changed the ENABLED=1 line to ENABLED=0. That should prevent dnsmasq from running as a service but leaves the configuration intact if I ever need to bring it back online.
A quick sudo reboot and sudo service dnsmasq status is all that’s needed to check that dnsmasq stays disabled.
I don’t want to remove them from their source (which in this case is the copy of my OneDrive data on my home drive) but I do want to archive all of the iPhone images I have there to the master photos folder so they are included in the backup.
Reading around the Synology forums suggests that this is not as straightforward as one might think. It appears there’s no easy way to synchronise two folders on the same NAS within the DSM software; but then I stumbled across Zarino Zappia (@zarino)’s post about a Synology-flavoured rsync backup script.
By following Zarino’s advice and using ssh to connect to the box as admin, I was able to achieve what I wanted with the following command:
Way back in the autumn of 2012, I was getting all excited about my Raspberry Pi. I even hacked around to get it working over Wi-Fi but never got around to publishing the post! So, a year and a bit later, here are a few notes based on some links I recorded at the time. Your mileage may vary (the Raspberry Pi has come a long way since then and I was running Debian Squeeze rather than Raspbian) but if you’re having difficulties getting RasPi Wi-Fi to work, hopefully some of this will help.
With no need to run a Windows infrastructure at home these days, recently, I began to plan to move from a Windows Server at home to a Linux-based machine for basic services like DNS, DHCP and TFTP. Initially, I plan to build a virtual machine before switching back to native configuration when I’m happy that all is working as it should be.
The target hardware is the “low-power” server that I built a few years ago, based on an Intel Atom 330 dual core CPU. Whilst this does provide 64-bit processing capabilities, it lacks VT-x so is unsuitable for Hyper-V. Consequently I installed Oracle Virtual Box as a free type 2 hypervisor and began to install an Ubuntu Server (12.04 LTS) virtual machine. This failed, complaining that the underlying architecture was i586 and that the 64-bit image I was using needed an i686 CPU.
According to a post on the Ubuntu forums, to run a 64-bit guest in Virtual Box, I need to enable Intel VT-x (or AMD-V). As that’s not an option for me, I had to revert to 32-bit build but it’s something useful to remind myself of as my virtualisation knowledge is a little rusty these days…
Initially perfect for young children (portable, cheap, small keyboard), the screen resolution (1024×576) on my sons’ netbook is becoming too restrictive and, with no Flash Player, some of the main websites they use (Club Penguin, CBeebies) don’t work on the iPad. Setting up an external monitor each time they want to use the computer is not really practical so I needed to find another option – for now that option is recycling my the laptop that my wife replaced a couple of years ago (and which has been in the loft ever since…)
The laptop in question is an IBM ThinkPad T40 – a little long in the tooth but with a 1.5GHz Pentium M and 2GB of RAM it runs OK, although hundreds of Windows XP updates have left it feeling a little sluggish. Vista and 7 are too heavyweight so I decided to install Ubuntu (although I might also give ChromeOS a shot).
Unfortunately, the Ubuntu 12.04 installer stalled, complaining about a lack of hardware support:
This kernel requires the following features not present on the CPU:
Unable to boot – please use a kernel appropriate for your CPU
So much for Linux being a lightweight operating system, suitable for use on old hardware (in fairness, other distributions would have worked). As it happens, it turns out that this is a known issue and there are a few workarounds – the one that worked for me was to use the non-PAE mini.iso installer (I wasn’t prompted to select the generic Linux kernel, but I did have to select the Ubuntu Desktop option).
Edit the partition table: sudo fdisk -cu /dev/mmcblk0 p (to view the partition table) d (to delete a partition) 3 (to select partition 3) d (to delete a partition) 3 (to select partition 2) n (to create a new partition) p (to make it a primary partition) 2 (to create partition 2) 157696 (to set the starting position to match the old partition table – see the output from the p command earlier)
Press the Enter key (to set the maximum available partition size) w (to write the partition table)
Then, reboot: sudo shutdown -r now
After logging in again, resize the partition: sudo resize2fs /dev/mmcblk0p2
I’m much happier with the Pi now it’s running Debian – and tonight’s activity involves creating a case for it out of an old business card box (an Altoids tin won’t fit!) – watch this space for more details!
Much to my manager’s disgust (he has a programming background, whilst I’m an infrastructure guy “by trade” – although I did write code in my youth!), my Raspberry Pi arrived last week. Despite the botched launch, I still think this is one of the most exciting products we’ll see this year because, well, because it’s a fully functioning computer for around £25 (Model B) and that means the potential addressable market is enormous. Actually, that’s not quite right – the Pi is around £25 (plus VAT) and then you’ll need some peripherals – although they should be relatively easy to lay your hands on:
A micro-USB mobile phone charger (I use the one that came with my Nokia Lumia 800 but any 5V supply that can feed a micro-USB cable will do)
A USB keyboard
(Optionally) a mouse
(Optionally) some speakers
(Optionally) a USB hub (powered)
A wired network connection
An SD card
A display – but watch out as Raspberry Pi supports HDMI and component out (RCA) – not VGA.
My monitors are mostly VGA (I have one that will take DVI) and my TV is far too old for HDMI (it’s a 14-year-old Sony Trinitron 32″ widescreen CRT!) so I set the Pi up to use the analogue connection to the TV.
Once I had an operating system installed, I booted and the RasPi picked up an IP address from my DHCP server, registered itself in DNS (raspi.domainname) and set to work expanding its disk to fill the 8GB SD card I’m using.
*getting this installer to work involved installing the python-qt4 package in the Ubuntu Software Centre, then running ./fedora-arm-installer.
Unfortunately, standard definition CRT TVs are no better at working with Raspberry Pi’s than they are with any other computer (except a games console) – and why I thought that should be the case is a mystery…
Did I mention that the Raspberry Pi is a fully functioning computer for around £25? Well then, what’s not to like? Sure, performance is not lightning fast – the Raspberry Pi FAQs suggest:
“… real world performance is something like a 300MHz Pentium 2, only with much, much swankier graphics”
but that’s plenty for a bit of surfing, email and teaching my kids to write code.
I am finding though that I’m struggling a little with my chosen distro. For example, I haven’t yet managed to install Scratch and it doesn’t seem to be one of the recognised packages so I may have to resort to compiling from source – hardly ideal for getting kids started with coding. For that reason, I might switch to Debian (I’m downloading it as I write) but for now I’ll continue to explore the options that the Fedora Remix provides.
I’m sure there will be more RasPi posts on this blog but if you’re one of the thousands waiting for yours to arrive, hopefully this post will help to prepare…
And once the educational models are available, I’ll be encouraging my sons’ school to buy a lab full of these instead of a load more netbooks running Windows XP…
Last year, I decided to take my netbook out of hibernation and install Ubuntu Linux (11.04) on it. It still doesn’t get used much (the iPad is just so much easier than a netbook – except perhaps for typing) but before I blow it away and install something else… like Windows 8, or Android perhaps… I wanted to capture a few notes from the bits and pieces I installed.
Apologies if these notes are not much use to anyone else but, then again, they might be handy for someone…
Dropbox has Linux packages for a variety of Linux distros (download and then double-click on the installer) and of course there’s the option to compile from source too. The download page also includes command line instructions and a script for controlling Dropbox from the command line but I haven’t tried that yet…
Obviously, these settings will vary according to the carrier but many providers are included in the New Mobile Broadband Connection “wizard” (is it called a wizard on Linux?), so it may just be a case of picking the appropriate carrier, billing plan and APN.
Earlier this week, I participated in an online event that looked at the use of Linux (specifically Ubuntu) as an alternative to Microsoft Windows on the enterprise desktop.
It seems that every year is touted as the year of Linux on the desktop – so why hasn’t it happened yet? Or maybe 2011 really is the year of Linux on the desktop and we’ll all be using Google Chrome OS soon. Somehow I don’t think so.
From an end user perspective, many users don’t really care whether their PC runs Windows, Linux, or whatever-the-next-great-thing-is. What they require (and what the business requires – because salaries are expensive) is a system that is “usable”. Usability is in itself a subjective term, but that generally includes a large degree of familiarity – familiarity with the systems that they use outside work. Just look at the resistance to major user interface changes like the Microsoft Office “ribbon” – now think what happens when you change everything that users know about using a PC. End users also want something that works with everything else they use (i.e. an integrated experience, rather than jumping between disparate systems). And, for those who are motivated by the technology, they don’t want to feel that there is a two tier system whereby some people get a fully-featured desktop experience and others get an old, cascaded PC, with a “light” operating system on it.
From an IT management standpoint, we want to reduce costs. Not just hardware and software costs but the costs of support (people, process and technology). A “free” desktop operating system is just a very small part of the mix; supporting old hardware gets expensive; and the people costs associated with major infrastructure deployments (whether that’s a virtual desktop or a change of operating system) can be huge. Then there’s application compatibility – probably the most significant headache in any transformation. Yes, there is room for a solution that is “fit for purpose” and that may not be the same solution for everyone – but it does still need to be manageable – and it needs to meet all of the organisation’s requirements from a governance, risk and compliance perspective.
Even so, the days of allocating a Windows PC to everyone in an effort to standardise every single desktop device are starting to draw to a close. IT consumerisation is bringing new pressures to the enterprise – not just new device classes but also a proliferation of operating system environments. Cloud services (for example consuming software as a service) are a potential enabler – helping to get over the hurdles of application compatibility by boiling everything down to the lowest common denominator (a browser). The cloud is undoubtably here to stay and will certainly evolve but even SaaS is not as simple as it sounds with multiple browser choices, extensions, plug-ins, etc. If seems that, time and time again, it’s the same old legacy applications (generally specified by business IT functions, not corporate IT) that make life difficult and prevent the CIO from achieving the utopia that they seek.
2011 won’t be the year of Linux on the desktop – but it might just be the year when we stopped worrying about standardisation so much; the year when we accepted that one size might not fit all; and the year when we finally started to think about applications and data, rather than devices and operating systems.