04th Feb2013

Ubuntu update/upgrade fails with dpkg error message

by Gyro

Today, my Ubuntu was unable to install update.

I got this error message after trying to update Ubuntu:

dpkg: error: parsing file ‘/var/lib/dpkg/available' near line 15054 package ‘unity-common':
duplicate value for `Architecture' field
E: Sub-process /usr/bin/dpkg returned an error code (2)

After some research and trial'n'error, I came up with this solution:

1.Clear the content of the "available" file
# sudo nano /var/lib/dpkg/available
or
# sudo rm /var/lib/dpkg/available
# sudo touch /var/lib/dpkg/available

2. "Reset"
# sudo dpkg --configure -a
# sudo apt-get clean

3. Update/Upgrade again
# sudo apt-get update
# sudo apt-get upgrade

That should be all!

Step 2 may be unnecessary, but I have no way of testing it again… maybe someone with the same or a similar problem can try it without step 2 and let me know? ;)

1364

21st Jan2013

Gitlab service doesn’t run on startup/boot/autostart

by Gyro

I have been using Gitlab for a while now to have backups of all my git repositories on my dedicated servers. Now, I needed to reboot one of them for the first time since I installed Gitlab, and ended up with a ‘502 bad gateway' warning by nginx, when trying to access the Gitlab web interface.

I found this on the github, hidden in a small pull request:

gitlab doesn't start on boot if you follow the install instructions on Ubuntu (12.04 LTS Server -- probably others). Turns out gitlab requires redis-server to be running for gitlab to be able to start. Startup script S20redis-server isn't run until after S20gitlab so gitlab fails to start on boot. Webserver will be up, bad gateway 502 error is usually seen/reported. Starting gitlab manually works (because redis-server has started). This change makes gitlab start after redis-server.

The single line for victory:
# sudo update-rc.d gitlab defaults 70 30

Enjoy :enjoy:

source: github

2995

27th Aug2012

Keyboard Language Switcher Ubuntu Systray

by Gyro

I just installed another language to Ubuntu 12.04, and was a bit surprised not to find any icon in the systray (taskbar, top bar, notification area), also there was no shortcut I could find to make it change language.

In case you are trying to change the keyboard layout/language with a keyboard shortcut or setup the systray icon that looks like a keyboard to switch the language in the notificationa rea, then you've come to the right place :)

(more…)

7768

31st Jul2012

Scan IP Network show Computers Network Devices with Angry IP Scanner

by Gyro

Angry IP Scanner (aka "ipscan") is a network scanner designed to be fast and simple to use. Angry IP Scanner is a open-source and cross-platform software to Scan IP Network show Computers Network Devices in a certain IP range.

Angry IP Scanner not only finds computers and other devices connected to the network. For computers/devices found in the network, it will also display the host name, as well as scan and list their open ports. Angry IP Scanner has many other features to in regards to Scan IP Network show Computers Network Devices.

(more…)

3064

27th Jul2012

EXT4-fs: group descriptors corrupted! Cannot mount disk using Ubuntu

by Gyro

Whaaa, Datageddon! My 2TB external just decided to stop working. "dmesg | tail" gave me the worst of the worst messages: "EXT4-fs (sda1): group descriptors corrupted!", which translates to me as "kiss your data bye bye"…

After some searching I came across the magic terminal commands to solve the problem:

(more…)

26922

26th Jul2012

Resize VirtualBox Disk Image – grow, expand, increase a .VDI disk image in 1 minute

by Gyro
Resize VirtualBox Disk Image -- the easy and the hard way.Today I actually used up the 20GB of virtual disk space I set for the Windows XP I use for specific Windows Software. Who would have thought that an old Windows XP license would be useful again, eh? :)

After performing a quick search on how to manipulate an existing VDI file, I found a bunch of lengthy guides, all pretty much saying the exact same thing… create a new VDI, load the old and new VDI disk images into a Virtual Machine as a master and slave drive, boot with a gParted or equivalent BootCD image, and then clone the old disk to the new one… or in short: do a lot of steps that take forever, but not what I want: Resize VirtualBox Disk Image.

virtualbox

After flipping through the 10th or so guide, I realized that pretty much all of them were written in 2008… very unusual as bloggers usually write about the same subject on a yearly basis. That in mind, I search a bit more and… BINGO! Since VirtualBox 4 is out, there is a simple command line tool to resize VDI images. Man, those extra 5 minutes of searching just saved me from a lot of hassle and a huge waste of time.
(more…)

385538