We’ve just had some work done on one of our systems (which runs from a Raspberry Pi v2) so, aside from the config file backups that we can collect from the systems interface, I thought it would be prudent to grab an image backup.. this is how it was done: Continue reading “Backing up the Pi”
I’ve been playing with a few VMs as I try to figure out a new infrastructure for our office, and as part of this I’ve taken a particular shine to CentOS as a minimal build for my virtual servers. I then decided I wanted to get a few sandbox environments running with desktop software and, well.. that’s where the fun began!
After about twelvety-zillion restores from snapshots and reading, and forum trawling, and more restores, I think I’ve come up with a winning way to turn a humble CentOS 7 minimal build, booting to the lonely command prompt, into a bastion of desktoppy goodness. Hopefully this will be of use to someone else out there, if not – it will serve and a handy reminder to me as to what I did to get things running.
Koha is a fully featured, scalable library management system.
So, I thought I’d set up Koha on a virtual machine to have a bit of a play, and maybe use it to manage our library at home.
Create the virtual machine
I’m using VirtualBox as my VM manager, so – first off we create a new machine, give it a name and set the type to ‘Linux, Debian (64-bit)’ as Koha is most often deployed on Debian servers.
The default settings (512MB RAM, 1 Processor, 8GB HDD) are fine, and we will set the network card to be a bridged adapter (which will give it its own IP address on our local network). For now so all that remains is to point the CD to the latest Debian installation image. I am using the network install as this machine will only be built with what Koha needs and thus I don’t need to pull down local copies of a bunch of things we won’t install. So, let’s start the VM and get on with the installation.
So, I decided to give running a linux distro *solely* from a USB 3.0 flash drive… the install itself was fairly simple and painless, the pain only started on the reboot.
The drive failed, and I was dropped to the rather unfriendly >initfs prompt.
I tried a few things, from fixing the failed superblocks
dumpe2fs /dev/sdc1 | grep superblock
fsck -b [ALTERNATE SUPERBLOCK # e.g. 32768] /dev/sdc1
…to trying to repair the file system
sudo fsck -fp /dev/sdc1
hdparm -r0 /dev/sdc
At which point I was 2 beers into the problem and getting a little… impatient. The last link however gave me two other possibilities:
- The drive itself may be faulty (it’s apparently somewhat common for poor soldering to cause this ‘read-only’ condition)
- Run a utility from the drive manufacturer to low-level format the drive and start again (waay too easy, and a WINDOWS based until – it would be like admitting defeat!)
I considered adding a third beer to the problem solving mix, then decided that it’d just be easier to go with option 2… a quick search later and I was on the Apacer support site and 337kb away from solving the problem.
My best mate dropped over on the weekend and left me an ancient Sony Vaio that he’d acquired for his 7-year-old daughter.
After shooting the breeze over the beer, we got to talking about his daughters computer use. Essentially he (and she) just wanted “something she can use and have for her own” – he’d already been supplied with a Live CD of Doudou Linux which she’d been booting from, yet due to the failing hard drive in the near fossilized Vaio, the machine was taking far too long to start-up – by which time her attention span was exceeded.
Yay! My favorite Linux distro gets a facelift today with Ubuntu 11.04 making way for the newly released version 11.10Â ‘Oneiric Ocelot’. From past history lessons, I do tend to stray on the side of caution, so only one of my machines will be getting the upgrade treatment this week and I’ll hold off with the others until any post update issues shake out.
For those who haven’t given Linux a try yet – I’d strongly suggest giving Ubuntu a go – it has a nice interface and can be skinned to look and feel quite similar to some of the other major operating systems you may already be familiar with. Follow this download link and grab the file.
If you just want to kick the tyres and have a quick look, there are some easy to follow instructions on the download page for making a ‘Live CD’ or a bootable USB stick that you can drop into your current machine and check out.
For those already running Ubuntu, upgrading is as easy as following the instructions on this page, or by entering the command:
from a terminal window (or from a command via <Alt> + <F2> ). At the time of writing, the update files hadn’t made it to the New Zealand servers so you may want to hold off a little, or change your region under the ‘Settings’ option.
Good luck, enjoy (and don’t forget to make a backup of your data files BEFORE you start…)
From Google, and the various Linux community forums, this is a fairly common problem so, in an effort to be more useful than those who simply post a link to the GRUB man page, or an article which spells out how dumb it is to install Windows AFTER Ubuntu – I thought I’d drop my experience and the resolution here – I’m bound to need it at some point in the future.
- Boot from a Ubuntu LIVE CD/USB
- From a terminal, enter the following
sudo fdisk -l
- This will identify the device / drive. For me (and most users) this will tend to be /dev/sda
- If you are still uncertain you can also run sudo blkid for more details and review the partition labels & sizes
- Mount the Ubuntu boot partition
sudo mount /dev/sdXY /mnt
e.g. sudo mount /dev/sda1 /mnt
- Run grub-install as below to drop the GRUB2 files back onto the boot partition where they should reside
sudo grub-install --root-directory=/mnt /dev/sdX
e.g. sudo grub-install --root-directory=/mnt /dev/sda
- Reboot (into your freshly resurrected Ubuntu installation)
- Open a terminal and refresh the GRUB2 menu with:
- That’s it.. you SHOULD now have both Ubuntu and Windows 7 detected at boot and be able to choose between them.
Thanks to the Ubuntu Community for this page – and all the others which pointed to different solutions and variants of this fix. If the above doesn’t work for you, Google is your friend – there’s a heap more articles out there which should offer you an eventual solution.
When Ubuntu 11.04 released, things went backwards for the EEE. If the wireless adapter was enabled, Natty would hang soon after login – it turns out this was due to a kernel issue similar to that experienced in its predecessor.
But, as per many things in the open software world, the community has come up with a solution which I’ve summarised below.
- From here, download the latest kernel files which should be named as follows:
- linux-headers-2.6.39-999-generic_2.6.39-999. [LatestDateTimeStamp]_i386.deb
- linux-image-2.6.39-999-generic_2.6.39-999. [LatestDateTimeStamp]_i386.deb
- Then, from a terminal window, install them in the SAME order they were downloaded i.e.:
sudo dpkg -i linux-headers-2.6.39-999_2.6.39-999.[LatestDateTimeStamp]_all.deb
sudo dpkg -i linux-headers-2.6.39-999-generic_2.6.39-999. [LatestDateTimeStamp]_i386.deb
sudo dpkg -i linux-image-2.6.39-999-generic_2.6.39-999. [LatestDateTimeStamp]_i386.deb
- Restart your EEE (with WiFi enabled) and login.
Good luck! (YMMV)
Ugh – finally, after much backward and forward (even to the point I dragged out a Windows laptop) I’ve tracked down the issue which was stopping my embedded webcams (which otherwise works in all other applications) from working with the latest beta of Skype for Linux.
The solution is this (thanks Ubuntu Forums):
for 32-bit Linux / Skype
sudo mv /usr/bin/skype /usr/bin/skype.original sudo echo -e "#!/bin/bash \nLD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype.original" > /usr/bin/skype
for 64-bit Â Linux / Skype
sudo mv /usr/bin/skype /usr/bin/skype.original sudo echo -e "#!/bin/bash \nLD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype.original" > /usr/bin/skype
I found the command to build the script didn’t work out for me
$ sudo echo -e "#!/bin/bash \nLD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype.original" > /usr/bin/skype bash: !/bin/bash: event not found
So, I built my own script
sudo nano /usr/bin/skype
and pasted in the lines to build the script
#!/bin/bash LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype.original
Of course, the script needs to be made executable
sudo chmod +x /usr/bin/skype
Then all that remained was to make sure no instances of skype were running, and re-launch skype from the menu.
For me, the video came up once Skype had loaded, from otherÂ discussions, some people may need to restart their machines.
The kids in Room 3 had a problem, all of the caterpillars that went into the pupa stage of their metamorphosis were emerging when the students were out of the classroom.
The solution was to setup a laptop with a web camera programmed to take a snapshot of a waiting chrysalis once every minute. These images were stitched together into a time-lapse which captured the butterfly emerging in this video.
Feel free to skip over rest of the content in this article as what is of interest will vary greatly between viewers – but I wanted to present the whole story in one location in case it is useful to others who are studying similar processes.
Before getting into the detail of the ‘how’ the project was done, it was fascinating to watch the kids go through the journey of:
- Identifying the problem of missing the butterflies emerging
- Strategising what they could do to overcome the issue
- Discarding ideas which were unworkable
- Agreeing on using the computer / webcam
- Thinking about what other things time-lapse would be useful for