Archive for the 'Linux' Category

Gparted rocks

I just wanted to write a quick note about gparted. This has got to be one of the most handy pieces of software on the planet.
As you know, I have been doing a lot of different distribution testing on my test laptop lately. Well, one thing that didn’t occur to me until too late was that I can only have 4 primary partitions on a drive. Yes, on the 5th OS I had one of those “DOH!” moments :-)

livecd of Ubuntu because I cannot move around a partition I am actively using. I moved 2 primary partitions to the end of my hard drive’s free space. I then extended the size of my extended partition to encompass all the free space on my hard drive. With gparted, this was a simple drag and click procedure.

20 minutes later (hey, 30gb data to move around) and I was set with a pile of free space in my extended partition so I could continue doing installs :-)

I did it!

One month ago I decided to take the challenge and see if I could blog all month long for November’s National Blog Posting Month. I was absolutely sure that I would fail.

Amazingly enough, I did not.

So, what does this mean? Does it mean that I will continue posting an entry every day? Not a chance. Does it mean that I have somehow fulfilled my childhood dream of being a writer? Nope. Did it even help to make me better at writing? Well, that is subjective. I believe that it proved to me that I can muster the discipline to write something down if I need to, if there is a goal involved. Whether my writing style or content was any good is really your call, as I am slightly biased and sometimes overly critical as well.

What I would love to see come out of this exercise is encouragement for other bloggers. If I can do this, surely anyone can, and I do enjoy seeing posts from my friends on My challenge is for my friends there and you who read this blog to pick up the torch and whip into a blogging frenzy! Seriously though, it can’t hurt for linuxy and geeky folk to flood the web with some interesting stuff. It’s good exposure and great entertainment.

So, who’s next? Who will take my challenge? Dann? Pat? Allan???? :-)

Ubuntu 9.10 and Grub 2

Yes, another post about Ubuntu 9.10. I know I tried it out before, but I put it on this new (old) laptop and am giving it a little better run this time. I still believe 9.10 (Karmic) to be a fine running distribution and this time I got to test out my method of installing all the codecs I want on there, along with messing with Grub 2 a little bit.

When you are travelling abroad where it’s legal to do so, as i was just the other day, you might want to have access to all those codecs that make life worth living on a linux box. Things like listening to your mp3s and watching your dvds and miscellaneous media files are very dificult without them.

I realise that Ubuntu has, for some time now, been able to detect that you need so and so codec to play so and so media and ask you if you really want it installed, but I find that particularly irritating. I like to already have that functionality there when I want to use it. To do that, I have a little script that I use that generally takes care of that for me, along with installing most of the programs I need to make my day to day use hassle free.

sudo wget -O /etc/apt/sources.list.d/medibuntu.list
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
sudo apt-get install mozilla-thunderbird php5-common php5-cli php-pear subversion openssh-server clusterssh imagemagick vim synergy smbfs curl vlc libdvdcss2 ubuntu-restricted-extras w32codecs mplayer mencoder build-essential sqlite dia expect mysql-client

Feel free to modify and use this, but basically I derived this from paying attention to the programs I need and use and making a list. It really does save a lot of time to do this.

The other thing I wanted to mention is Grub 2. For some reason, someone decided it was time to move from the original Grub to Grub 2. Time alone will tell whether that was a smart move or not. I know I certainly had a tough time of it for a day or two. Everything has moved and the methodology has changed as well. The short of it is you have some config files in /etc/grub.d that you can now manipulate, along with issuing a “update-grub”, that will build your /boot/grub/grub.cfg, which is pretty much the equivalent of the old /boot/grub/menu.lst file. The fun part is figuring out how all this works because, as it happens with open source many times, the documentation sucks.

What I needed to do was to add another linux distribution to grub so I could dual (or multi) boot it. This is accomplished in that /etc/grub.d directory. Now it’s worth mentioning here that if you do multiple OS installs on your machine and just issue a “update-grub” on your base Grub 2 enabled OS, it will (or at least mine did) auto detect this installation by default and add a boot option for it into the grub boot menu. The problem is, like mine, it probaly won’t boot your other OS.

The way to fix this is to go into /etc/grub.d and “chmod -x 30_os-prober”. After that you won’t be auto-genning entries. Next you can make a copy of the 40_custom file (I named mine 41_centos) and edit that file to have the correct boot parameters to boot your other OS. This is especially fun without having a good grasp of the correct syntax. For instance it took me hours to figure out that the “kernel” line that the old Grub used has been replaced with a “linux” line now. Other than that, though, just make sure that if you are booting another linux to use the correct root label and kernel and initrd image names and locations. My correct and working CentOS entry looks like this for reference:

exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the ‘exec tail’ line above.
menuentry “CentOS 5.4″ {
set root=(hd0,3)
linux /boot/vmlinuz-2.6.18-164.el5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-164.el5.img

Have fun!

Saved by Stuart

This is the final chapter in the saga of my broken Thinkpad T23.

Many of you know that I have been using my T23 for testing distributions lately, and before that for a headless server. The reason for that is that the machine has this flaky video problem where sometimes it works, sometimes it does not and other times it “sort of” works. As you can imagine, that is not very conducive to testing out desktop distributions. I certainly has been problematic lately.

I have been lamenting what to do with this especially this month as I have been trying to generate some content for the blog. How am I to do distro testing and such without a desktop machine to test on? The solution came the other day in an email from an old LUG member.

It seems that Stuart, a member of my old LUG, who’s mailing list I am still subscribed to, had a couple spare laptops he was offering up. He posted them to the list and I just happened to be watching my email when the post went through. I jumped at the chance to replace my old beater with something almost as old but fully functional. I arranged to go pick up my new(old) machine that very night.

For a measly $25 and 4 hours worth of drive time I picked up a nice little Thinkpad X31. It has 1.5gb of ram, 120gb hdd, internal wireless B and G and will make a great little laptop to do multitudes of testing on. It even came with Windows 7.

Now I didn’t keep Windows on the laptop, in fact it got a clean Linux install the second it hit my house, but on the way home, I did get a change to check out W7 a little bit. Honestly, I think XP was windows done in crayon and 7 is windows done in maybe sharpie or something. In my opinion, Windows 7 is trying very hard to be a rip-off of OS X, except they have this cartoonish interface. It’s not very professional looking (to me anyway) and I can tell you for sure that Linux on the same machine completely blows it out of the water. In two words, I found it cartoonish and clunky.

Just to tantalise you a little, since I brought the machine home I have attempted to install 5 concurrent distributions on it and actually put 2 of them on. I also learned a lot in the process about Grub 2, but all that is for a different post on a different day, so keep watching and reading!

It’s so easy!

I have heard, so many times now, that windows is simply just easier to use than Linux. Some people say it’s more intuitive. Well, today I had the pleasure of having to configure a network printer on my windows xp vm, and I call bullcrap.

Now let me put things in perspective a little bit. I have been using Linux almost exclusively for a very long time now and I do recall watching and using it through it’s growing pains when many things weren’t quite as easy as they should have been. We, however, have come a long way, baby.

Now I haven’t really extensively used windows in quite a while so I may be a little handicap for me, and it also might insinuate that I am partial to Linux’s way of doing things. You’d probably be right, but let’s just compare what needed to happen to get the very same printer configured on windows xp and on Ubuntu 8.04(lts).

Windows XP:
Start->Settings->Printers and Faxes->Add a Printer->Next->Local Printer. Now this is where it completely lost me. *I* was under the impression that I was trying to access a NETWORK printer. However, the local windows admin assured me that I had to choose “local”. You click next and let windows *fail* scanning for a local printer and then click next again and “Create a new port” (Whaa??). Pick standard TCP port->Next-Enter your printer’s IP address which will create a port name for you, then click next. Click finish and wait for windows to find your printer. Then you select your printer make and model from the dropdowns. The rest is a series of clicking “next” or “finish” until it finally prints a test page.

Ubuntu 8.04:
System->Administration->Printing->New Printer->Pick printer from scanned printers list->pick make (already highlighted)->pick model (already highlighted)->Look through additional hardware list (or just press forward)->pick a printer name and click apply. Yes, that’s it. Really. And, I am told it’s easier yet on the new Ubuntu (haven’t tried yet).

To be fair, I do remember when getting printing working on a Linux/Unix box was a complete nightmare, but my point is that *Linux* has advanced _considerably_. ‘Nuff said.

Linux to the rescue again

I have to keep a windows xp vm kicking around that I use almost never for those nagging few windows apps that the smart developers didn’t make at least a web version for. Well, I needed to to some modifications to a project on MS Project server (Firefox/Linux compatibility in next release BTW) so I fired up the xp vm to find that it was effectively out of disk space. Back when I built it 2+ yrs ago I only made it an 8gb vm and with all the little proprietary apps over the years is has just gotten full.

A quick google search on the subject showed that I could, indeed, increase the drive space in the vmdk with the “vmware-vdiskmanager” command (vmware serer 1 - I told you this vm was old). I simply went to my virtual machines directory (where the vmdk files are stored) and issued “vmware-vdiskmanager -x 12gb -t 1 winxp.vmdk”. This says (-x) extend the volume to 12gb and that the volume type (-t 1) is split into the 2gb files. The command did it’s job in just a few seconds and presented me with a warning that I would need a third party program in the virtual machine to expand the partition there to get use of the new volume free space.

I learned from my favorite windows admin that there is a diskmanager utility in xp that *can* do this, however, not on the system partition, which is what I needed. I just happened to have an Ubuntu 9.10 iso handy and told the xp vm to boot that up instead. From there I started up GParted and quickly told it to extend the size of the partition to fill all the remaining free space on the volume. I clicked on the green checkmark to tell GParted to “Go” and off it went. The entire resize for GParted took only maybe 10 seconds. It’s just amazing to me. I remember when Linux couldn’t even figure out what an NTFS partition and here I was fixing one in mere seconds.

Needless to say, only a minute later I had my windows xp vm booting up and working in it’s newly extended NTFS partition. Once again, Linux saved the day!

What’s on your bookshelf?

The Official Ubuntu Server Book

Ahh, these are the kinds of books I really dig. As a systems administrator, I love to get books that detail setting up servers and services and this is exactly what this covers for Ubuntu. Here you can learn about things from what bind is and how to get it working to kickstarting, raid and a plethora of other server topics. Great reference material here, especially for those people who are thinking they want to get a server set up at home. You just can’t go wrong with this one.

Pro Ubuntu Server Administration

If you were going to really really get into Ubuntu server administration you would want this book, probably to go along with the Official Ubuntu Server book. Like the title suggests, this book is intended for those people who are in up to their neck in serious admin tasks. This book covers things like getting Nagios running so you can monitor things better, server performance analysis, iSCSI, LDAP and even a smattering of VPN. It’s the stuff the big boys play with, and it’s a great reference and tool for those kind of tasks on Ubuntu servers. I try and make it a policy to pass a lot of my books along so they can also benefit other people, but this one stays put on my bookshelf. I am keeping it :-)

What’s on your bookshelf?

The Official Ubuntu Book

For Ubuntu users, this one is a real gem. This is your “soup to nuts” type good starter book for Ubuntu users. It is great reference material for everything from the history and idea behind the Ubuntu distribution to more advanced topics like using Ubuntu as a server and even touches on different offshoots of Ubuntu like Kubuntu and Edubuntu. What will really make a difference to a newer Ubuntu user (or just a new Linux user) is the sections of this book which give detailed instructions on how to use different available pieces of software to accomplish tasks like getting your email going, drawing pictures with Gimp, finding your files and so fourth. There is also a great section of the book dealing with common issues and troubleshooting problems like fixing an incorrect screen resolution.

A Practical Guide to Ubuntu Linux

As great an Ubuntu book as the last one is for the desktop Ubuntu user, this one is that and more of it! Even though this book is for a little older version of Ubuntu, the information in it is absolutely expansive. If you cannot find a reference in here on how to get a certain task accomplished, I would really be surprised :-) This book goes through the general information like setup and install like most books do, and then gives you HUNDREDS of examples of how to get things done with your Ubuntu install. It’s really a pretty great book, and the one that I am going to pass on to a new Ubuntu user friend of mine.

Throw some Rocks at it!

One of the parts of my day job is dealing with and managing our HPC cluster. This is an 8 node Rocks cluster that was installed maybe a week after I started. Now I was a bit green still at that point and failed to get a better grasp on some things at the time, like how to maintain and upgrade the thing, and I have recently been paying for that :-)

Apparently, the install we have doesn’t have a clear-cut way to do errata and bug fixes. It was an early version of the cluster software. Well, after some heated discussions with our Dell rep about this, I decided what I really needed to do was a bit of research to see what the deal really was and if I could get us upgraded to something a bit better and more current.

Along came my June 2009 issue of The Linux Journal which just happened to have a GREAT article in it about installing your very own Rocks Cluster (YAY!). Well, I hung on to that issue with the full intention of setting up a development/testing cluster when I had the chance. And that chance came just the other day.

Some of you probably don’t have a copy of the article, and I needed to do some things a bit different anyhow, so I am going to try and summarize here what I did to get my new dev cluster going.

Now what I needed is probably a little different that what most people will, so you will have to adjust things accordingly and I’ll try and mention the differences as I go along where I can. First off, I needed to run the cluster on RedHat proper and not CentOS, which is much easier to get going. I also am running my entire dev cluster virtually on an ESX box and most of you would be doing this with physical hardware.

To start things off I headed over to The Rocks CLuster website where I went to the download section and then to the page for Rocks 5.2 (Chimichanga) for Linux. At this point, those of you who do not need specifically RedHat should pick the appropriate version of the Jumbo DVD (either 32 or 64 bit). What I did was to grab the iso’s for the Kernel and Core Rolls. Those 2 cd images plus my dvd image for RHEL 5.4 are the equivalent to your one Jumbo DVD iso on the website that uses CentOS as the default Linux install.

Now at this point, you can follow the installation docs there (which are maybe *slightly* outdated(?), or just follow here as the install is pretty simple really. You will need a head node and one or more cluster nodes for your cluster. Your head node should have 2 interfaces and each cluster node 1 network interface. The idea here is that your head node will be the only node of your cluster that is directly accessible on your local area network and that head node will communicate on a separate private network with the cluster nodes. With 2 interfaces, plug your eth0 interface on all nodes, head and cluster into a separate switch and plug eth1 of your head node into your LAN. Turn on your head node and boot it up from the Jumbo DVD, or in the case of the RHEL people, from the Kernel cd.

The Rocks installer is really quite simple. Enter “build” at the welcome screen. Soon you will be at the configuration screen. There you will choose the “CD/DVD Based Rolls” selection where you can pick from your rolls and such. I chose everything except the Sun specific stuff (descriptions on which Rolls do what are in the download section). Since I was using RHEL instead of CentOS on the jumbo dvd, I had to push that “CD/DVD” button once per cd/dvd and select what I needed from each one.

Once the selections were made it asks you for information about the cluster. Only the FQDN and Cluster name are really necessary. After that you are given the chance to configure your public (lan) and private network settings, your root password, time zone and disk partitioning. My best advice here would be to go with default where possible although I did change my private network address settings and they worked perfectly. Letting the partitioner handle your disk partitioning is probably best too.

A quick note about disk space: If you are going to have a lot of disk space anywhere, it’s best on the head node as that space will be put in a partition that will be shared between compute nodes. Also, each node should have at least 30gb of hdd space to get the install done correctly. I tried with 16gb on one compute node and the install failed!

After all that (which really is not much at all), you just sit back and wait for your install to complete. After completion the install docs tell you to wait a few minutes for all the post install configs (behind the scenes I guess) to finish up before logging in.

Once you are at that point and logged into your head node, it is absolutely trivial to get a compute node running. First, from the command line on your head node, run “insert-ethers” and select “Compute”. Then, power on your compute node (do one at a time) and make sure it’s set to network boot (PXE). You will see the mac address and compute node name pop up on your insert-ethers screen and shortly thereafter your node will install itself from the head node, reboot and you’ll be rockin’ and rollin’!

Once your nodes are going, you can get to that shared drive space on /state/partition1. You can run commands on the hosts by doing “rocks run host uptime”, which would give you an uptime on all the hosts in the cluster. “rocks help” will help you out with more commands. You can ssh into any one of the nodes by simply doing “ssh compute-0-1″ or whichever node you want.

Now the only problem I have encountered so far is I had an issue with a compute node that didn’t want to install correctly (probably because I was impatient). I tried reinstalling it and it and somehow got a new nodename from insert-ethers. In order to delete my bad info in the node database that insert-ethers maintains I needed to do a “rocks remove host compute-0-1″ and then “rocks sync config” before I was able to make a new compute-0-1 node.

So now you and I have a functional cluster. What do you do with it? Well, you can do anything on there that requires the horsepower of multiple computers. Some things come to mind like graphics rendering and there are programs and instructions on the web on how to do those. I ran folding at home on mine. With a simple shell script I was able to setup and start folding at home on all my nodes. You could probably do most anything the same way. If any of you find something fantastic you like to run on your cluster, be sure to pass it along and let us know!

CentOS 5.4 The Real Deal

I promised that I would try the full install version of CentOS 5.4 desktop on my thinkpad and didn’t want to disappoint, so here it is…

I actually had a really hard time with this one. That is not to say that I believe that there is an issue somehow with CentOS, but certainly something odd with the lappy at the very least. For some reason, no matter how hard I tried, I could not get the installer to run correctly on the dvd. Or more correctly put, on any of several dvds. The installer would just randomly crap out in different places. Finally I just tried an old CentOS 5.3 dvd in an external dvd player, and that finally did the trick. Besides, it only takes one quick “yum -y update” from there and you’re at 5.4 anyhow.

Like the live version (or should that be the other way around) the full install of CentOS 5.4 is quite good looking and very snappy. It uses the gnome desktop and has all the goodies you would expect from a full blown enterprise desktop. It also carries, smartly, the software that I personally use in a day to day basis - firefox, thunderbird, openoffice, etc.

You know, I almost dislike reviewing this particular distribution because there is nothing particularly exciting about it other than it does what I like for a business desktop distribution and does it quite well. The same goes for the server install, both available from the same dvd, you get a true, reliable enterprise class Linux that “just works” ™ like it’s supposed to. I guess, that is the exciting part. You get a good Linux without having to tweak and mess with a bunch of things.

This sure isn’t a *home* desktop Linux. There’s no easy support for multimedia, so I wouldn’t go springing this on mom and dad, but for a business desktop, you just can’t go wrong here. And just FYI, there are plenty of good instructions on how to get your media on within a quick google search.

As unexciting as this sounds, I am still going to get a more permanent desktop install of this somewhere in my house. Just like I run some servers at home on CentOS, it sure couldn’t hurt to have a really stable and quick workstation somewhere within easy reach too!

« Previous PageNext Page »