HomeHome ArchiveArchive

Installing Debian Sarge on a IBM HS20 Blade

Installing Debian Sarge Linux on a IBM HS20 Blade (HOWTO)

  1. Start the management interface on your local machine
  2. Open a console for the remote Blade
  3. Attach the local CDROM drive to the remote destination Blade
  4. Boot the remote Blade from the local CDROM
  5. Press <F1>(Using the console’s F1 button) in order to get into the install disk menu
  6. By using the respective function key jump into the menu with the special boot characters
  7. Choose and enter the command line that disables framebuffer (with framebuffer display, which is on by default you won’t see anything in the console)
  8. You will possibly need to switch around the console’s keyboard settings in order to be able to enter the “special” characters “/” and “=” (the console wouldn’t map the local swissgerman keyboard correctly. I had to use the US, the Italian and the German keyboard settings in order to be able to enter all the charcters I needed throughout the installation process)
  9. Now proceed with the installation which will quite soon fail, because the installer won’t find the CDROM drive, because it’s internally attached over USB
  10. Change into the next terminal with Alt-F2 and issue a modprobe usb-uhci which will load the required USB drivers. You should see this when you issue a dmesg to display the kernel messages
  11. Issue a hw-detect to make the Debian installer rescan the HW and this time detect the CDROM which is connected via the USB-storage and the SCSI-over-USB drivers
  12. Press Alt-F1 (click on the Alt and F1 buttons of the console) to return to the installer
  13. Press “OK” to let the installer search for the CDROM drive once more which it should find and you should be able to continue the install process
  14. At the machine where this procedure was tested, the two Broadcom BCM 5703 Tiga NetXtreme gigabit ethernet cards on the Blade were in trunking mode and thus Linux’ tg3.o driver wouldn’t be able to access the net out of the box. The connection to the switch had to be changed to “normal” mode in order for the driver to be able to communicate
  15. Now before you restart, be aware that currently the first SCSI disk /dev/sca1 for Linux is the SCSI over USB CDROM drive and the local hard disk on the local SCSI controller at /dev/scb1. But as soon as you’ll restart, the USB driver will not yet be installed and instead the local SCSI contoller will be at /dev/sca1
  16. Thus when you restart, as soon as you get into GRUB’s boot loader menu change the boot device from boot=/dev/scb1 to boot=/dev/sca1
  17. That’s it. Let me know if this HOWTO has helped you.

Remarks:

  1. We used the 2.4 kernel (==2.4.27-2-386)

Ruby 1.8.2 Debian Woody Packages

This are backports of Ruby 1.8.2 for Debian woody. They are the build from Akira Yamada’s unstable Debian 1.8.2-2 ruby package. In order to build them I had to use a few backports and apply a few dirty hacks - see the changelog.

Use our packages at your own risk - remember it was a “quick” hack - but please do report back to us us any bugs you’ll find.

Enjoy! Tomas Pospisek

Download

apm and usb-storage

When suspending and resuming my laptop all the processes that were accessing an external USB harddisk would freeze.

The problem seems to lie in the combination between USB and SCSI, which do not seem to be stateless, that means that when the laptop goes silent and alive again the whole USB stack gets mixed up. I don’t know whether the problem lies within the kernel’s drivers or within the USB/SCSI protocols themselves - I’ve tried the 2.4.27 and the 2.6.9 kernels without success.

I’ve also tried umount -a but that won’t help since processes, that access the filesystem will still freeze inside the kernel with state “D” with no way to kill them. IMHO a clean solution would be to have the whole stack supporting suspending and resuming well or, if the USB/SCSI protocolls don’t allow this, modify Linux fs semantics to that unmounting a fileystem which is being accessed (filehandles or cwds) will work and will cause any access to the filesystem to simply fail, thus allowing applications that access the filesystem to fail gently i.e. do something about the failure (this is being discussed here)

Finally I’ve implemented a work-around. What I do now is, instead of suspending directly with apm -s to first try to unmount the external harddisk, remove all usb-storage related modules and suspend only after that. Maybe not everything is needed, maybe there’s a better solution, comments are wellcome.

The script below assumes that your external HD is mounted under /mnt/maxtor and that you are using the usb-ohci, so adapt as needed.

Enjoy! Tomas Pospisek

$ cat /usr/local/bin/remove_maxtor
#!/bin/sh
#
# remove the external USB drive
#
# v0.1 2005-01-20   Tomas Pospisek
#
# released into the public domain
#

unmount () {
  if mount|grep "on $1" >/dev/null; then
    if ! umount $1; then
      return 1
    fi
  fi
  return 0
}

rmmodule () {
  if lsmod|grep "^$1\b" >/dev/null; then
    if ! rmmod $1; then
      return 1
    fi
  fi
  return 0;
}

if 
  unmount /mnt/maxtor && 
  rmmodule sd_mod && 
  rmmodule usb-storage && 
  rmmodule scsi_mod && 
  rmmodule usb-ohci && 
  rmmodule printer && 
  unmount /proc/bus/usb && 
  rmmodule usbcore;
then 
  echo "successfully removed maxtor"
  exit 0
fi
echo "failed to remove maxtor"
exit 1

#!/bin/sh
#
# put the laptop to sleep
#
# unfortunately we can't put this into
# /etc/apm/suspend.d/ since apm will
# automatically suspend after a certain
# time if called with "apm -s" even if
# the script has not terminated yet
#
# v0.1 2005-01-20   Tomas Pospisek
#
# released into the public domain
#

while ! /usr/local/bin/remove_maxtor; do
  echo "can't remove maxtor"
  sleep 1
done
apm -s

UMN Mapserver contributions

SDE Raster support

These enhancements to Mapserver 4.2.0 add support for SDE raster layers. A function msSDELayerQueryByAttributes for fast queries on SDE layers is also included. Usage:

  CONNECTIONTYPE sde
  CONNECTION "mapserver.gis.gr.ch,port:5151,'',username,password"
  TYPE raster
  DATA "KONTEXT.LANDESKARTE_50_KOMBINIERT.IMAGE,SHAPE"

The connection has the following arguments: server,instance,database,username,password The work was kindly sponsored by the GIS-Kompetenzzentrum of Graubünden, Switzerland.

SDE Query speedup

This patch against Mapserver 4.2 activates the call of msSDELayerQueryByAttributes.

--- ms-4.2.3.orig/mapquery.c    2004-09-29 09:47:26.000000000 +0200
+++ ./mapquery.c        2004-09-29 09:27:37.000000000 +0200
@@ -292,7 +292,11 @@
   else
     lp->project = MS_FALSE;
 #endif
-  status = msLayerWhichShapes(lp, searchrect);
+  if (lp->connectiontype == MS_SDE) {
+    status = msSDELayerQueryByAttributes(lp);
+  } else {
+    status = msLayerWhichShapes(lp, searchrect);
+  }
   if(status == MS_DONE) { // no overlap
     msLayerClose(lp);
      msSetError(MS_NOTFOUND, "No matching record(s) found, layer and area of interest do not overlap.", "

Ruby MapScript for Mapserver 4.0

Ruby MapScript is included in the current Mapserver version. Ruby MapScript is a Ruby interface to the UMN Mapserver library. The compiled version is also integrated in the binaries of MapDesk. Download the source package. In order to compile you will need:

  • Sources of UMN MapServer (version >= 4.0)
  • Ruby (version >= 1.6)
  • Optional: Swig (version >= 1.3a5)