Wednesday, May 20, 2009

IronPython programming can be harder than it looks!

After playing around with IronPython for a few months, I definitely like how easy it is to manipulate objects. Everything is truly open, and if you want to attach one object to another or pass a function around as a variable then "it just works". I have mainly been using IronPython for fun, but right now I would be a bit scared to use such a fluid language for a structured large scale production application: The lack of static typing and compile time checks would make we wary of using IronPython for "real code" instead of just scripting. I stumbled on a video of Giles Thomas on Channel 9 (posted in March 2008 but mystically appeared in my RSS reader this afternoon) and it sounds like Resolver Systems had similar concerns but combined IronPython with Test Driven Development to build a solid foundation for Resolver One. That way they get plenty of up front testing and don't need to second guess the dynamic nature of programming in python. Seems to have worked well so far, as Resolver One is a rock solid product from my experience.

Usually when somebody says that "it just works", the phrase comes with an asterisk and a long line of small text at the bottom of the page. In my experience with IronPython this is still the case, as there are a few things that are much harder to do than they should be. Michael Foord, another Resolver Systems developer, co-wrote the book on IronPython, and today wrote an article about a case when IronPython code ends up being a bit tricky. If you ever need to get the docstrings from an arbitrary IronPython object, or just want to see a detailed explanation of some of the inner workings of python, the Techie Blog is a great read!

Friday, May 8, 2009

Installing Windows 7 on ASUS-P6T with IHC10R RAID Array

I recently purchased a new computer, and I decided to go with the following components:

Motherboard: ASUS P6T LGA 1366 Intel X58 ATX

CPU: INTEL Core i7 920 2.66G quad core with Hyper Threading (4 cores, 8 threads)

RAM: 3x2GB DDR3 1600

Hard Drive: 2x250GB Seagate Barracuda 7200.10 ST3250310AS setup as RAID 1 Mirror

Video Card: MSI N9400GT-MD512H 9400GT RTL with passive cooling design

Case: APEVIA X-ALIEN MX-ALIEN-BK Black Steel ATX Full Tower

The build went fine, but I got stuck trying to install Windows 7 64Bit RC, as I could not get it to load the drivers for either the JMicron JMB363 or Intel ICH10R SATA controllers. The SATA Port 0 and 1 are controlled by the JMicron JMB363 controller, which can be setup as a special Speed or Backup mode using Intel Drive Xpert technology. I couldn't find any information about what these actually were (I assume Raid 0 and Raid 1, but not sure), so I decided to try and setup the drives on the ICH10R controller as a standard RAID 1 array instead. After updating the bios using the built in ASUS EZ Flash 2 feature (very cool!), I setup the ICH10R controller in RAID mode in the BIOS, disabled the quick boot and the Floppy drive (was causing Windows 7 setup to be incredibly slow trying to loading drivers from a floppy drive that didn't exist), and pressed CTRL+i to setup the drives in mirror mode.

Windows 7 setup still couldn't detect any of the drives. The motherboard came with a driver disk, but I couldn't get any of the SATA drivers for Intel or JMicron on it to work. Even after breaking the raid and installing one drive on each controller, and changing from RAID to AHCI, it still couldn't find them. I tried downloading 3 different versions of the ICH10R driver, even the ones that said they were Windows 7 compatible. I final found a driver that worked for the JMicron controller on the motherboard driver disk tucked away in an install directory in an AMD64 directory. This wasn't what I wanted, but at least I was able to get Windows installed. It took a long time and I thought that it stalled on the "Completing Installation" section, but after an hour or so it changed to a message saying that the installation will continue after rebooting (which I force to reboot after 10 minutes of waiting). Looks like they still haven't fixed any of the useless notifications during windows 7 installation.

After Windows loaded up, I downloaded and installed the latest drivers and ran Windows update, which updated the drivers again. A few reboots, and everything looks great, although it still is running off of the JMicron controller and is not in RAID 1 like I wanted. I switched the drives over to the ICH10R controller, but then it wouldn't load into windows. I was about to cry, but then I noticed that there were two drives listed in the boot sequence, and one of them was still a blank drive. I switched the order of the drives so that the one with Windows was on the lowest SATA port, and then after rebooting it loaded into Windows again (crisis adverted!). Now the drives were on the correct controller, which was still setup in RAID mode in the bios. Unfortunately you can't create a RAID array in the boot loader from an existing disk without loosing all of the data, but by downloading and installing the Intel Matrix Storage Console I was able to convert an existing disk to a RAID 1 array. The process failed the first time, but I rebooted, tried again, and after 2 hours (SATA 3.0GB/sec my ass....) I had everything working just how I wanted.

A bit of a pain, but at least I got it to work. It might be that there is a special driver for the ICH10R SATA RAID mode that is hidden somewhere, but I couldn't find anything that worked. Best bet if you are installing Windows 7 64-bit on ASUS-P6T is to connect a drive to Port 0 or 1 and load the JMicron drivers from the install/AMD64 directory. You can then move over to the Intel controller after updating all the drivers in Windows and build whatever type of RAID array you want using the Intel Matrix Storage Console.

Update 10/1/2009: More issues with JMicron controller and IDE drive.

Blog.TheG2.Net - Your guide to life in the Internet age.