I recently set up GitLab and Mattermost on an Ubuntu 14.04 server at work using the GitLab Community Edition Omnibus installer. Overall the process was incredibly easy and I highly recommend these products. However, I ran into some hiccups when I tried to run the applications under SSL. Since it took me a little while to figure out how to work through the issues, I thought it might be helpful to document what I did to get it working properly.
One of the problems I often run into when administering Linux servers running the Ubuntu distribution is discovering that the /boot partition has become full and new kernels can no longer be installed.
The reason this happens is that apt-get (rightfully) doesn’t want to remove existing kernels when installing a new kernel. This is a Good Idea™ for two reasons:
- The package manager shouldn’t remove the files for the kernel you are currently running.
- Once you reboot and are running the new kernel, the old kernel should stick around so that you can rollback if problems are found with the new kernel.
However, thanks to the easy-to-use administration tools found in Ubuntu these days, many new Linux users don’t know how to clean up those old kernels once they’re running on the new ones. I’ve run into this problem often enough that I finally just wrote a script to do it for me.
The current version of this script is located here: clean-kernels.pl
The script works like this:
- First, it figure out what kernel you are currently running by calling out to the uname tool.
- Second, it queries the list of installed kernels using dpkg.
- Finally, it generates an apt-get command that removes all kernel versions that are lower than the one you are currently running.
For example, let’s say that we have 3.19.0-30, 3.19.0-31, and 3.19.0-32 currently installed, but we are running on the middle version: 3.19.0-31. Running the script will uninstall 3.19.0-30 but will leave 3.19.0-31 and 3.19.0-32 in place. Rebooting will boot us into 3.19.0-32, at which point we can run the script again to remove 3.19.0-31.
I hope that others will find this script useful. Let me know if you have any questions or concerns about it.
I’ve been having problems getting Skype to work properly on Ubuntu 13.04. When Skype was running properly the other audio applications on the box wouldn’t work. If I started Skype while other audio applications were running then I’d have to audio in Skype. Ubuntu uses the PulseAudio audio server for its audio services and so does Skype, so things should have been working. However, when I went into the Skype options panel PulseAudio wasn’t listed as a possible audio device. It turns out the problem has to do with me using a 64bit version of Ubuntu. The Skype binary is 32bit and it is linked against a 32bit version of GStreamer, but the 32bit version of the PulseAudio client isn’t installed by default. This is easily fixed by running:
$ sudo apt-get install libpulse0:i386
Hopefully this will save somebody else some time trying to debug this issue!