Saturday, August 30, 2008

A Tale of Three Partitions

Lately my home PC has had issues, the most annoying of which being that it would fail to install any Windows Installer (.msi) based product unless I dropped to a command line and forced it to install manually using:
runas /user:Administrator "msiexec.exe /i C:\full\path\to\installer.msi"

This was getting really annoying, and I have also been having my 13-in-1 card reader sporadically "go missing". I have a fairly new Dell XPS 710, and it is a pretty sweet machine. I can't complain about this thing as it is built like a tank and it is definitely a luxury model compared to past PCs I've had. Dell really knows how to build a machine.

Anyway, the Windows Installer thing has been bugging me for weeks because I have flexed all of my significant geek muscle trying to fix this problem and have come up empty handed. I was quite proud when I figured out the "runas" workaround (without it all installers just flash up a window and silently fail), but the fact that I cannot fix this problem just drives me nuts. I've tried removing almost every Windows-based component (.NET, Silverlight, etc.) and hacked around in the registry all to no end. So yesterday I decided to buy a second 500GB hard drive, and start from scratch (preserving my significant amount of data on the original 500GB drive).

Last night I started out by downloading a copy of the Linux-based Clonezilla LiveCD, and I used it to successfully clone my old drive to the new one. I knew from previous hacking that there were two other partitions on my hard drive besides my main data partition and I figured these were special Dell system partitions involved in the restore process and further investigation showed that they were in fact partitions containing the Dell diagnostics as well as a ghost image of the factory default WinXP installation. I basically now had two disks containing the following:

+------+--------------+-----------------+
| 47MB | 496GB NTFS | 3GB System |
| Diag | (Windows) | Restore |
+------+--------------+-----------------+

Sure enough, I was able to boot from either drive and ended up with an identical working installation of Windows XP. So the next step was to restore the factory default disk image. I had what I thought was a recovery CD and proceeded to boot from it. It turns out, it was not a recovery CD, but a re-installation CD. I figured there was a chance it would still somehow use the system partitions to install the old factory image onto my 496GB NTFS partition. Well, it installed Windows, but it did not restore the factory install - it just installed Windows. As a result, most of my hardware did not work; not even my network card so I couldn't even access the internet to figure out what to do next!

So I decided to boot from a boot disk and have a look around the third 3GB partition and found there to be a couple batch files and executables (basically Norton Ghost), and a ghost image that *was* a backup of my factory default. I was able to manually run recover.exe and restore the ghost image to my NTFS partition, but when I rebooted I was greeted with an error message that indicated Windows setup was not completed properly and to install again. Weird. At this point I figured there *has* to be a way to restore my machine from this ghost image using Dell's built-in support for this. A little Googling revealed I should be able to simply press Ctrl+F11 after the initial boot screen to initiate the restore procedure. After trying this, I was greeted with the error message Cannot recover. Much more searching and I found this very informative Dell forum thread:
http://www.dellcommunity.com/supportforums/board/message?board.id=dim_other&message.id=274416&query.id=299988#M274416

This ultimately led me to this website which contains a very detailed breakdown of the Dell system partitions, what they contain, and how they are used during the boot process. There are also utilities there for fixing your master boot record code, partition types, and more. Wow, this looked like just the ticket! However, after repairing everything (my MBR code and partition types were messed up during the cloning/re-installing of Windows process) I was still not able to get Dell's built-in recovery procedure to work.

Eventually, I tried resetting the partition types on the original disk to be normal FAT16 and FAT32 partitions (as opposed to special, hidden partitions) using the ptedit.exe utility, then re-cloning them to the new disk with Clonezilla, resetting them *back* to hidden, then attempting to recover by manually running recover.exe, as suggested by the owner of goodell.net in another thread. It was suggested that perhaps the source partitions being configured as odd, hidden types would confuse the cloning software causing things to be cloned incorrectly. Setting the partition types to standard FAT16 and FAT32 types before cloning may alleviate this problem. This time after restoring from the ghost image and rebooting it worked, and I am up and running with a fresh installation of Windows XP (with no Windows Installer issue!). Now to re-install all of the programs I use every day, and slowly migrate my data over from the old drive.

On a positive note, I can't say enough about the build quality of Dell computers. I have 6 SATA ports on my motherboard, and this computer comes with a neatly routed power connection and SATA cable to every drive bay in my machine. Also, every drive bay has a plastic drive carrier inserted in each location. The amount of money you save in not having to purchase cables and plastic bits and baubles alone is staggering. Finally, there are no fasteners required on anything. There is a spring-loaded mechanism on everything so pretty much any drive or component can be removed by pressing a button or sliding a lever. Check this out:



Anyway, here's a big "thank you" to Dan Goodell for his awesome utilities and instructions. You've obviously helped a lot of people with this in the past and you've just helped one more. I owe you a beer!

Friday, August 22, 2008

Thanks a lot, Murphy!

Well, it is our last full day here in Scotland and we have no plans for the day except trying to accomplish some more work, and packing up for our flight in the morning. And as luck would have it, it is gorgeous and sunny outside. It is probably the nicest day we've had all week!

I guess I can't complain. We had a really nice day yesterday and I managed to get in a full day of fishing on Loch Rusky. The trout were rising all over the place and while Bob and I both had many strikes each, we just couldn't seem to hook the buggers! I did end up with one small brown trout though, and I had a second one on Loch Lubnaig later in the day that got away before I got him to shore.



Sharon, Stella and the kids went to Ayr (not St. Andrews like I had originally posted!) and spent the day at the beach. They also had lots of sunshine and the kids had a blast. All-in-all, it was a very good day.

NOTE: Since someone anonymously commented about this (on the wrong post) I did *not* keep this fish. It was released immediately as keeping brown trout on Loch Rusky is forbidden.

Wednesday, August 20, 2008

Still Raining

We have been in Scotland almost two weeks now and it has rained every day except two. Bob and I decided to go out fishing on Loch Lubnaig on Monday, and planned to have a BBQ lunch with Stella and the rest of the family. It looked good when we left in the morning, but ended up raining pretty much all day, and poured rain while we were out on the Loch fishing in the late morning. We didn't see a fish much less catch one. We still had a small BBQ and I think everyone enjoyed themselves despite the rain.

Tuesday was the nicest day yet and we had a full day of sunshine as we visited Kelburn Castle. The scenery, gardens and countryside was amazing. There are miles of walking paths there and it would take much more than one day to see it all. It was the first nice day where I could get some more pictures and I have placed them all on the Picasa page. The gardens had some really amazing trees including a couple yews that are estimated to be over 1000 years old, and an absolutely huge tree called the Weeping Larch that covered 1/4 acre. Its branches grew into the ground and back out again in a tangled, twisted mass. They also had the outside of the castle painted up in what the call The Graffiti Project, which is quite cool to see (don't worry - it is temporary):



Today it rained pretty much all day again, but we decided to take the day off and Sharon and I both worked all day while the kids watched movies and played the Wii. I managed to get a full day's work in, most of which was spent writing Python scripts to automate a lot of grunt work that needs to be done before Friday's release which I hope to accomplish from here.

I'm hoping for a better day tomorrow as Bob and I are heading out for our last kick at the can fly fishing. It should be lots of fun if the weather holds. We are heading out on Loch Rusky, which is a private loch but we were invited out for the day by our ghillie from last week after a rather disappointing salmon outing. I'd better get some sleep!

Friday, August 15, 2008

Ah, sunny Scotland!

We are on vacation in Scotland right now for the third year in almost as many. This is a nice destination for us as we very much like the country and Sharon has relatives here so apart from the flight over it doesn't cost a whole lot. But I must admit that is what bugs me the most! I am constantly trying to devise clever schemes of paying for things before Sharon's aunt or uncle does, and it is exhausting! Especially when using a credit card instead of cash seems to be such a hassle.

Anyway, I have not had a lot of time to comment on things but I have started posting photos here:

http://picasaweb.google.com/mark.melvin/Scotland2008

We have finally got a real taste of Scottish weather. Our previous two visits have been amazing in terms of weather but we have had nothing but rain since we arrived. We have had one nice day so far (which I spent river-fishing for salmon), but the rest have involved drizzle or torrential downpours.

We are heading to the world piping championships tomorrow on Glasgow Green, so let's hope the weather holds for that. There is more fishing planned for next week, and many more visits to the pub. It should be a good vacation!