Category: Ubuntu

Remove Ubuntu Splash Screen from starting on boot

Here’s a simple way of changing your Ubuntu server so it won’t be using the splash screen. Great for seeing console, if you’re not using VESA or just plain being old school.

first:

# sudo nano /etc/grub/menu.lst

look for

# defoptions= quiet splash

change it to – important leave the # in the line.

# defoptions=

now just run the grub updating tool and you’ll start up without the splash

# sudo update-grub

Easy eh?

How to add a “Go To Nagios” button to nagios administrator

It’s easy, once you have nagiosadministrator installed, you’ll probably notice there’s no easy way to actually reach nagios. To add a quick button to the toolbar to do this, follow these steps:

 

1. SSH to server running nagios/nagiosadministrator

2. Go to your nagios administrator directory, ours is /var/www/nagiosadmin

3. Now, edit the menu file

# nano apps/backend/lib/topMenu.class.php

4. Now, change the first class topMenu from this

class topMenu
{
protected static $items = array(
‘contact’ => ‘Contacts’,
‘contactgroup’ => ‘Contact Groups’,
‘os’ => ‘Operating Systems’,
‘service’ => ‘Services’,
‘hostgroup’ => ‘Host Groups’,
‘host’ => ‘Hosts’,
‘command’ => ‘Commands’,
‘template’ => ‘Templates’,
‘generator’ => ‘Generator’
);

to this

class topMenu
{
protected static $items = array(
‘contact’ => ‘Contacts’,
‘contactgroup’ => ‘Contact Groups’,
‘os’ => ‘Operating Systems’,
‘service’ => ‘Services’,
‘hostgroup’ => ‘Host Groups’,
‘host’ => ‘Hosts’,
‘command’ => ‘Commands’,
‘template’ => ‘Templates’,
‘generator’ => ‘Generator’,
‘nagios’ => ‘Go To Nagios’
);

5. Refresh the Nagios Administrator web interface, and you’ll see a fancy new button you can click on to take you right to nagios.

Enjoy!

Migrating and Mounting VMWare Images from VMWare Server 2.x into a VMWare Server 1.x environment

Tonight we decided we’d had enough of VMWare Server 2.0’s issues and shakiness. We started getting the following error, because as it turns out (we’re stupid for not thinking of this ahead of time – lesson learned) VMWare server beta’s have an expiry date, along with it’s bugs. Today we started getting this error:

“VCommand error: This product has expired.”

This box holds some Asterisk Development stuff and some other Dev systems that we couldn’t really have go down on us. So, we downgraded our VMWare 2.x Server to the latest 1.x branch of VMWare. Then on we went to importing Virtual Machines from Server 2.0 and Workstation 6. As soon as we started to power them on, the fun started. Of course! The VM’s weren’t compatible anymore and gave us a couple errors. Here’s how we fixed it.

The first error we received was:

“A General System Error Occurred: Unknown Error”

This happened as soon as we tried to power on the VM. This was easily fixed. We entered the Virtual Machine’s directory, and edited the .vmx file for the virtual machine, this is just plain text. Replacing the next few lines fixed it right up for us.

config.version = “8”
virtualHW.version = “6”

became

config.version = “4”
virtualHW.version = “4”

Now we could power them up. However, we now encountered another error that we couldn’t open the virtual disk we had created. The error was something about how the Virtual Disks were created in a later version of vmware, and couldn’t be mounted. We’d have to re-create them. Obviously this wasn’t an option.

In some of the Virtual Machine directories, we had a file to edit with a text editor, this was simple enough.

# nano virtualdiskname.vmxf

Then change this:

ddb.virtualHWVersion = “6”

became

ddb.virtualHWVersion = “4”

However, some of the other directories (mainly the ones created with VmWare Workstation 6) did not have a simple text file to edit, instead we had to edit the actual virtual disk using a hex editor. We chose the wonderful heme editor. Usage Instructions for Heme are here.

Basically put, do this:

# heme virtualdisk.vmdk

Now press “w” on your keyboard to search for “virtualHWVersion“. You will find it in the ascii column eventually. Hit “TAB” to enter Ascii mode, move your cursor with the arrow keys to where you need to replace the number. Replace the “8” or the “6” with a “4” and then press “s” to save the file. Answer yes to saving and then wait for it to save. Now exit the program by pressing “q“. You’ll notice it created a backup file with the “~” extension on it incase you messed up the hex editing. Leave this backup file here for now. Continue on, nothing to see here.

Now on the VMWare server, make sure that all the files in the virtual machine directory are chmodd’d properly.

# cd /virtual machine/directory/

# chown user:group *
# chmod og=rwx *

Now you should be able to start your vm without any issues.

If it all works, feel free to delete the backup .vmdk~ that heme created for you.

Good luck!