Archive for the ‘Uncategorized’ Category

Linux and large hard drives - June 30th, 2007

I just finished rebuilding the backup server, and I discovered something new about Linux which I didn’t know (although I did assume it was possible).

I’d tried googling for the answer to this question without avail, so I’ve blogged it here to hopefully answer the question for someone else in my same situation.

The problem is you have a large hard disk, let’s say 80GB. The computer’s BIOS is old and can’t detect it properly. The question is, can Linux access / mount / detect a hard disk larger than the BIOS supports and can detect?

Well the answer it would seem is proved to be yes, in at least some circumstances.

I’m not saying this will work for everyone, because I’m not a Linux expert. But it did work for me, and I’ll give my educated guess at why.

When Linux boots (well actually just before it boots) the computer moves from 16bit to 32bit mode (“protected mode”, a 386 feature which stuck and exists even in the latest x86 AMD and Intel processors). When this happens, the BIOS is rendered fairly uesless (as I recall, it was a long time ago I was interested in writing my own 32bit OS!) and so the Operating System starts accessing hardware through “IO” ports, special registers (again, as I recall) in the processor. Through these, it can access all the hardware without going near the BIOS, so even if your HD is not supported by the BIOS, it may well be accessible by Linux, or any other 32bit Operating System.

Autopsy - June 29th, 2007

I just had the enjoyment of performing an autopsy on our backup server, arguably the most important machine on the network, responsible for the retreival and archiving of the filesystems from all the other servers.

As I opened the case it was immediately obvious what had happened, an intruder had broken in and hacked the machine physically. No, not a burgular, nor a government agent but a mouse.

It would appear that most of the hardware has been rendered usless, one harddrive is in a very bad state, the motherboard has urine and other such waste all over it (and in several places capacitors look like they’ve been shorted), the PCI slots are blocked up and the network card appears fried. Fortunately the CPU untouched, as does the RAM, PSU and other two HDs.

The reason I’m blogging this not for the comedy’s sake (at present I find this quite far from halarious, but that may change in the future) but to act as a warning to all those who’re reading this and are administrators to their own networks. Make sure, please, that your computers don’t have PCI slots without blanking plates in them, that no CD drive bays are empty and open and that the case remains securly on at all times. I can only assume that this mouse got in through one of the two open PCI/ISA slots in the case, as there was no other holes large enough. Don’t under estimate the common mouse.

Window Manager for Tablet users - May 31st, 2007

Having since bought my shiney new Wacom 2 tablet (which incidently works perfectly under XOrg, Ubuntu has it configured out of the box) I’ve started to wonder if there’s more use for it than just graphics editing.

If you’ve never used a graphics tablet before, I encourage you to do so at some point. Once you get used to them, they’re really quite intuitive. My particular one has pressure sensitivity, more expensive ones even detect the angle you’re holding the pen at. My only issue is, while the tablet is superb for working in the GIMP and Inkscape, it becomes completely useless elsewhere. Obviously it’s useable in other applications (such as OpenOffice) but with a normal desktop enviroment it’s more hassle than benefit.

So I’ve been thinking, partly triggered by trying to think of a good 3rd year project for my degree, partly because I’m a geek and I’m forever thinking up hacks and such to muck around with in my spare time, and I’ve come up with what I believe will prove an interesting adventure: a X window manager designed for graphic tablet users.

Some of the issues I see with existing window managers and graphics tablets are:

  • Total reliance on double clicking and right-clicking, both of which is quite an effort on a (at least it is mine) graphic tablet.
  • Small and hard to select menu items, window borders and mostly visual components in general
  • Interaction occurs pretty much anywhere on the screen, with little (if any) logical flow

So for my window manager we will see some big differences:

  • No double/right clicking (atleast not in the window manager itself). Keyboard combinations will replace this (i.e. Ctrl+Alt+C for double left click, Ctrl+Alt+X for right click)
  • Larger menu items. Prehaps some kind of funky “zoom” mode, so as the pen moves over the items they enlarge and shrink, making selecting one significantly easier.
  • Less buttons to click. No more double clicking the title bar to maximize the window, rather an easy to remember, left handed key combo (i.e. Ctrl+Alt+W). Same for quitting windows (Ctrl+Alt+Q prehaps), minimizing and of course switching.
  • Window borders will be bigger. Prehaps just the bottom right and top left corners will be significantly thicker, allowing easy grabbing with a pen. Alt+drag will be implemented early on, a superb X feature that works well with graphics tablets.
  • Alternative scroll wheel method, some super key (prehaps Ctrl+Alt will bring up a temporary menu under the pen or something) which when held while dragging the pen will scroll up and down respectively.
  • Menus and toolbars will move to the edges, much alike in OSX. For graphics tablets this is a lot easier to navigate to, you know the top of the graphics tablet will jump you toward menus, the right hand side toward toolbars etc.

So the next step is to finish Saturday’s exam, and then I’m free to produce some layout designs etc, and start looking over some WM’s source to find out how bigger-a-task I’m taking on :P

Ubuntu Server on 386 hardware - May 26th, 2007

I’m blogging this in the hope that I might get more Google coverage for the solution to a problem I hit when trying to setup Ubuntu server on an older machine down the church. I originally posted the solution to the official Ubuntu forums, and it’s had a few replies saying it worked and was helpful. I remember clearly however having to search for quite some time with Google before I finally found that aforementioned thread relating to my problem. Even then, it didn’t have a solution (until I made one).

With that in mind, I’m hoping that the blog I made here will better describe the problem, and hopefully you’re reading this because you google’d for the issue and landed here after seeing it on the second or third result, rather than the 4th page of the most unrelated search ever!

So, on with the problem.

You’ve installed Ubuntu onto an older machine, a K6 Athlon or some other 386 processor (perhaps an otherwise outdated P1, P2 or P3, a Celeron or other 386 Pentium), you’ve rebooted and GrUB’s appeared as expected. That is to say, you’ve gotten past the BIOS’ POST and GRUB has appeared asking you what OS to load. You’ve selected “Ubuntu Server” and GRUB has printed “Savedefault” and “Boot” to the screen. Then the computer reboots. Again and again.

So the problem is reoccurring, GrUB loads, Linux. You’ve tried swapping some hardware in and out, the CD defiantly boots OK, the ISO you downloaded has the right MD5 checksum and in general other OSes load just peachy. It’s just Ubuntu that won’t boot. No error messages, just silence, a black screen and then a reboot. If the computer beeps, that’s just the BIOS.

So what’s the solution? Well there’s two. Basically the problem is that the Ubuntu Server CD installs a 686 optimised Linux kernel (at least it did at the time of writing), and your slightly older processor is a 386 (or 486/586, I don’t know if the kernel works on them or not). So you can either buy new hardware or use a different kernel. Assuming you want to do the latter, and prevent those consistent reboots, read right on ahead!

To use a different kernel (as the install disk clearly does) you just need to:

  • Install the system using the server CD as before
  • Boot again using the CD as you did to install
  • Select the “Rescue” option rather than “Install
  • Ensure you enter a proper chroot’ed environment, i.e. select “run a shell from the rescued system” when prompted
  • Run “apt-get remove linux-server” – as far as I can see it removes nothing more than the installed Linux kernel (which doesn’t boot on your hardware)
  • Execute “apt-get install linux-386” – this will install a 386 compatible server kernel, and let Ubuntu keep you up to date with patches (which is important!)
  • Check grub’s been updated properly and reboot (nano /boot/grub/menu.lst)
  • Boot off the HD to (hopefully) see your new server install.

If that works for you, I’d love to know! Leave me a comment. Equally well if it doesn’t, again, I’d love to know and be able to help out. If you have anything to add, again, leave a comment and if possible, leave on on the Ubuntu forums thread I linked to above, just so there’s an official record too.

Vista and large networks - May 1st, 2007

Yesterday I had the laughs of all laughs. As anyone who knows me personally will know, I’ve recently been “trying out” Microsoft Windows Vista (yes, that you did read that correctly.) I’d rather be openminded than closed, primarily because I hate it when people tell me how rubbish non-Microsoft software is when they’ve never even given the alternative a serious try. Also partly because I’m a geek.

Anyway, Suzanne’s got Vista on her shiny new Dell laptop (4h+ of battery life ftw!), and so far it’s been working moderately well. It crashed at the very end of the setup when we first booted it, the print system has a SERIOUS bug that prevents further printing if you delete a spooled document, forcing regular reboots and it recently acquired a really interesting one about IP availability on the University network. This one ladies and gentlemen, is a computing classic.

When Suzanne first told me “oh by the way, my laptop keeps telling me there’s another computer using my IP address, what have I done wrong?” my immediate thinking was “great some fresher who doesn’t know a thing about DHCP settings in Windows has gone and statically assigned themselves Suzanne’s IP”, then I thought “well I guess it could be someone being naughty on the network” and finally “oh it must just be the University’s DHCP pool’s got a bug / misconfiguration.”.

So she E-Mails the help desk, and as I predicted, they asked for her laptop to be brought in, they prod and poke it, point out that it’s running “Vista” and that “you’ve got it all set up correctly as far as I can see” (typically unhelpful as always), but then things went in a direction I hadn’t anticipated. The guy behind the desk says “I’ll go ask our network guy”. Genius! Get a geek onto it! That’s the way. So off he goes, natters away, comes back and goes “oh it’s running Vista. That’s the problem.”

Apparently (and I have no idea if this is true, I assume it is) that Vista has a hefty bug in that it “forgets” (as the guy described it) what IP address it had when it hibernates. Upon resuming, it will look at a “list of computers on the network” and kick and scream because it thinks the IP address it was using is already in use. I guess in more technical terms Vista has a bug that means it gets really REALLY badly confused when it resumes from hibernation, looking up either a random IP or seeing itself or whatever in the list of NetBIOS to IP table and thus sees a non-existent IP conflict. Rather than thinking “oh maybe I should refresh my NetBIOS, DNS and IP address from the local WINS and DHCP server like all those really hard to use free operating systems like Linux and BSD I’ll just blow up in the user’s face.”

Mmmm… congratulations Microsoft.

MX backup with Courier-MTA - April 14th, 2007

After having had to take down hedwig a fair few hours over the last week (if you didn’t know, Debian has made a new stable release, and amazingly there’s no pigs flying!) while it under went some fairly heavy software updates. During this time Courier, the MTA we use was back logged with a fair number of E-Mails. Of course some 99.9% of them were just spam, but it make me realise just how much load hedwig is under.

To give you some idea, Apache reports a total of 24884 hits for Feb, 22671 for March and 8998 for April (and we’re not even half way through the month yet!). At peak times we’re getting some 300 hits an hour (which works out at around 5 hits a minute, which while not sounding a lot, remember that this is an average over an entire hour, it’s quite likely those 300 hits are over a period of around 10-15 minutes, making a hit ever 5 seconds.) One of our user’s spam folder currently contains 362 messages. The oldest one being just 3 weeks old, that makes over 100 spams a day, for that one user alone! And that’s only the ones that are detected! This particular user claims to be putting some 20-30 a day in manually himself. I know these statistics aren’t anything like Google or Microsoft’s, but for an ADSL hosted, off the shelf and recycled hardware that’s being maintained by someone who’s never done this kind of thing before, not to mention that SpamAssassin and ClamAV eat RAM like horses with sugar cubes and the way that just about everything seems to connect to MySQL, well I have to say I think things are holding up incredibly well…

So back to my original reason for posting. I’ve started to realise over the last few days that more and more people are becoming reliant on our servers. Everything from the heating, lights and access control to E-Mail, websites, file services and DNS is being hosted from a handful of Unix machines hidden away in a secured cupboard in a building in a village where the ADSL connection can come and go as readily as my dog will eat his dinner and where power outages are as common as crashes on the M11. While everything is backed by several (heavy, and I do mean HEAVY) UPSes, something as simple as me tripping over a network cable can result in undelivered E-Mails (which has happened on more than one occasion), and the increase in reliance on these systems means an increase of responsibility for me. At present only 4 users are relying on the E-Mail server, but this is set to increase in the upcoming months (by a factor of 3 or 4.) It’s only this one service that’s crucial enough to warrant my loosing some sleep at night (as sad as that is, it does.) At present, if the Internet, power or user stupidity goes badly wrong for any substantial length of time, people loose out. And worse still; I loose out.

So the solution is fairly simple. Configure a backup E-Mail server! The only problem is, where? At present the only other server I have access too is located at our home, also in the same village, also on the same BT exchange, also subject to the same regularity of power outages as mentioned. But never mind, it’s better than nothing, and at the very least it’ll prevent E-Mail loss when I accidently pull the wrong cable out ;)

I’ll post follow-ups to this blog as I progress with this adventure. Skimming over the Courier-MTA FAQ it would appear quite simple to configure it as a backup MX. Whether this proves true or not I’m yet to discover.