When ltsp-update-image stops working

Today I have a cautionary tale to tell of LTSP machines and Synaptic’s automatic package management features.

The other day I updated the packages on my LTSP server. I did it the way I always do: update the server itself, then enter the chroot environment for the client image and update the packages there. During the update process, Synaptic told me that there were a bunch of packages that it could auto-remove since they were no longer required – this would save me some 133Mb of space in my client image. Since I always take any opportunity I can to reduce the client image size, I thought ‘yippee’ and consented to the package removal. Everything updated as normal, so I exited the chroot environment and proceeded to update the image:

sudo ltsp-update-image

The result? Nothing. No output, no error, and no updated image. I ran the command three more times just in case a miracle was due to me, but apparently not. After a bit of head-scratching, I headed over to the #ltsp IRC channel, and asked for advice. After explaining what I’d been doing, a nice person by the name of Gadi asked me to check whether or not I had either the ltsp-client or ltsp-client core packages installed in the chroot environment. It turns out that I hadn’t – Synaptic’s auto-remove had deleted them, which meant ltsp-update-image didn’t recognise an LTSP environment and sulked. (It would have been nice if it told me that, but never mind.) I re-installed both (which in turn reinstated half the packages that Synaptic said it could remove in the first place), and all was well – ltsp-update-image could do its thing.

The moral of the story is, don’t believe anything Synaptic tells you about auto-removing packages on an LTSP client image.

As a side note, somewhere in this mess my NBD server config got trashed – the /etc/nbd-server/config file had disappeared completely. No NBD config = no NBD server = unhappy LTSP clients. However, a bit of quick reading around some documentation meant that I could quickly reinstate it. For the sake of completeness I thought I’d post it here. I tailored the file to my specific setup, but since I accepted all the defaults when I first installed LTSP it should work for most people. In any case, it’s a good starting point.

user = nbd
group = nbd

port = 2002
exportname = /opt/ltsp/images/i386.img

As server configs go, that’s a nice one.

Leave a Reply

Your email address will not be published. Required fields are marked *