Showing posts with label Performance. Show all posts
Showing posts with label Performance. Show all posts

Sunday, 17 July 2011

HOWTO: Move the Users-tree to another drive in Vista/Windows 7

WHY MOVE THE C:\Users -TREE TO ANOTHER DRIVE?

Why would someone want to move the C:\Users-directory tree to another drive?
One reason: Storage Capacity.

Windows Vista and 7 store all user- and shared data under the C:\Users -tree and therefore a fast system drive like a smallish SSD or a Velociraptor will inevitably lead to the filling of the whole C:\ -drive because user data like home videos and digital pictures will consume easily hundreds of gigabytes of storage space.

So say you've invested in a fast 64GB SSD-drive and would like to play World of Warcraft and tryout the occasional Public Test Realm versions of it. Your WoW-installations alone will consume 35GB of your limited storage capacity and ass Windows Vista/7 data at about 15-20GB and a few hundred RAW-images and you're out of space badly.

Installing Windows Vista or Windows 7 will replace the old 'Documents and Settings' directory tree as the repository of system users home directories as well as the shared Public-directories like C:\Users\Public\Games\World of Warcraft.

Unfortunately the directory tree contains the user registry and other system files so you cannot just move it to another drive and walk away with a working Windows installation.

As a matter of a fact, your Windows won't be able to logon if something gets screwed-up during the following instructions. -> So make a full image backup NOW!

STEP-BY-STEP INSTRUCTIONS

Here are some step-by-step instructions on how we do this - I don't claim authorship to any of these - I collected the different ideas together that were floating around the blogosphere and tried the different methods until I got it right.

1. Make a full backup image of your system drive (C:\) before you proceed

I found out the hard way that System Restore CANNOT restore a broken linkage of C:\Users nor will renaming the original directory back to its original name fix the error that Windows will crash & burn with if something goes awry.

So you'll want to make a full system backup-image with the Windows Vista/7 Backup/Restore -tool or another similar backup utility that support full volume imaging to get back up after a failed attempt.

2. Make a System Repair Disc with the Vista/7 backup tools for yourself or have the install DVD handy for command shell

Start Control Panel -> System and Security -> Backup and Restore -> Create a system repair disc. You will be asked to insert a CD or DVD into your DVD-burner (either will work since the image is small enough to fit on a normal CD-R disc). Make the disc and label it.

Alternatively, albeit a slower way of getting to a command shell is to boot from the original installation media and select 'Repair system' from the installation menu -> Use recovery tools -> Command Prompt.

3. Make sure your second drive where you're relocating the C:\Users -tree is in such a place that it will be given the same drive letter during a System Repair Boot as it has during normal boot.

This is imperative since the hard linking used in the guide requires you to be able to give the whole drive path including the destination drive letter to link to the new destination and this will fail if the drive letter during SysRepair is different from normal runtime.

In practice this means you need to make the secondary drive the D:\ -drive since the SysRepair command shell will boot to X:\ itself, have an empty C:\ -drive, D:\ will be in its normal place and the ordinary boot drive will be located at E:\ in a two hard drive and a DVD-drive scenario.

I found out this the hard way too with the secondary drive mapped to Z:\ normally and during the System Repair command shell it would end up being D:\ and mess the linkage totally and result in a full restore.

4. Boot into the command shell with the System Repair disc or your original Windows intallation DVD and do the following:

1. Type 'E:' and press 'Enter' to go to your normal boot-up drive
(this may be a different letter if you have a different drive configuration)

2. Type 'robocopy E:\Users D:\Users /MIR /E /XJ /COPYALL DCOPY:T'
(possibly also 'robocopy E:\Users D:\Users /MIR /E /XJ' will be enough - tried both when I succeeded) and press 'Enter'

3. Type 'rmdir /S /Q E:\Users and press 'Enter'

4. Type 'rmdir E:\"Documents and Settings" and press 'Enter'
(Documents and Setting is a hidden hard link (Junction) to C:\Users that won't work if it is pointed to a hard link Junction)

5. Type 'mklink /J Users D:\Users and press 'Enter'
(Note: here the originating link point i.e. C:\Users must and can be given as a relative reference without a drive letter so it can be done even thou the C:\-drive will reside as E:\ -drive during the System Repair command shell.)

6. Type 'mklink /J "Documents and Settings" D:\Users and press 'Enter'
(Note: Same goes for this relink. Also here we link Documents and Settings directly to the real new Users-directory tree to avoid the nested linkage.)

7. Type 'Exit' and press 'Enter' to exit the command shell
8. Reboot the computer normally and you should have a working hardlink to D:\Users from C:\Users and all the space consuming data will end up on the secondary larger drive transparently to the OS.

There are some rumors that this linkage might confuse some backup utilities to make an image backup of both drives and breaking the image doing that.

Wednesday, 13 July 2011

HOWTO: Install Windows Vista from a high speed USB 2.0 Flash Drive

WHY INSTALL FROM USB FLASH DRIVE?

Why would someone want to install a client OS from a thumb drive instead of a DVDROM or over the network?
One reason: Performance.

Installing Windows Vista from a high speed USB flash drive is in my experience the easiest & fastest way to complete a Windows Vista install.

This is much faster than using a DVD, gigabit ethernet, or possibly even some external USB 2.0 hard drives, due to differences in access speed & transfer rate.

To put this into perspective, y'know how installing Windows on a Virtual PC virtual machine from an .ISO CD image is really, really, really fast? Imagine something roughly just as fast, except for doing installations of the OS on to actual workstations.

STEP-BY-STEP INSTRUCTIONS

Here's some step-by-step instructions on how we do this, some of which was adapted from Josh's instructions, again, kudos to Josh.

1. Acquire an ultra-fast USB 2.0 flash drive
The drive I and my coworkers recommend is the Apacer 4GB Handy Steno USB Flash Drive HT203, 200X Hi-Speed USB 2.0. It's the fastest USB 2.0 Flash Drive that we've found - it has a read speed of 25MBytes/sec. & a write speed-14MBytes/sec and also works great as a ReadyBoost cache.

Incidentally, once you've got Windows Vista up and running, you may want to consider getting an ultra-fast SDFlash card, installing it into your laptop or desktop, and leaving it there as a ReadyBoost cache. Why? It can't hurt and they're so cheap that it's worth getting. I personally got a SDFlash card for every one of my machines - the A-DATA 2GB Secure Digital Memory Card, 150X Turbo SD Card has a read speed of more than 22.5MB/s and a write speed of more than 15MB/s.

2. Format the Apacer Flash Drive
Run CMD.EXE and type the following.

Note: This set of commands assumes that the USB flash drive is addressed as "disk 1". you should double check that by doing a list of the disks (type "list disk") before cleaning it. If you have multiple hard drives, like an SDFlash drive or a Multibay drive, you could end up wiping your second drive using this command. (This was a warning that Josh added to his post along with the following commands that I copied from him, so kudos to Josh)

1. diskpart
2. select disk 1
3. clean
4. create partition primary
5. select partition 1
6. active
7. format fs=fat32
8. assign
9. exit

3. Copy Windows Vista's DVD ROM content to the Flash Drive Simply issue the following command to start copying all the content from the Windows Vista DVD to your newly formatted high speed flash drive.
> xcopy d:\*.* /s/e/f e:\

And that's it. Boot up the machine, have it boot off the USB drive, and watch how fast the installation completes. If you thought Windows Vista installed quickly before then let's see how you like it now. The slowest part of the install will probably be the computer waiting for you to type in information in the setup fields, and even that can be automated using the "Windows Automated Installation Kit".

(Original Blog Entry Copied from http://kurtsh.spaces.live.com/blog/cns!DA410C7F7E038D!1665.entry)