Archive for the ‘Server’ Category

VirtualBox Appliance Problem With Linux Guests

Saturday, June 6th, 2009
virtualbox-appliance-problem-with-linux-guests

I have been struggling with the feature of export / import appliance in VirtualBox for a couple of days now and every time it failed and my frustration grew. The problem i had was that my guest system couldn’t find its partitions after import.

Finally i found the issue, it was due to that my guest OS(openSUSE) called the partition by name ID instead of with device name, the ID was unique to the machine being exported thus changed for the new imported machine.

(more…)

Disable PC-Speaker

Saturday, May 30th, 2009
disable-pc-speaker

Sometimes it’s good to have the PC-Speaker enable, but for the most of the time it is just annoying and can drive you crazy, this tip will show you how to disable it. This has been tested on ubuntu, openSUSE & FreeBSD, if you know of other system this works on let me know.

On Linux(ubuntu, openSUSE):
1. Open up a console window and edit blacklist file.
$ sudo nano /etc/modprobe.d/blacklist

2. Add following to the end of the file and then save.
# Blacklisting pcspkr
blacklist pcspkr

3. Restart the computer.

On Unix(FreeBSD):
1. Run in console.
$ su root -c ‘ee /etc/rc.conf’

2. Add the following at the end of the file and save.
# Disable pc-speaker
modprobe -r pcspkr

3. Restart computer.

FreeBSD with DNS sandbox method

Monday, August 18th, 2008
freebsd-with-dns-sandbox-method

As a reference i used the book DNS & BIND 4th Edition and the FreeBSD documentation found here.

This how-to will focus on getting 2 dns servers up and running, one primary & one slave which is preferred way of doing it, I will mark steps that requires different configuration on primary & secondary for easier tracking on what needs to be done in regards to configuration. I will use example.org and ip range 1.2.3.x as a reference in this how-to for better control of zone names and so forth.

(more…)

Schedule tasks with crontab

Tuesday, May 27th, 2008
schedule-tasks-with-crontab

Sometimes it is good to be able to automate some tasks that is run on regular basis, it’s here where crontab does the job. crontab is a scheduler for Linux/Unix where you can either add a command directly or a script with a lot of commands to be executed on set time intervals which you set as you please.

1. Edit crontab file for the user you want the job to run as, i use root as an example.
$ sudo crontab -u root -e

2. Add your desired entry in the format like this
60 * * * * /path/to/script/or/command

The format of the entry is, m h dom mon dow command.
m = Minutes(0-59)
h = hours, (0-23)
dom = Day Of Month(1-31)
mon = Month, values (1-12)
dow = Day Of Week(1-7)
command = The command that should be run on the specified time & date.

When running tar in a script run via crontab it often fails even when it runs fine from the console, this can be helped by adding ‘> /dev/null 2>&1′ at the end of the crontab entry your adding/have, must be before the last ‘&’ if there are one present at the end of the line.