Update on Microserver Build

Just in case you are wondering where the first post on the N36L build is, it has been unfortunately a bit delayed! There have been a few developments since the last post, that have been blockers to progress.

To start with, the RAM I initially purchased was incorrect, and now I know the difference the difference with regards to different types of ECC RAM! This is now resolved and I purchased some Corsair XMS3 RAM (2x4G), and will be using this RAM in the build.

Secondly, VMWare recently launched ESXi 5 for general availability. Previously I was going to use ESXi 4.1, but figured that using ESXi 5 would be good, as it had just been released. However, that said, ESXi 5 support in libvirt isn't there yet, so I am going to have to go back to using ESXi 4.1 as per the previous plan.

I'll try and get the build post, with photos up in the next 2 weeks.

Hang in there, it won't be long!

Published: 11 September 2011 # — Tags: linux, n36l

My recent purchase - HP Microserver N36L

About a month ago I ordered a HP Proliant N36L, commonly known as the HP Microserver. I had been looking to replace my aging P3-900mhz Gateway and all-round utility server for quite some time, and when I saw this on special for only $200, I knew this was going to be the perfect replacement.

With the ability for it to have the system boot off an Internal USB device, being able to take up to 8GB of DDR3 RAM, and have 8TB of hard drive space, it will be able to meet the requirements of the current box, and add on a few new abilities in the process.

While I have been waiting for it to arrive, I figured that this would be a good opportunity to do a few guides about the configuration of the machine, both at a Hardware and Software level, and be able to provide a few guides to virtualisation.

Hardware wise, the current plan for the server I have will be to do the following upgrades:

  • Change the standard 1GB of Ram to 8GB of ECC Ram;
  • Remove the 250GB hard drive that comes with it, and replace it with 4 x 2TB hard drives;
  • Into one of the PCI Express ports, add on an additional Network Card (NIC), which will take the machine from 1 Ethernet Interface to 3; and
  • Add in a USB Drive to the internal USB Slot to give us a 16GB System disk, that will provide fast access for the system (and hopefully provide a quick boot).

Software wise, I want to have a go and setting this machine up as a Virtual Machine Host, using Virtual Machine Platforms such as Xen, VMWare ESXi and KVM.

Once we have the machine built up from the base, I will then use the opportunity to go over some other deployment and centralised configuration tools. One example of this will be Puppet.

And so, after quite a long wait, the Microserver finally arrived today.

So in the next few days (possibly the weekend), I will kick off with the first article on this series. If you have any suggestions of things you would like to see done with this box, drop us a line via twitter, and I'll try and give it a go for you.

Image from Flickr, by Samat Jain. Used under a Attribution-ShareAlike 2.0 Generic (CC BY-SA 2.0)

Published: 9 August 2011 # — Tags: linux, n36l

IP sets in 2.6.39

Apply rules in iptables against a table, instead of adding a rule for every host that applies.

Will simplify rules about 300%. Now if only we could get a full working model of PF in Linux.

Published: 21 May 2011 # — Tags: linux

Linux World Map

Quite well done, in the style of the XKCD Community Map. Big Enough to have as a new desktop Wallpaper too.

Published: 21 May 2011 # — Tags: funny, linux

Bluetooth Mouse - ArchWiki

I know this will come up again - how to reconnect a bluetooth mouse.

Published: 5 September 2010 # — Tags: bluetooth, linux

warp13 - putty/irssi/ssh/screen hints

Published: 15 January 2010 # — Tags: linux

Grsecurity patchset - ArchWiki

Published: 23 May 2009 # — Tags: linux, security

documentation:why_rsbac_does_not_use_lsm [RSBAC: Extending Linux Security Beyond the Limits]

Published: 23 May 2009 # — Tags: linux, security

Making a basic DVD - Tovid Wiki

a better way (and easier way) to make movie dvds under linux

Published: 30 November 2008 # — Tags: dvd, linux

Build Instructions (Linux) (Chromium Developer Documentation)

Build instructions for Chromium (note: there is no working browser for linux yet tho)

Published: 6 September 2008 # — Tags: chromium, linux

Linux.com :: Convert any video file to DVD with open source tools

useful notes for converting a xvid to a dvd.

Published: 27 July 2008 # — Tags: dvd, linux

Nokia E61 and SyncML synchronization using SSL (https) - Developer Discussion Boards

Sync with Nokia + Self generated certificates

Published: 2 June 2008 # — Tags: linux, nokia

ArchWiki :: Microsoft VPN client setup with pptpclient - ArchWiki

Guide of Arch Linux + pptpclient

Published: 29 December 2007 # — Tags: linux

Using the Logitech diNovo Media Desktop in Linux

A great guide to getting the diNovo working with bluetooth. Also works on how to customise the lcd display.

Published: 24 July 2007 # — Tags: linux

Linux driver for the DViCO FusionHDTV DVB-T range

Information and driver for the DVB card that I have. Should get this working.

Published: 22 July 2007 # — Tags: linux

The real reason governments don't want to move to linux....

Thanks to linux_galore for the link:

Have a read, made me chuckle, a lot.

http://www.centos.org/modules/news/article.php?storyid=127

Published: 26 March 2006 # — Tags: funny, linux

awk and sed.

Another of my subjects this semester at uni, had me using a bit of awk and sed this week just gone, and I must say, that I now do have a more understanding knowledge of both of these tools.

Before I did understand how to do rather small things with each (like change instances of words, to another word, and pull out every 4th word from a sentence to use elsewhere), I never did try and go any more into either of them.

As you can see from the following code snippets, I think I have dug a bit more into these tools.

sed: Change the order, of the first two parameters called by a function

s/somefunc(\(.*\),\(.*\)\(,.*\))/somefunc(\2,\1\3)/g

awk: add line numbers to each line of a source file, without skipping numbers. Comments should not be numbered.

{ if ($1 ~/\/\//) { printf("%5s\t%s\n", "", $0); next } }
{ if ($1 ~/\/\*/) { z = 1; printf("%5s\t%s\n", "", $0); next } }
{ if ($1 ~/\*\//) { z = 0; printf("%5s\t%s\n", "", $0); next } }
{ if (z > 0) { printf("%5s\t%s\n", "", $0); next } }
{ printf("%5s\t%s\n", (NF? ++a ":" :""), $0) }

A sample output for this awk script would be:

   1:   #include <stdio.h>

        // main routine
   2:   int main(int argc, char *argv[])
   3:   {
                /* Incredibly complex function here --
                 * it prints hello world
                 */
   4:           printf("%s", "Hello, world");
   5:           return 0; // return zero!
   6:   }

And comparing what I did, to some other features of these tools, this is still only the beginning of their abilities.

Published: 16 March 2006 # — Tags: linux, university

Win32 API vs. Linux - Round One

Before we start today's fight, we shall introduce you to the contestants, and a bit of background on each of them.

In the Red Corner, we have code written to work well with the Win32 API. The Win32 API is known for being part of Windows, and being able to kill its opponents easily, with the sheer size and complexity of itself. In the Blue Corner, we have code written to work well on Linux. Linux code being known to be quite easy to deal with, and not having heaps of levels of abstraction when it isn't neccesary.

These two come together today, to see who can write the better program that can:

  • Open a file, specified on the command line, for exclusive read only access.
  • Report if there was a problem opening the file, with an appropriate error message.
  • Close the file.

We would like to thank today's sponsor for this event, namely the Systems Programming 2 class that I am currently undertaking at University, and is making me learn how to code with the Windows API.

So that is enough, talk, lets see how the fight goes.

Windows starts off first by allowing a bit more complexity to its CreateFile() routine, but this is unfortunately useless, and not able to withstand the sheer simplicity of Linux's open() call, which beats it hands down.

In an attempt to reclaim, the match, Windows tries to claim that it can give a more superior error message handling routine, for when that file open does not work. Unfortunately, while Windows was still trying to type the function name for the routine to get the error message, Linux had already finished writing code to get and display the error message, thanks to perror(). In fact, Linux was so efficient, it decided to go one step better, and customise the error message all together.

In the end, it came down to closing the handle/file descriptor, to see if Windows would get a foot in, in this round, and it seems that it was a tie. Both Windows and Linux successfully made closing the open file nice and easy.

However, it the clear winner this round is the Linux code. Score: 2.5 - 0.5 -- Linux code wins.

To see the code used in this contest, and to agree with me that Linux definately wins this round in terms of better code/less code for this task, see the code below.

Windows

#include <windows.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
        HANDLE hFileToRead;
        LPTSTR pszErrorMessageBuf;
        SECURITY_ATTRIBUTES lpSecurityAtrribs;

        lpSecurityAtrribs.nLength = sizeof(lpSecurityAtrribs);
        lpSecurityAtrribs.lpSecurityDescriptor = NULL;
        lpSecurityAtrribs.bInheritHandle = TRUE;

        if (argc < 2)
        {
                fprintf(stderr, "Syntax: %s <filename>", argv[0]);
                return -1;
        }

        hFileToRead = CreateFile(
                        argv[1], GENERIC_READ, 0,
                        lpSecurityAtrribs, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);

        if (hFileToRead == INVALID_HANDLE_VALUE)
        {
                    FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
                        NULL, GetLastError(), 0, (LPTSTR)&pstrErrorMessageBuf, 0, NULL);

                fprintf(stderr, "Could not open file '%s': [%d] %s", argv[1],
                        GetLastError(), pstrErrorMessageBuf);
                LocalFree(pstrErrorMessageBuf);
                return -1;
        }
        else
                printf("File successfully opened.\n");

        if (!CloseHandle(hFileToRead))
                fprintf(stderr, "Error closing file...\n");

        return 0;
}

Linux

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>

int main(int argc, char *argv[])
{
        int fd;

        if (argc < 2)
        {
                fprintf(stderr, "Syntax: %s <filename>\n", argv[0]);
                return -1;
        }

        fd = open(argv[1], O_EXCL|O_RDONLY);
        if (fd == -1)
        {
                fprintf(stderr, "Could not open file '%s': [%d] %s\n",
                        argv[1], errno, strerror(errno));
                return -1;
        }
        else
                printf("File successfully opened.\n");

        if (close(fd))
                fprintf(stderr, "Error closing file...\n");

        return 0;
}
Published: 7 March 2006 # — Tags: linux, windows

NLD10 Videos

Here are some videos showing Novell's Linux Desktop 10 Technology Preview that were talked about on ubuntu's sounder list. Pretty cool stuff, even if it is just eye candy.

Published: 4 February 2006 # — Tags: linux

All systems go again

Had some offline time in a sense this last 5 days, when my computer of about 6 years (a P3-900Mhz), decided that it would finally blow-up, but only in a way that would cause me to wonder wtf it was doing.

2 Gentoo installs later, I realised it was not the hdd's going, but it was the motherboard (sigh).

So now, I have spent some money, and upgraded to a new fast machine (xorg compiled in 36 minutes!). So I am slowly catching up on email and things that have happened over the past week.

For those who are interested, some stats about the new computer:

  • AMD Athlon(tm) 64 Processor 3500+ (2211.355 MHz)
  • 1 Gig of ram
  • 4 x 250G HDD's
  • 6600td graphics card
  • Asus motherboard with on board gigabit (nforce4 chipset)
  • nice Coolmaster 531 case.

Gentoo seems to run okay on it (running in actual 64 bit mode), with some apps requiring emulation due to no 32 bit support for now.

nforce4 drivers took a bit to get working - once i realised they used OSS instead of ALSA, things became much more apparent.

Will post some more info about the system in a week or so, to let you know how its going in 64 bit stuff.

Published: 16 January 2006 # — Tags: linux

Hoff it up

Given the idea by Tony, I hoffed up the SLUG logo.

Hoffed up Slugger

Published: 19 October 2005 # — Tags: linux, update

bzr visualise

Scott, points out a nice new feature for bzr, that came from what was in git. Looks pretty cool.

Published: 18 October 2005 # — Tags: linux

Ubuntu Bugs

It seems that even the most perfect of Operating Systems, Ubuntu Linux, has a bug.

Details of the bug can be found at Launchpad.

Thanks to Pascal for bringing it to my attention. I really do think some close attention does need to be paid to this bug by the Ubuntu developers, as well as the LoCo groups and the Ubuntu community as a whole.

(yes I did giggle.)

Published: 7 October 2005 # — Tags: linux, ubuntu

Race to Linux

Aaron talks about Race to Linux having the prize as an Xbox, ironically something opposite of the goal they are trying to achieve. While my feelings on the point are neither here nor there (the Xbox is a decent piece of gaming equipment, as is the playstation), I do think the race is a great idea.

Simply put, it is trying to get coders, of ASP.Net web applications, to convert examples of current ASP.Net implmentations, or designs, into an open source language, such as PHP and Mono. So if you have some free time, might be an idea to check it out. It sounds fun, and looks fun, and you can get yourself a nice gaming machine.

Race to Linux

Published: 24 September 2005 # — Tags: linux

GNUpod

Since buying my iPod Photo months ago, I have never updated the songs on it, because I haven't been able to find a decent tool for Linux that works well (atleast for me).

I had tried GTKpod previously, but had found that it overall, it didn't work as well as it should, or maybe it was me not understanding its functionality right.

Anyway, skip forward to the a few days ago, and I was finally getting sick listening to the same songs (and podcasts), over and over again. It was time to change the songs on the iPod. I gathered this meant one of two things; installing gtkpod and trying to get it to work, or borrowing a friends computer with windows on it, to copy on some songs.

Deciding against the later, I was going to install gtkpod again, when i realised that gnupod was there. Tho it is text based, i decided to try it out.

After some minor difficulties with the scripts, mainly relating to case sensitive nature (see the end for more info), due to the default ubuntu flags when it mounted, i finally got the scripts working, and I must say, I am impressed. The advantage is they are perl scripts, so they are changable to customise a bit how I want them.

So this weekend, I might actually put some new songs on my iPod, and be able to listen to fresh G'Day World podcasts on the train each morning.

Note: The problem was because of the default Ubuntu settings for mounts. I didn't have my iPod set up in fstab, so whenever it plugged it, it got these default settings. To fix, it was as simple as adding the "check=r" flag to the mount options, either in fstab, or mounting it manually. See this email thread for more information.

Also, Ubuntu also by default adds the flag "iocharset=utf8", when mounting. It seems that this flag, overrides the check flag. So for now, I have simply removed it. If anyone has a solution to this, would be great, thanks.

Published: 24 August 2005 # — Tags: ipod, linux

IMAP daemons

I have been thinking over the last few months about implementing an IMAP daemon to look after my mail, then my current method, which is to use POP3.

I had a look at the IMAPd from the University of Washington, and it is simple enough to implement, and set up, but I was hoping to use something with a bit more configuration (not so it is harder to set up, but so i can refine some of the options).

Anyone have any suggestions for something decent? If so, leave a comment.

Note: Someone I know did mention to have a look at Cyrus (which I will do), but does anyone have any comments on it before I do?

Published: 11 August 2005 # — Tags: linux, mail

Do the fax

I decided finally, that I should find a use for the phone line that isn't being used here. My decision in the end was to use my old external 56k modem, and hook it up to a BSD box, and run a fax daemon to email and vice-versa type of gateway for when i might need to receive (and possibly one day send) a fax.

So I started by looking for a decent fax daemon program for linux, and i stumbled across Hylafax, which seems to look like it could do the job sitting on it's hands.

Great, I thought...

Problems arose after installing it, to realise that the number of configuration options that exist to get it working are extreme. It required more time setting it up, then it would have taken me to run the faxes to people.

So after 30 minutes of getting nowhere, i gave up (for now). It's been a long day, and this obviously was not a task for a day like today. One day I might decide to finally do something with that phone line again, but by then, I hope faxes are dead.

Published: 28 July 2005 # — Tags: linux