Monday, August 20, 2012

Debian Squeeze Installation on HP Gen8 Servers

Update: Thanks to an anonymous commenter I can confirm that with the release of Debian Squeeze 6.0.7, released 2013-02-27, the Debian Installer package uses a back ported version of hpsa to detect controllers not supported by cciss.  The remainder of this post is left for historical reference.

TL;DR Build the hpsa Driver From Source and Deploy in D-I

Symptom:
Can't Detect CD-ROM and/or RAID Disks on HP Gen8 Hardware

My team was attempting to install Debian GNU/Linux 6.0.5 (squeeze) on a brand new HP DL360 Gen8 server with a P420 RAID controller and much to our chagrin it couldn't even detect the CD-ROM drive let alone the RAID sets.

Solution:
Build hpsa.ko From Source

Point your favorite browser over here and grab the 3.0.0-8 (or newer YMMV) release and make sure you have bzip2 installed with ye olde apt-get install bzip2.  You'll need that for the next step.  I've assumed you downloaded the driver into the ~/Downloads directory.

I prepare the directory:
 $ mkdir ~/src
 $ cd ~/src
 $ tar -xjf ~/Downloads/hpsa-3.0.0-8.tar.bz2
 $ cd hpsa/drivers/scsi

To build the hpsa driver you need to edit the hpsa_kernel_compat.h file and remove the comment block corresponding to the OS you wish to build the driver for.  There's just one little problem; there's no block for Debian GNU/Linux.  Fear NOT!  The kernel that ships with Debian 6 is a 2.6.32 kernel.  This is the same basic kernel as shipped with SUSE Linux Enterprise Server 11 SP1.  So just uncomment the following line:
 #define SLES11sp1

If you've got gcc installed and the linux-headers package you can just save the hpsa_kernel_compat.h file and type make.  This will build the hpsa.ko file that you so desperately need.  Now copy that file onto some removable media and go attach it to your Gen8 server.

Installing hpsa.ko During Installation

Now go ahead and boot any of the Debian 6 installation media(netinst.iso, businesscard.iso, cd1.iso or dvd1.iso).  Once d-i is loaded you will be greeted by the message that the CD-ROM device couldn't be detected.  This is where the new driver comes into play.

Switch over to the second console with ALT+F2, press enter and now insert your removable media if you haven't already.  I'm going to use the device name of usbdevice in place of the likely /dev/sda1 or /dev/sdb1 that your removable disk will be recognized as.

Perform the following incantation:

 $ mkdir /mnt/usb
 $ mount /dev/usbdevice /mnt/usb
 $ cp /mnt/usb/hpsa.ko /lib/modules/$(uname -r)/kernel/drivers/scsi
 $ depmod -a
 $ modprobe hpsa

To confirm you see the disks, simply use the dmesg command.  You should now have access to all the devices connected to your HP Gen8 server.  This has only been tested with the P420 controller.  It's possible that your Gen8 may have a different controller.  If so these instructions are worth a shot if you need to access the controller using the hpsa driver.


Switch back over to the d-i terminal, ALT+F1, and detect the CD-ROM drive again.  If all went well you can begin installing Debian GNU/Linux 6.0.X (squeeze) on your shiny new server.

Happy Hacking!

Wednesday, August 1, 2012

Up to Some Good: 3D Printing FTW!

In the Beginning:

In November of 2010 a bag of parts showed up on the door step. These parts were printed for Free Geek Arkansas and came with a challenge attached. Build a RepRap Prusa Mendel. For our group of hackers and builders this was a welcome surprise and quite the call to arms.

It took us a long time to come to grips with the design and source a lot of the materials needed. We recruited members of the Free Geek community to assist in the building of the machine and bode our time until we had all the components in order.

Learning To Build

For someone not very mechanically inclined like myself it was rather intimidating getting just a bag of printed parts in the mail. While I've studied this technology for a long time (over 10 years of wishing) I was not in a position to envision the finished product from what came in the mail.

I learned quickly that pictures and video helped me very little in this endeavor. Most likely due to my lack of mechanical skills (which are much better now). I had no basis for reasoning about how things fit together and why they are put together in this way. Luckily the RepRap community is quite good at helping newbies get a handle on their machines. Unfortunately this comes with a barrier of language that can be cumbersome to deal with. In the end even newbie builders can interface with the community and get help.

You can find me(most work days) and many others on #reprap on irc.freenode.net for ideas/suggestions and general help getting your machine off the ground. You can also ask for parts there and get pointers to better techniques than you might find on the wiki(this is being addressed as I type). Really and truely the best help you can get is from people in your community. Find a hacker space or a Free Geek and reach out if you're interested in this technology. Our build time lag is not the same as others. We have had time commitment issues, parts issues and monetary issues. The economy hasn't been particularly kind to any of us in the last several years and complicated the building of this machine.

Take Your Vitamins and Buy Them!

Working on the RepRap has been a journey full of surprises. Did you know it's better to tear down ten HP LaserJet 4p machines than to buy smooth rod? In the end we still had to buy some 8mm smooth rod from China, but only the longest rods needed for the machine. Thanks to the recycling efforts of Free Geek Arkansas and its regular volunteer staff we were able to build this machine out of almost entirely recycled parts.

We were able to buy the required threaded rods at the local Lowe's and these should be available for cheap at any local hardware stores. Avoid Fastenal if you can. If money is no object then by all means use them. I have nothing against Fastenal, however parts from them are rather expensive and it appears this is mostly due to the downfall of steel manufacturing in the United States. We only export scrap metal now and import MOST steel products used here now. This makes things cost more if you want anything approaching local sourcing of materials.

For motors, you can find them everywhere.

OMFG! There's More, But the Printer is Gone!

This post was supposed to encompass much more than getting the parts.  I wanted to add more notes on the adventures of getting the printer up and running and little tweaks that have been done to the printer to customize it to Free Geek Arkansas' needs. Long story short, we got the printer working really really well.  It has been demoed during summer outdoors in Fayetteville, Arkansas (90+ degrees F) and got a great reception from the community at large.

The unfortunate thing is the printer was stolen by a (possibly) disgruntled ex-volunteer.  This has left me and the rest of the 3D printing gang slack jawed.  We are completely gob smacked and printer #2 is in the works.  I'll likely publish a follow up to this post detailing what it looks like the second time around.

I apologize if the post jumps from explanatory to a screeching halt in 0.1 seconds.  Look forward to the next installment where we cover implementation issues and customizations that we think are must haves for RepRap Prusa Mendels that need to work long hours.