Monday 8th September 2008

Installing Linux on the Iomega NAS 400.
December 4th 2005
I was lucky enough, a couple of months ago, to inheirit an Iomega NAS 400 (Network Attached Storage) box (with 4x 80 Gb disks) from a client that was shutting down its IT operation.The NAS 400 uses a special version of Windows 2000 Server, called "Powered by Windows". This is rather neat in a way, it's a box that you plug into your network offering SMB shared storage on a RAID5 device giving 240Gb of reliable storage.
Or rather, it would be reliable if it didn't break. Which it did.
One morning I found it stuck on a blue screen of death. Resetting it and rebooting didn't help, it came up with the old classic "Inaccessible Boot Device" line. The device has no CD-ROM. I don't have any rescue disks. No worries! it has a mirror rescue partition to reinstall the OS. Not a problem, I don't have any real data on it yet. I can reset it all and start again.
Oh dear. The rescue partition doesn't boot either.
I try all the usual tricks to get it working, and I can't. I have a Windows 2000 Server disk I could try to boot (somehow) and run the emergency repair on, but I have a feeling that will make things worse.
Then I remembered the day I picked up the NAS. Andy, who was in charge of dispersal of the kit asked me, with a big grin on his face, "are you going to put Linux on that?". "No", I replied, "for that would be very silly indeed."
Out comes the three Debian Sarge Boot Floppy disks and a USB Floppy drive. I couldn't figure out how to get the CD-ROM drive bootable, so I used the floppy install instead.
Boots fine. I start the install. Up comes the partitioner. Shows four IDE drives (good), the NAS doesn't have expensive hardware, it doesn't use hardware RAID, it's software RAID on standard Promise IDE controllers. So... It's all or nothing now. I wipe the partitions. and start figuring out how to set up Linux software raid...
Set it up. Start network install. Go and do something else.
It fails when trying to install Kernel.
Ok. Let's try again, this time with a USB mass storage device (a 128Mb compact flash card and USB2 adaptor).
Fails to read from the card. I continue again with the network install. Wait some more time.
It fails again when trying to install the Kernel.
Out comes the Debian Sarge Net Install CD. After trying all sorts of arcane BIOS settings I'm able to get a USB CD-ROM drive recognised and bootable.
"ISOLINUX 2.4"....
"Failed - Extremely Broken BIOS detected"
Ok.. I know the Fedora disk works better on some hardware. I grab Fedora and boot it.
"Failed - Extremely Broken BIOS detected"
Oh crap. So I now have a system with a BIOS that may well be alien to Linux, and I have erased everything on it that could possibly help me get it working again under Windows.
Looks at Iomega website for technial assistance. Basic summary of technical advice given about it from Iomega is "Our NAS complex beast. You can't fix it. Send it to us, we fix for you. Thanks". Having no warranty and hard disks formatted as Linux ext3 doesn't put me in a strong position with Iomega. I'm going to have to solve this myself.
I start thinking about what other machines I could use those 80Gb disks in. I am close to giving up. But I don't like being defeated. I think what else could I do...
A few days later I try again. But this time I don't set up the Linux RAID as the / partition, I set up one of the spare 2Gb empty spaces I have on the disks as /, and set up the Linux RAID as /raid.
Install starts again... Wait more time... SUCCESS! I have installed Debian Sarge.
Reboot. Set up everything, and log in to my new Linux-based Iomega NAS.
Seems ok. Can't see the raid partition. that's not a problem, I'll set it up again. I do an apt-get update and start to see what packages I need to insta...... and then it resets.
What happened? Hmmm. Ok, I boot up again. Log in... and after a couple of minutes it resets again...
And again....
Now, it's time to call in some help.
Yesterday Jon came to visit. Friends of Mysterious Ways will remember Jon. He worked with us until 2003. Jon introduced me to Linux. Before Jon, I ran Windows, I was Microsoft Certified. I lived the Corporate IT Lifestyle. Jon messed all that up for me. And now he was going to help me again.
I explained the problem to Jon, showed him what was happening. He came up with the helpful suggestion - "Do you have any other boxes that could do with 4 x 80Gb hard disks?".
"Maybe it's the Kernel", I say randomly. Hoping something will get Jon to actaully try to fix it.
"Could be!" he replies, "Open up the lid and let's see what's inside".
I clear the USB CD-ROM drive and other junk off the top of the box, and we open it up. We see the Promise IDE controllers, the Ultra 160 SCSI card, the two Broadcom 1Gb Network card chips, Pentium 4, and several noisy fans. We put it all back toether.
I boot it up and let Jon try to reinstall the kernel. I warn him it's going to be fun trying to do something in 2 minutes. Even copying a kernel compiled on another box isn't going to be fun to do in that time.
But while Jon's using it, it doesn't crash. In fact, we manage to download the 2.6 Kernel and everything we need to compile it - and it still hasn't crashed! What's going on? The only explanations we can come up with are either the stuff resting on top of the case was upsetting it, or we reseated the UltraSCSI card and that stopped it resetting.
Happy days! Now if only the raid was working.. .Oh, and the swap partition which doesn't seem to work either.
We investigate. And find something a little disturbing and odd. Under Linux, the device names for the four drives on the Promise IDE controller(s) are: hde, hdg, hdi and hdk
I had set up the first 80Gb on each drive as software raid. I had set up the 2.3Gb spare on the hde drive as / and the 2.3Gb spare on the fourth drive (hdk) as swap.
But full Linux (as opposed to the installer) wasn't seeing the last two drives. It's as if there is a hard coded limit to the number of ATA devices, and hdg was the limit.
Before we reinstall the kernel, we try to put Lilo on instead of Grub as our boot loader. That goes horribly wrong because of the drive problem, and on restarting we're left with no active partition and an unbootable device. So near and yet so far.
At this point Jon has a brain wave... We take the first IDE drive out of its caddy, attach it to a USB cradle, and Jon links it to his laptop. Eventually, using this trick, Jon is able to reactivate the partition and install Lilo.
We put it back into the machine and we can boot into Linux again!
Now... we've left the 2.6 kernel compiling and gone home. On monday I'll try using our 2.6 kernel to see if we can get all four drives recognised. I'll upate this page after that!
December 5th 2005
The 2.6 kernel seems to work better - we have all four drives recognised. But at the moment, no network!
Once I get it all running I'll post the 2.6 kernel configuration here for others who might need it.
December 6th 2005
Finally yesterday got everying, including networking, working correctly!
Tel: 020 8680 1668 All Rights Reserved. Site Map. Copyright © 2000-2008 Mysterious Ways.
