New
#1
Save yourself - literally!
Yesterday sucked.
On Friday, I had two random BSODs. On Saturday, I figured I'd try to fix the problem. Based on my reading here, it seemed that I should check and update my device drivers. I ran into a major issue with ATI Catalyst. Basically, it got wedged - could not uninstall the old or install a new. No problem I figured, I'll let System Restore save my butt, but no such luck.
I then followed advice given and was able to uninstall the old ATI Catalyst driver, but could still not install the new one (or for that matter, the old one either). I then tried a repair restore, and that did not help either. Finally, I wound up reinstalling the entire computer. After 16 hours of work, I'm back (I think) to where I started. (Why so much time? - because of the large number of programs installed on this machine.)
The reason for this post is not to whine, but rather to share two insights and provide a brief tutorial which may help you avoid wasting time.
Insight #1: Before you do anything to your computer which has the potential to cause problem, create a restore point. Next, before doing anything else, restore your system from that restore point! If the restore works, then you are on your way. If not, stop everything until you get the restore working. There is no reason to work without a safety net.
Insight #2: Put all of your user files, database files, etc. (even your inetpub folder, see here and here for details) on a separate drive. Why? Quite simply this - when you reformat your c drive to reinstall the OS, your user folder remain completely, yes completely, untouched. When you reinstall your applications, many of them will revert to the same state as before the rebuild, and this is a huge time saver.
Tutorial on moving the c:\users folder to another drive
Two introductory comments:
- The word 'partition' can be substituted for 'drive'. However, drives are so cheap, that unless you have a notebook computer, buy a second drive. It is the cheapest insurance you can get.
- The information presented here sources primarily from this blog posting. I have made a number of small modifications and clarifications.
Step 1: From Windows Explorer, right click on the existing c: drive and the new drive to which \users is to be moved and give both of them meaningful labels. For the purpose of this tutorial, we will assume the disks are labeled OldDisk (the c: disk) and NewDisk. This will help later on. Also, note the drive letter of the drive to which you want to move the c:\users partition. We will refer to this drive as <WinNewDisk>.
Step 2: Using your Windows installation disk, boot to a command prompt. See here for details.
Step 3: Methodically visit each possible drive in your system, using <x>:, where <x> is a drive letter, until you find
- the disk labeled OldDisk, note its drive letter. We will refer to this drive as <BootOldDisk>.
- the disk labeled NewDisk, note its drive letter. We will refer to this drive as <BootNewDisk>.
Before moving one - why all of this hunting? For two reasons: First, Windows 7 creates a protected partition, thus c: at run time is typically not c: from the command prompt; and second, the order in which drives appear under Windows can be changed and may not match the order in which they appear under the command prompt.
Step 4: Copy the files to the new disk:
robocopy <BootOldDisk>:\Users <BootNewDisk>:\Users /E /COPYALL /IS /XJ /R:n
Some comments:
- Robocopy does not have (at least I could not find) a silent mode - it spews everything to the screen. Redirecting the output to a file will greatly speed things up. This leads to the last switch - the value, n, is the number of retries for a failed copy. The default is one million! If you are redirecting, set this to 0 and look at the output. If you are watching the screen, set this to 1 - there is a 30 second waiting period so you'll be able to see where the problem is.
- If you are copying to a new hard drive, the /IS switch is not needed. However, if you are doing a reinstall, you should use this switch - it tell robocopy to include same files.
Step 5: (optional) Boot to Windows and make sure everything copied the way you want. When done, repeat Step 2.
Step 6: This is where the real work gets done. Basically, we remove two existing junctions (hard links in Linux-ese) and create two new ones.rmdir /S /Q <BootOldDisk>:\UsersThe keys are realizing the the drive letter of the boot disk in command prompt mode is irrelevant and that the drive letter which need to be linked is the actual letter which appears under Windows.
rmdir "<BootOldDisk>:\Documents and Settings"
mklink /J <BootOldDisk>:\Users <WinNewDisk>:\Users
mklink /J "<BootOldDisk>:\Documents and Settings" <WinNewDisk>:\Users
Reboot, and you're in business!
So, hopefully you will learn from my experience and move your c:\users folder to a different drive. The process is simple and straight-forward.
One cautionary note; If you try to do an recover reinstall, things will get hosed as Windows will copy all of the files back to the c: drive. But, at least this is a start - Unix has had this capability, out-of-the-box for 25+ years, guess it just take MS time to figure these things out.