Posts Tagged Linux

Show Gitlab Version

GitLab doesn’t display an obvious version number in the admin interface. To determine your current version (useful for upgrading), open a shell:

# Navigate to your gitlab installation folder
cd /home/git/gitlab
# Run the following to show information on your enviornment
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
#If the above command doesn't complete, determine the version with git:
git describe --tags

, , ,

No Comments

GitLab 5+ on Ubuntu 12.04 LTS

GitLab is a neat GitHub clone that can be installed on your own servers. I wanted to setup mine running in a virtualized Ubuntu 12.04LTS environment.

These instructions are for Ubuntu 12.04.2 AMD64 and GitLab 5-3-stable

Basic Instructions are here:

Deviations from Official Instructions


Rather than downloading and compiling ruby 1.9.3, I installed it from the repo:

sudo apt-get install ruby1.9.3

However, I still installed the Bundler Gem.


I went with MySQL over PostgreSQL simply because it integrates into my existing tools better.

sudo apt-get install mysql-server mysql-client libmysqlclient-dev

I use MySQL Workbench to configure my server instances. Command line instructions can be found in the GitLab Docs.

Notice in the “Install Gems” step, you have to use the First option for MySQL:

sudo -u git -H bundle install --deployment --without development test postgres

, , , , ,

No Comments

VMware Workstation 8.0.4 on Ubuntu 12.04 (Precise Pangolin)

After doing a fresh install of Ubuntu 12.04 I had problems installing running VMware Workstation 8; when building the kernel modules it failed to build the network module (vmnet).

The fix is to patch the kernel modules (as VMWare hasn’t responded to changes in the 3.2 Kernel).

  1. Download the patch from here: vmware-8.0.4_patch_linux-3.2.tar
  2. Download and extract the patch:
    tar xf vmware-8.0.4_patch_linux-3.2.tar
  3. Enable the execute flag on the extracted script (if necessary):
    chmod +x
  4. Install the ubuntu “patch” utility (If necessary):
    sudo apt-get install patch
  5. Run the script to patch the modules:
    sudo ./

    When I ran the script it tried to build the modules and reported errors, however, the next time I ran workstation it built and loaded modules without problems

Special thanks to Martin1000 in the VMWare Forums for the tips.

, , , ,

No Comments

Recover Un-mountable VMWare ESXi Volume

After upgrading to VMWare ESXi 5 from 4.1, I found one of my datastore volumes would no longer mount. The disk would show up as a device, but there were a series of errors whenever I tried to mount the volume.

After trying a variety of things, I still couldn’t get the volume to mount, so I decided to try to recover the virtual machines off the drive before wiping it.

The first step is to configure the un-mountable disk as a raw passthrough. This will allow a guest OS to access the disk. Instructions for these steps can be found here:

After converting the disk to a raw passthrough, assign it to a virtual machine on your ESXi host. I chose Gentoo Linux.

By default, most linux distributions don’t ship with VMFS support, however Christophe Fillot and Mike Hommey have developed a tool called vmfs-tools that allows mounting of VMFS partitions. If you have Debian or Ubuntu you can simply install the package. Since I was using Gentoo I had to build from source:

You may have to emerge some of the prerequisites if you do not have them. See the vmfs-tools site for details.

tar -xf vmfs-tools-0.2.1.tar.gz
cd vmfs-tools-0.2.1
make && make install

Now that we have vmfs-fuse installed, we can mount our volume:

#Ensure the fuse kernel module is loaded
modprobe fuse
#Mount the device to the desired mountpoint
vmfs-fuse /dev/sdd1 /mnt/vmfs
#copy files off of mounted vmfs
cp -Rv /mnt/vmfs /tmp

, , ,

No Comments

Pre-Eden XBMC-live on Ubuntu 10.04 Lucid

I wanted to try out some of the new features in the upcoming XBMC Eden release.

The problem is that I am running XMBC-live on Ubuntu 10.04 Lucid and the Eden xbmc-live package requires the uxlaunch package which is only available in newer versions of Ubuntu. However, it is still possible to get a working xbmc-live setup by manually configuring the system startup.

NOTICE: This guide describes how I was able to upgrade my existing Ubuntu 10.04 XMBC-live system to work with Eden nightlies. I have no idea if this process works on fresh installs or different versions of Ubuntu. If you are running Ubuntu 10.04, I would recommend installing the stable version of XBMC-live prior to attempting this guide.

First, add the XBMC nightly PPA. The official PPA is provided by Team-XBMC and can be found here: ppa:team-xbmc/unstable.
However, at time of writing, the official PPA was having some problems with the build servers, so I ended up using a ppa recommended on XBMCFreak located here: ppa:nathan-renniewaldock/xbmc-nightly.

The first step is to install the new PPA and update your sources.

sudo add-apt-repository ppa:nathan-renniewaldock/xbmc-nightly
sudo apt-get update

Next, upgrade the xbmc packages:

apt-get upgrade xbmc xbmc-bin

During this process, some of the old xbmc packages will be removed, including xbmc-data and xbmc-standalone.

Now we should have the new version of xbmc installed, however, when we boot the system, X will not start automatically and we will be left with a login prompt.

The final step is to edit the startup script. This script is located at /etc/init/xbmc-live.conf and probably already exists if you already had a previous version of XMBC-live installed. There is a simple change to make to the script to point it at the new executable.

Open the script:

sudo nano /etc/init/xbmc-live.conf

Scroll down to the script section and change the exec from /usr/bin/runXBMC to /usr/bin/xbmc-standalone:

        if ! grep -i -q autostart /tmp/xbmcliveParams ; then
        exec /bin/su xbmc -c "/usr/bin/startx /etc/X11/Xsession /usr/bin/xbmc-standalone"
end script

Restart your system and XMBC should come up. Switch to the confluence skin to see the new features.

Here is the full script for completeness:

# xbmc-live
# init XBMC environment and starts XBMC in fullscreen (if asked to do so)
#      Copyright (C) 2005-2008 Team XBMC
#  This Program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2, or (at your option)
#  any later version.
#  This Program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  GNU General Public License for more details.
#  You should have received a copy of the GNU General Public License
#  along with XBMC; see the file COPYING.  If not, write to
#  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
description     "XBMCLive"
author          "Luigi Capriotti"
start on (filesystem and stopped udevtrigger)
stop on runlevel [06]
emits starting-x
pre-start script
	get_opt() {
		echo "$@" | cut -d "=" -f 2
	clear >/dev/tty7 || true
	CMDLINE=$(cat /proc/cmdline)
	#Process command line options
	for i in ${CMDLINE}; do
		case "${i}" in
		      XBMC_PARAMS=$(get_opt $i)
	echo $XBMC_PARAMS > /tmp/xbmcliveParams
	if grep "boot=live" /proc/cmdline ; then
		# Relies on init scripts to mount boot device on a specified directory
	# Read configuration variable file if it is present
	[ -r /etc/default/xbmc-live ] && . /etc/default/xbmc-live
	if ! getent passwd $xbmcUser >/dev/null; then
		xbmcUser=$(getent passwd 1000 | sed -e 's/\:.*//')
	# Executes pre-hooks (if any) in the System "Hooks" directory
	if [ -d $BOOTHOOKSDIRECTORY/live.d ]; then
	  for hook in $(find $BOOTHOOKSDIRECTORY/live.d -type f -perm /u=x,g=x,o=x | sort)
	# Executes pre-hooks (if any) in the user "Hooks" directory
	if [ -d /home/$xbmcUser/.xbmc/live.d ]; then
	  for hook in $(find /home/$xbmcUser/.xbmc/live.d -type f -perm /u=x,g=x,o=x | sort)
	if [ -f /home/$xbmcUser/.xsession ] ; then
		rm /home/$xbmcUser/.xsession
	if [ -f /tmp/noRestartXBMC ] ; then
		rm /tmp/noRestartXBMC
end script
	if ! grep -i -q autostart /tmp/xbmcliveParams ; then
	exec /bin/su xbmc -c "/usr/bin/startx /etc/X11/Xsession /usr/bin/xbmc-standalone"
end script
pre-stop script
	touch /tmp/noRestartXBMC
	rm /tmp/xbmcliveParams
	# Clean up the console before we switch to it, to avoid text flicker
	if [ -x /usr/bin/tput ] ; then
		tput -Tlinux reset > /dev/tty1 || true
		tput -Tlinux reset > /dev/tty8 || true
	# Clear VT 1 & 8 of any console messages
	clear >/dev/tty1 || true
	clear >/dev/tty8 || true
end script

, , ,

No Comments