Clean Install

Recently, I've been asked to perform a clean install on friend's laptop/desktop PCs. I reckon over the past few years I've installed an operating system over 100 times, of all different flavours. Off the top of my head, I've sat waiting for the following to complete:

Microsoft's Operating Systems are a firm favourite, apart from Millennium Edition - but I forgive them for that. Regardless of the Operating System in question, the process is pretty much the same for all:
  1. Copy all relevant files to another drive (network/external)
  2. Format the hard drive
  3. Pop-in the O/S CD/DVD and follow the instructions
  4. Restart
  5. Install the latest drivers (usually in a specific order)
  6. Restart
  7. Install updates
  8. Install software required
  9. Optimise
  10. Defrag
  11. Test
To elaborate, 1 should include all of the user(s) files which are located in C:\Documents and Settings or C:\Users by default on Microsoft Windows. I also grab any application specific files that would be needed, such as Save Games and configuration files. Then check for drivers that are lying around - Dell tend to put theirs in C:\Drivers or C:\DELL - so copy them to another drive too.

Step 2 is fairly straight forward and can be combined with 3 - as many Operating System installations allow you to format the drive(s) during the process. If you feel it's necessary, run a format utility on the drive to wipe them prior to installation - DBAN is good for this. The installation process can vary from 15 minutes or so, all the way up to a couple of hours. Microsoft seem to be doing better these days, as I've found the installation times with Vista and Windows 7 are far quicker than those of XP and older versions.

A restart is essential after installation. You may need to change the boot sequence within the BIOS on older hardware, to ensure it doesn't perform the whole process over again.

Once you're into your Operating System of choice, it's then a case of ascertaining which Drivers are needed. Usually, the more recent the Operating System, the less drivers you'll need to install - this is due to the vendors packaging many popular Drivers with the O/S.

You have 2 options whilst installing the Drivers - either restart in-between each install, or skip the restarts and wait until all are installed. The former is preferred, as it ensures each Driver is installed correctly and loaded prior to moving onto the next. It also allows you to resolve conflicts quicker if required.

Then you can move onto the updates. Linux/Mac fans would argue that they can get by without updates, but Microsoft users are veteran update installers. Choose wisely, opt for all critical and security updates, then trawl through the optional ones and ascertain whether or not you'd need them. I recommend Microsoft's Update website over the built-in Automatic Updates for pre-Vista O/S's, as it includes all Microsoft Updates, not just those specific to the O/S.

Step 8 is specific to your requirements, but if you've restored a PC to factory settings - now is the time to remove the excess crap that many Manufacturers install. Then add any additional software that you need. My current suite includes:

For my servers, it's usually just updates and then the software required for the Server's role.

Then move onto step 9, which for me involves running msconfig and removing startup programs not needed. Then look at all of the services and disable any unnecessary ones. Finally, tailor the settings to your needs, such as Folder Options within Control Panel and the Taskbar/Start Menu settings.

Finally, give the PC a Defrag. Afterall, it's just had a kicking in the hard drive department. Then it's a case of testing everything works as you'd expect and start using the machine.

Let me know if you do anything different and any interesting stories of your clean install encounters.

comments Posted: Thursday 24th September 2009, 23:50pm
Categories: Articles, Computers and Technology
Tags: microsoft, operating-system, software, windows

EveryDNS Client

Last night I realised some of the DNS servers I use for my domains weren't responding to requests. I initially thought it was my webserver, but Google Chrome kept saying "resolving host" and a quick nslookup revealed that the nameservers weren't replying.

My DNS is hosted with ZoneEdit, who hand out different nameservers per account. DNS should be the most reliable service in your chain - but for me it was failing. So I decided to switch providers for the domains that were affected to EveryDNS.

They're a free service, allowing you to setup your DNS for up to 20 domains per account. This is 4 times as many as ZoneEdit allow! The site itself is also a lot more responsive and fairly easy to use. The only thing which put me off is that you have to use their client to update your Dynamic DNS entries. They do provide the full source code for the Windows client though, which I downloaded and promptly started trawling through.

Their client is efficient, small and worked on my Server 2008 webserver - so I didn't have a reason to rewrite it. However, it requires use of command-line parameters to update. This is fine for those who have their webserver connected directly to the internet - i.e. the webserver has the external dynamic IP address, as assigned by the ISP. But in most cases, the webserver is behind a firewall and uses an internal IP (such as 192.168.1.x).

So, I needed a way of retrieving the current external IP, as it changes periodically - hence being known as Dynamic. An ipconfig results in the internal IP, but visiting WhatIsMyIP.com yields the external IP. Screen-scraping the page would allow you to get your IP - or you can use the specific page which just displays your IP.

Then once the external IP is retrieved, you can call the official EveryDNS client - passing in the IP as a parameter. Lastly, this whole process needs automating and executing at regular intervals, to ensure your DNS records are updated to reflect your Dynamic IP address.

I decided to write a small application in VB.NET to accomplish this:

To retrieve the external IP I used System.Net.HttpWebRequest then System.Net.HttpWebResponse to send a request and read the response (the IP itself). System.Diagnostics.Process is then used to call the external official client.

You can download the full source code or the compiled executable. You'll need to amend the .config file:

The domains part is important - the application splits this list into an Array, then loops through it calling the Official Client for each domain. So if you had two domains in your .config file:
example.com,example.co.uk
Then it would call the client for example.com, wait for a response and then call it again for example.co.uk - allowing you to update all of your DNS records at EveryDNS in one go.

This application can then be scheduled to run at regular intervals. I chose once an hour, every hour to ensure I'm not hitting the sites too hard - but that IP changes would be dealt with fairly quickly.

Hopefully there are others in the same situation as me, that want to use the EveryDNS client with their external IP address. Let me know if you end up using the client and what you think - perhaps you have improvements you'd make?

comments Posted: Thursday 17th September 2009, 23:50pm
Categories: Articles, Computers and Technology, Links, Slickhouse, Web
Tags: application, client, dynamic-dns, everydns, vbnet, zoneedit