Tuesday, March 20, 2007

Upgrade Debian Sarge to Etch

I have a Debian server that has been around for 6+ years. Oh sure, the hardware has changed, even failed and replaced, but the OS has been going this whole time. I have used the DEB packages almost exclusively, maybe even religiously on this box - using whichever flavour of package management application I felt like at the time (apt-get and aptitude are my preferences).

After a Debian machine has been running for a while, and especially one that is very eclectic and is used for various services and roles, it starts to get a little nuts. What I mean is, you install a deb file from the stable release, a host of deb's from testing and a random set of debs from various sources like Debian Backports. Hell, I like to roll my own debian packages as well - from the kernel-package to dh-make-perl, a crazy assortment of packages are installed to my system - Debian makes it easy. I just followed one rule - stay with deb packages.

Okay, I'm writing this before Etch, the current testing release, has gone to stable. The reason is because I'm starting to need more and more packages that are not available in the stable release but which are in testing. Sure, I can use backports, but I'm starting to get pissed at waiting (yet again) for the stable release to be upgraded. (this is not the first release I've done this and knowing the Debian release cycle as I do, I doubt it will be the last)

So its time to upgrade Debian Sarge to Etch! (or stable to testing)

Can you hear the drum roll... or is that just in my head?

Ensure you have backed up (off the box) any information or configuration that you are not willing to part with - just in case!

Head on over to your /etc/apt/ folder (I don't have X Window on my server, if you do, ensure you kill your xdm and drop to shell).

What you need to do is change any instance of stable (or sarge) with etch - while also using a little reasoning. Why not use the name testing? Because I've been hit one too many times, when an update caused havoc on my box when I had not expected a distribution upgrade. Managed upgrades are always a smart move.

Look in /etc/apt/apt.conf to start. (if you don't have one, no worries) I only have two lines in there that now look like this:

APT::Cache-Limit 10000000;
APT::Default-Release "etch";

Next is /etc/apt/preferences, which I had used to managed several sources coming from all three Debian releases. But since I'm starting from a fresh slate, so to speak, I'm going to remove this file altogether.

The last file I needed to edit was the /etc/apt/sources.list file, that you are
probably familiar with. My sources file just became easier - commenting out all
non-testing references, use etch in place of testing, stable or sarge. I even go so far to take out deb-src sources, adding these and other repositories as I need later. My greatly simplified sources now look like this:

# main package repository
deb http://mirror.peer1.net/debian/ etch main contrib non-free
# security updates
deb http://security.debian.org/ etch/updates main contrib non-free

Don't forget to use your favourite regional mirror!

Do a apt-get update.

Easy right? Well the interesting part is coming up.

First find some wood... and knock on it with your knuckles.

Do a apt-get dist-upgrade.

I have 599 upgraded, 114 newly install and 33 to remove packages. Good idea to review what is being removed, installed, etc.

At this point, its completely up to you if you want to hit that enter key! I make no promises. :-)

Wednesday, March 07, 2007

Review: Lenovo ThinkPad X60

As a long time Thinkpad user, my vendor convinced me to try the Lenovo ThnkPad X60 Tablet out (I didn't make it very hard for him).

The short and dirty specifications are:
  • Intel Core Duo processor L2500 1.83
  • 80 GB hard drive
  • Gigabit ethernet
  • Bluetooth
  • Intel Pro/Wireless 3945ABG
  • 12.1" screen at 1400x1050x32 resolution
  • 2 GB RAM
The first thing that I notice is the weight - not even 4 pounds, easy to hold in a single hand. And portability, for me, is crucial. The next thing I notice is the size, this guy is small. Nice so far.

It has the standard Lenovo buttons, thumbpad reader, and a few new things. For one is the swival that allows the LCD to spin and close backwards - leaving the screen up like a thick book. Another button allows you to spin the screen contents around to the four arcs, choosing how you want to use your tablet when it is open like this. I have to use an external USB DVD/CD drive - no space inside - I don't mind.

I haven't even turned it on and I like it.

Windows XP comes up (ah well, nothing is perfect right!), I go through the usual questions, fingerprint authentication, etc. All good. I'm left with a ThinkPad laptop. I then spin the screen around and try out using the pen, which gets some getting used too! This is a different operating system than I'm used to with Windows, a few extras show up and I realize (ya, I know, I'm clueless) I am using Windows XP Tablet PC Edition 2005. The Input Panel is nice, intuitive.

Okay, so I get bored easy. I've that single corporate license of Windows Vista Business laying around and I read (somewhere) that the tablet features are now incorporated into this version of their latest desktop OS. Out goes XP, in goes Vista.

Installing the Lenovo software was easy, just install the ThinkAdvantage System Update. I picked and chose what I wanted (I think the Lenovo ThinkPads come with too much crap anyways). It ran better than my previous foray into Vista and it is still running (okay, its been only 3 days, but that is 1 more than my previous attempt).

The tablet features on Vista are marginally better than XP but overall slower.

I am going to give it a try for the next while - Vista on this tablet (if only to see how the un-enlightened live).

Virtualization on the Servers

I attended a virtualization conference with VMware presenting here in Vancouver.

I have used virtualization for some years on a desktop environment. On your OS of choice, setup VMware Server (or Player), then install any other OS of choice into a virtual environment. Very slick. Run your desktop of choice, a Linux distribution I hope(!) and then if you must, run Windows XP within a virtual environment.

Thats all great - been there, doing that!

What I started to get interested in is how to reduce the number of physical servers in our server room. For a small to medium sized corporation we have a large number of boxes to manage. The logical place to start, those nice shiny new HP servers we got (and haven't been used yet). We have two HP ProLiant DL380 G5 servers, 8 GB RAM, two Xeon quad-core CPUs, redundant power and drives - these are sweet boxes. We purchased on the intent that they would be J2EE application servers for our newly developed primary application - except they will be underutilized for 12-18 months. These babies are too sexy to just leave around.

Enter virtualization!

Before I call up VMware for pricing and get on their mailing list for nagging, I thought to try out Xen. It has been included in the enterprise-ready Linux distributions for a short while. It takes a different approach to virtualization and though I don't have the knowledge to tell you which is better, Xen's hypervisor approach seems to be the logical way to go. So I install XenSource XenEnterprise onto one of my sexy boxes.

Let me say that virtualization is very cool - no matter how you look at it! But using Xen on the server is (almost) better than sex!

I set up 4 of the 8 CPUs on the one server plus 4 GB RAM to be the J2EE virtual environment. Running a test J2EE environment under Debian GNU/Linux is liightening fast. We will be doing more tests, with diagnostics, but comparing to a handful of development environments the virtual environment flys.

That wasn't all. I installed Windows XP Pro as a 1 CPU, 512 MB RAM virtual environment for doing some testing of the Java client application. I will also be installing other virtual environments to max out the resources before we continue into diagnostics.

There are a few concerns with going the XenSource route rather than VMware - but the cost savings alone is incredible. We are not yet done evaluation but the more I play the sexier it all is!