Making RHEL 3 See Multiple LUNS

For some reason RHEL 3 comes out of the box configured to see only the first Lun on a SCSI channel. This is usually not a problem, as the first Lun is all you care about, but in some instances, you will need to configure the SCSI module to see multiple Luns.

In this case we are using an Adaptec DuraStor 6200S, which is set up to present the RAID controller as Lun 00, and the actual RAID array as Lun 01. Without any modifications to the system, we plug in in, and after a reboot check /proc/scsi/scsi. We can see the RAID controller, but since we can only see the first Lun on the channel, we never get to the array:

Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: Adaptec Model: DuraStor 6200S Rev: V100
Type: Processor ANSI SCSI revision: 03

The actual array would show up as “Channel: 00 Id: 00 Lun: 01″, but it’s not there. To resolve this, we have to first edit “/etc/modules.conf” and add the following line:

options scsi_mod max_scsi_luns=128 scsi_allow_ghost_devices=1

In our case, modules.conf looks like this after the modification:

alias eth0 e1000
alias eth1 e1000
alias scsi_hostadapter megaraid2
alias usb-controller usb-uhci
alias usb-controller1 ehci-hcd
alias scsi_hostadapter1 aic7xxx
options scsi_mod max_scsi_luns=128 scsi_allow_ghost_devices=1

Next we have to build a new initrd image. This is done with the “mkinitrd” command.

WARNING: MAKE DARN SURE you build this against the right kernel (the kernel you want to use). If you are going to replace your current initrd image with the new one, you should make a back-up copy first. The -f option will force or overwrite the current initrd image file.

cp /boot/initrd-2.4.21-47.ELsmp.img /boot/initrd-2.4.21-47.ELsmp.img.bak
mkinitrd -f -v /boot/initrd-2.4.21-47.ELsmp.img 2.4.21-47.ELsmp

Once this is done, you can reboot your machine, and check “/proc/scsi/scsi” to see confirm that it sees the second Lun. You should see something like this:

Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: Adaptec Model: DuraStor 6200S Rev: V100
Type: Processor ANSI SCSI revision: 03

Host: scsi2 Channel: 00 Id: 00 Lun: 01
Vendor: Adaptec Model: DuraStor 6200S Rev: V100
Type: Direct-Access ANSI SCSI revision: 03

Hat Tip: Alan Baker for help figuring this out.
UPDATE: RHEL 4 doest not have this problem.

World’s Angriest Woman


Crazy Lady Yelling at Skaters from Cliff Pearson on Vimeo.

There are a lot of angry people in the world, but I’m pretty sure that the lady in this video ranks pretty near the top by any measure. It’s a movie of a woman in a parking lot screaming at a group of skaters for no apparent reason. Or at least no apparent reason that makes sense to any sane person.

Exactly why she is so angry is unclear, however it would seem that she is convinced that the kids are not the innocent skaters they claim to be, but rather evil photographers who come around “every couple of years” and are out to get her. She nearly blows out her vocal cords as she threatens to call 911 and demands their names, cameras, film, and calling cards.

Again, it’s hard to say why she is so furious, but it is quite clear that she:

  • REALLY REALLY hates photographers
  • REALLY likes calling cards
  • Has absolutely NO understanding of the law
  • Hates “illegal photographs”
  • Likes the name “Norma kay”
  • Is “tired of being beat up by photographers”
  • Is OK with the idea that one of the skaters is actually named Jeffery Jefferys
  • Is convinced that having been yelled at is a good reason for someone to leave

The only thing Al could say is: “she’s so unreasonable”, which I think is the understatement of the year! Zach suggests that this story should be called “Finally Someone More Angry Than Me”. For my part, all I could do was cry laughing. I do, however think that this video belongs in Zach’s “World’s Big and Tall” series under “World’s Angriest Woman”.

Recovering From a Stuck Symantec Ghost Virtual Boot Partition

It seems that when you manage a bunch of machines with Symantec Ghost, you always end up with one or two that, for whatever reason, get stuck in the Ghost Virtual Boot Partition, and can’t boot back into windows. This can be really frustrating because you usually know what went wrong, and need to get back into Windows to fix the problem.

The good news is that setting the machine is really easy once you know how. I went through years of booting into DOS, and running fdisk from a floppy whenever this happened to me before I realized that fixing it is just a simple command that exists on the Ghost Virtual Partition.

Here is how it is done:

  • Stop Ghost and go to a DOS prompt:
  • If running the Ghost DOS client, NGctdos.exe, type Ctrl+X
  • If running the Ghost executable, Ghost.exe, type Ctrl+C
  • Change to the Ghost directory.
  • Type cd Ghost
  • Type ngctdos -hide


This last command hides the Ghost Boot Partition, makes the Windows partition active, and restarts the computer. You can then move on to fix the problem with minimal fuss, and get on with distributing the virus known as “Windows”.

Joining Samba Domains with Symantec Ghost

Because Symantec Ghost expects that everyone is going to use a “real” Active Directory Domain Controller, it fails when trying to automatically join samba domains, and I’ve always had to visit each machine after imaging it to manually join the newly imaged system to our domain. Needless to say, this is annoying when you manage over 300 systems.

Luckily, Alan Baker (who does not have a blog for me to link to) has managed to come up with a solution… For this, he is my hero of the month!
Here is how you do it… The trick is to create a post image command in your Ghost task that calls a little application called netdom.exe. You can add this file to your image and call it locally if you wish, or you can put it on a server and execute it using a UNC.

  • Download netdom.exe by clicking here. It is included in the Windows Support Tools package.
  • Modify your Ghost Distribute Task, click on the “Execute Command” Tab and add the following command, modifying it for your environment:

C:\Path\To\netdom.exe JOIN %computername% /Domain:Your_Domain /UserD:YourDomainAdmin /PasswordD:YourDomainAdminPassword /UserO:LocalMachineAdministrator /PasswordO:LocalMachineAdministratorPassword /REBoot


  • If you will be calling netdom.exe using a UNC, the command will look something like this:

\servername\sharename\netdom.exe JOIN %computername% /Domain:Your_Domain /UserD:YourDomainAdmin /PasswordD:YourDomainAdminPassword /UserO:LocalMachineAdministrator /PasswordO:LocalMachineAdministratorPassword /REBoot

This should save you a lot of time…. I know it has for Alan and I! Again, Thanks to Alan Baker for figuring this out, and sharing the info with me.