Aaron's blog

How to to setup a server the easy way

By aaron.axvig, Tue, 08/21/2007 - 03:00

Well here we go; I'm going to detail the unpleasant experience of setting up our new server as best as I can remember it.

Problem 1:  Floppy disk with drivers needed for RAID functionality.  We actually had a floppy drive, and even a computer to connect it to, but no floppy disks could be found.  So we drove a couple miles to someone's house and found one floppy--and old Intel motherboard driver disk.  We fired up the ancient computer there, put the disk in, put the CD-ROM from Asus in the optical drive...and got stuck.  It wouldn't read the disk.  Closer examination revealed that it was actually a DVD disk, which the 5+ year old computer couldn't read.  We took the floppy home and made the disk there.

Problem 2:  Getting the computer to boot correctly.  Having not dealt with a floppy drive for several years, we were both unfamiliar with the cause of those cryptic "failure to find boot disk" messages, which were very vexing.  We initially blamed it on the RAID and how that fit into the boot order.

Problem 3:  Not having disk 2.  Server 2003 64-bit comes on two CDs.  We had 2 MSDN-iso burned disks, one labeled disk 1 and one labeled disk 2.  The second one was most certainly not disk 2.  Off to MSDN to download...and in the meantime we went ahead and installed updates and Service Pack 2.

Problem 4:  We ran disk 2, only to get a warning that Service Pack 2 had already been installed.  We proceeded on anyways.  Around this time we started getting random lockups.  Then a message popped up detailing that the RAID had entered a degraded state.  After messing around in the RAID software for a couple minutes, we decided that one of the drives was bad, and that we would have to reinstall on a RAID composed of the three remaining disks.

Problem 5:  Windows installed again, everything updated, RAID fails again.  So this time I backed up an image of everything we had setup to another computer, re-installed Windows on one of the SATA HDDs (not in a RAID) and restored from the backup.  This seemed to work alright, until we started to have a LOT of problems installing Exchange Server 2007.

So we re-installed again (fourth time if you're counting).  By now I figured that something was up and these disks weren't actually failing.  But we were also sick of the RAID idea so just installed Windows on a spare IDE HDD we had laying around.  In the meantime, we figured out that the disks probably hadn't been given adequate time to rebuild (although I'm still not sure why a new RAID with empty disks needs to be built).

This is the install we are currently running on, and it's working quite well.  After the RAID was given time to build (I went into the BIOS RAID control panel and told it to rebuild) it has been running fine.  We had quite a lot of trouble again with Exchange Server 2007, but that is another story altogether...

New axvius.com server

By aaron.axvig, Sun, 08/19/2007 - 03:00

Yep, we finally did it.  After inching along for two years on 1.0 GHz servers (one or two or three as we saw fit at the time) we have finally invested in some big iron.  $800 got us the following:

  • 2x 1GB DDR2 667MHz RAM
  • 4x 500GB Seagate 7200.10 HDDs
  • 400-watt Rosewill PSU
  • 4U Rackmount Case
  • 2.2GHz AMD Athlon 64 X2 ProcessorAsus M2N-E Motherboard

I managed to get the HDDs for $100 through some sort of error on Tigerdirect's website I think.  They had ones with 16MB cache listed there for $120 (and the same price was at Newegg), but 8MB ones for $100.  I didn't really care that much about that so I ordered them.  Then I read online that those drives aren't available with 16MB cache so I clicked on the link in the shipping confirmation e-mail they had given me and that lead me to a non-existant page.  Then 16MB cache drives showed up at the door, which made me happy.  But the HDDs still made up 1/2 of the total price.

Buying the RAM second-hand from my boss in Medora also helped stay under budget as I got it for $60.  The power supply was pretty cheap ($35) and I have some doubts about it (it's not very heavy) but it had lots of good reviews on Newegg.

I got that motherboard because it's an Asus and it has 6 SATA ports with RAID 5 support.  So the HDDs are in a RAID 5 with an end total capacity in Windows of 1.36TB.  Unfortunately due to some initial issues installing Windows I ended up not putting the OS in the 60GB partition on the RAID that I had planned.  I threw in an old 160GB drive for that, and we are now using the RAID solely for file storage.

I also threw in one out-of-budget expenditure: an 8-port gigabit switch which I picked up for ~$60.

Tomorrow I will detail all the headaches that we had installing everything.


ASP.NET/SQL Server key manager application

By aaron.axvig, Fri, 04/27/2007 - 03:00

This is a project I worked on mostly a few months ago: an application to keep track of license keys and which computers certain keys have been activated on.  It is primarily designed for internal use by an organization.  Being quite simple, it does not have a lot of features, but this also makes it easy to use I hope.  Here is a screenshot of the main page:


And then there are a couple of different screens for adding items; here is one of them:


You can view details of a key, software, computer, or installation:


Lastly, there are a few different list views for various things, like all the keys that you have for a certain software package:


A few caveats regarding the quality of the application:

  • There is no protection against dumbness.
  • No limits on data input, and database fields are varchar(max).
  • Should be relatively save against SQL injection attacks, as all data is passed as parameters to stored procedures.
  • No foreign key checking.  So if you delete a software from the database that still has keys that refer to it, bad things may happen.
  • Delete is permanent.  Be careful.
  • I'm quite sure something will be discovered to be broken for this first release.  So there is room for improvement.

Now some positives:

  • Activation is not permanent.  If you change something to not be activated, it will update the software's activation totals.  So you could use this field to track how many computers the key is used on if you really wanted to.
  • In fact nothing is permanent.  You can all of the data you have entered as you need to.
  • Clean design.
  • Database is simple if you really need to go in and edit something by hand.
  • Released under GNU General Public License.

You can get the application here.  You should have a machine with ASP (probably 2.0 is required) installed, and SQL Server (tested on SQL Server 2005).  Unzip the precompiled files into a web directory.  One file is called procedures.sql, and you must run the text of this in a SQL Server Management Studio window in order to create the 4 tables and 27 stored procedures.  Delete or move it when you are done.  Then you must modify the connection string in the web.config file to allow for a connection to your SQL Server.  While in the web.config file you can change the text that appears as the main logo (doubling as the home button) of each page.

To keep everyone on the Internet from viewing your keys, you should implement some security.  I do this by disallowing anonymous access in IIS and requiring Integrated Windows Authentication.  Then any domain users that have NTFS permissions to the files in that directory can view the keys.  Users only need read access to the directory.  In my testing the page could not be shown unless the viewer was authenticated as something, but I wouldn't rely on that keeping everyone out (I think it was the web.config authorization setting that was doing this).  Much better to set those NTFS permissions.

The lack of complete automation and difficulty of setup means that unless you have some experience with web servers, ASP, and SQL you are probably going to find it difficult to get it to work.  I plan to add more documentation and make it easier in the future.  Of course if you ask questions or leave thanks in the comments I will answer them to the best of my ability, and also be greatly encouraged to know that someone else is out there using this.  :)


How to Fix "BOOTMGR is missing"

By aaron.axvig, Wed, 04/25/2007 - 03:00

So you've got a shiny new Vista install on your desktop, and you're happily installing all of your favorite programs.  One of them requires a reboot, and begrudgingly you comply.  On startup you get an error message reading "BOOTMGR is missing.  Press Ctrl+Alt+Del to restart."  That could be a problem.

As near as I've been able to figure out, Vista gets confused when installed while you have a SATA drive and an IDE drive plugged in and powered on.  In my case, I had one of each, and was installing to the SATA drive.  The IDE drive was already formatted as NTFS (not sure whether that matters, but it might).  So when I installed Vista, it put the Windows files on the SATA drive, but somehow decided to put the boot files on the IDE drive.  It worked like this for a couple of reboots, but then stopped working, giving me the mentioned error.

Vista repair to the rescue, right?  Reportedly it works quite well for some things, but not this case I guess.  I tried the auto repair function that specifically looks for startup problems, but it couldn't find any.  There is a command line option though, so in I dove...

The idea is that some files are placed on the wrong hard drive and they need to be on the other one.  It just so happened that the command line I got though the repair interface gave me C:\ as the drive that had the boot files (incorrectly), and the D:\ as the main (SATA) drive that I wanted the files on.  To find out which is which in your case, just use the following commands (all quotes in this post are NOT part of the command, and the commands are NOT case sensitive):

  • "c:" to switch to the C drive.
  • "dir /a" to view all the files.  The "/a" switch is to show the hidden ones (the files you are looking for, listed below, are hidden).
  • "d:" to switch to the D drive.
  • "dir /a" to view all the files there.

Basically what you are looking for is the drive that has a BOOT folder with files in it, and also a file named BOOTMGR (not in the BOOT folder).  And you want to identify the drive that has the "WINDOWS" folder in it, as that is where you are going to copy those files.

As far as copying the files, just use the following commands:

  • "c:" to switch to the C drive, or wherever you determined the boot files to be.
  • "xcopy /h bootmgr d:" to copy the BOOTMGR file to the D drive, or whichever drive you need to copy them too.  The "/h" switch makes sure that it sees hidden files.
  • "robocopy c:\boot d:\boot /mir" to copy the entire BOOT folder from the C drive to the D drive, again switching the drive letters as you deem necessary.  The "/mir" switch mirrors the entire directory structure, and is necessary because the BOOT folder contains some other folders with files.

That should do it, provided you just saw a bunch of files and copy commands scrolling by.  Just to be sure though, you should test to make sure this problem isn't going to rear its ugly head in the future.  What I'm thinking of is that maybe the files didn't get copied right and it is finding some weird way to use the files that are still on the wrong drive.  So I would recommend unplugging all the cables for the non-OS drive and making sure that you are able to boot Vista completely and that everything is in order.  Then you can plug that drive back in safe in the knowledge that it is not using the files on that drive and you can remove it in the future without repurcussions.

(Note: Lots of information was derived from this Lifehacker post's comments, although my circumstances were a bit different and so my instructions are modified (mainly because those instructions copy the entire drive contents over, and I had data on the second drive that wouldn't fit on the OS drive).  Also, some thanks goes out to this post over at Scott Hanselman's blog.)

Server maintenance notes

By aaron.axvig, Mon, 04/23/2007 - 03:00

Today I did some server maintenance.  That would be the reason you noticed the blog was down for 45 minutes or so.  (Who am I kidding, like anyone actually visits.)  The main idea was to add some RAM, but I also removed a HDD from one machine.

I have two servers, one of which runs the web stuff (all ASP.NET) and one which stores backups and other "files."  It also runs runs SQL Server.  This file/database server used to get really hot, since it was stuffed with 5 HDDs at one point.  I have since added a fan to blow across most of the HDDs and things have improved a lot.  It runs on a 1.2GHz Athlon and now has 384MB RAM.

The web server (and domain controller, and mail server, and anything else I throw at it I guess) is a 1.1GHz Celeron with 640MB RAM.  When I opened the case up on this beast to add some RAM, I noticed that this was now the hotter of the two computers.  In fact, nearly everything was so hot I could hardly hold my hands tight up against the parts (chassis, power supply, HDD, you name it).  This computer used to run fairly cool, so something was obviously up.

I added the RAM, fired the box back up, and promptly noticed that the power supply fan wasn't spinning.  There is no other fan in there other than the CPU fan (still chugging along), so there was little-to-none airflow through the case.  Amazingly it had been stuggling along for probably a month or two like this, in a very warm closet even!

I thought maybe the fan was just jammed and tried rotating it with a key, but it is very sluggish.  I imagine the bearing dried out and failed.  So now I have the computer up and running again, but this time with the case cover off.  I must say though, what a tough little machine.

The moral of the story: If the blog goes down again, you know what happened...


WMP11 dual CD ripping and Laserjet 1012 badness

By aaron.axvig, Fri, 04/20/2007 - 03:00

Well the title pretty much sums it up.  I just discovered that WMP11 can rip tracks from 2 CDs at once.  This pretty much maxes out an AMD X2 3800+, which just one CD didn't.  Curious, because iTunes will max out the processor on just one CD.  Oh well, maybe it's because iTunes was going to 128kbps MP3 and WMP is going to WMA Lossless.

In other news, I've been learning a lot about PCL-5, PCL-6, PCL-X, and lots of other printing goodies.  As with most occasions in which I learn a lot about computers, this means something is broken.  This time it's my damn HP Laserjet 1012 and a lack of reliable functionality in Vista.  I don't feel so bad though, because lots of people have the same problem with XP too, which is even "officially supported."  What a POS, and HP, what a POS for not fixing this problem (printer is easily thwarted by complicated PCL commands from what I could tell).


WMP11 and DivX: not close friends

By aaron.axvig, Wed, 04/11/2007 - 03:00

I'll admit it, I have some DivX files on my computer.  Anyways, I use WMP11 to view them, courtesy of the DivX codec.  This codec is external to WMP11, and comes with its own little nifty tray icon (quite annoying if you ask me).

So I was watching WMP11 generate thumbnails for the movies, and it was taking quite a while.  Further inspection revealed the DivX tray icon flashing in and out of existence every few seconds.  It seems that WMP11 starts and stops the codec for every movie that it processes.  Pretty dumb.


Vista = Traitor

By aaron.axvig, Wed, 04/11/2007 - 03:00

Oh Vista, what were you thinking?  When you wanted to restart after applying updates, I carefully asked you to remind me in 4 hours to restart.

Why did you restart on your own after 4 hours?  Did it ever occur to you that if I leave you doing something overnight I **might** want you to finish doing that without a reboot in the middle that stops everything?  Thanks a lot.


A WPF application idea

By aaron.axvig, Wed, 04/04/2007 - 03:00

I was thinking the other day.

(Whenever I talk about how I was thinking sometime, I think of the 101 Dalmations animated movie.  The two crooks, Horace and Jasper are sitting in their car, and the fat one says, "You know, I've been thinkin'..."  The skinny one promptly bops him on the head, and say, "Now what have I told you about thinking!  I'll do the thinkin' around here.")

Anyways, no, I don't want to tell you about a 101 Dalmations WPF (Windows Presentation Foundation) application that would be neat.  It's actually a type of game.  I think any game in this genre would be conducive to using the WPF framework.

And the winning genre is...Space Strategy.  Also known as Explore, Expand, Exploit, Exterminate games, or 4X for short, these are the ones where you start with a home star system and expand with colony ships to other star systems, which you in turn use to gather resources and construct more colony ship, etc. etc. until you have a massive army and you annihilate the other players who are trying to do the same thing faster than you.  Some of the more popular titles are the Master of Orion series, the Space Empires series, and Alpha Centari.

So why do I think this type of game could be well done in WPF?  Well, they are mostly dialogue driven, and don't use any fancy 3D graphics.  So if you made all the menus fade in with scaling effects and such that would be pretty cool.  But besides looking cool, it would scale better to different size monitors.  From what I've seen, the interfaces of these games have so many buttons and different things to click that they have a rather fixed arrangement.  This would make things look significantly different on an ultra-high resolution, for example.  With WPF, all your graphics would be vector based, and the game would be able to fill a large screen without running the monitor at a non-native resolution.

Also, WPF seems to be pretty flexible (powerful) with layouts.  So it would be pretty easy to do customizeable toolbars, I'm thinking, or even something like the ribbon interface in select Office 2007 applications where the appropriate buttons come sliding in, depending on whether you have selected a planet or a ship.  (You should see the menu in Space Empires IV.  There are over 40 buttons on the top of the screen, always there.  They do have a decent solution in that only the ones you can use at any given time light up, but there is always room for improvement.)

Whether such a game could actually be economically written in WPF I really have no idea.  I imagine it would require a computer roughly along the lines of something capable of running Aero Glass to get anything playable.  And whether programming such a beast would be fun (a lot of angle brackets for the XAML) is doubtful, but I suppose designing one in C++ is also not too exciting.

Just another idea I thought I would throw out there.


WPF/E applications: latest reason to have 2+ CPU cores

By aaron.axvig, Sun, 04/01/2007 - 03:00

In the course of satisfying my blog-reading addiction, I came across this nifty litle rock-paper-scissors game.  It is done in WPF/E, basically Microsoft's version of Flash[1].  So there are animations all over...

Which brings me to realize why we need more processing power.  My poor Pentium-M 1.6GHz processor pretty much died while the application was running.  That's right, my processor was maxed out by a rock-paper-scissors game.  The past few year's worth of advances in the fine art of computer programming sure are great.  I can envision a time when I'll need a core to animate the start button, another to animate the background (already implemented in Dream Scene), one to make all my desktop icons slowly revolve around in a complex spiral so that the ones I'm most likely to use at a certain time of day will be in the center at that certain time of day (you KNOW that would be super-sexy), another to index everything constantly (I think I need a separate HDD for the indexer actually, 'cause it's always keeping mine busy), and another to actually respond to what I want it to do.

Anyways, back to the game.  I imagine if I had a real graphics card instead of an integrated POS the game wouldn't have run so slow, but it is still rather pathetic.  All of those fancy scaling vector graphics don't run so well without a real GPU.  Just the background gradient which slid up and down repeatedly would max out my processor.

Such is progress I guess.  I look forward to the future of sliding vector-based menus and animated backgrounds overlayed with 3 layers of transparent objects.  As long as I can "Flip3D" through everything I'll be happy. :)

And yes, I did win the match.

  1. As an aside, one nice thing about the WPF/E plugin for IE7 on Vista (possibly this is also true on other browsers/platforms) is that it didn't require me to restart my browser.