I wanted to have the Windows partition and the user partition on separate drives. I have done this in the past on a Linux computer and it was very painless.
The advantage to this setup is that most of the personal data such as things stored in My Documents, My Music, etc and the Windows specific stuff like installed programs, patches, etc are stored on a separate partition whether it’s on the same or different drive. This degree of separation allows the Windows partition to be wiped and started fresh without affecting the personal files.
I had time during my fresh install to play about with various setups and have listed the options in the following section.
Be aware that not all programs store settings/preferences in the user directory so this is no replacement
I am not responsible for any damage or problems caused by the below procedure.
Final note is that I tried many combinations but some how managed to get it to work. Whilst the steps may not be 100% correct it should be a good guideline to see the process through. I shall update it should I come across it again.
Before starting ALWAYS ALWAYS back up all the necessary files. Even though this design is suppose to negate the need to back it is still advised to backup in case something goes wrong.
Have a Windows 7 Install CD and CD Key ready.
Time!
This was my first choice so I wiped my system and went about to do this. The steps described in the superuser website are as follows:
1. You boot with the install media.
2. At the screen with the “Install Now” choose “Repair your computer”
3. You will be asked if you want to “Repair and Restart” by the System Recovery options, choose “No”.
4. Then Make sure that Windows 7 is listed as one of the installed OS’s available for recovery, it’s selected and them press next.
5. You will be given a list of recovery tools, chose “Command Prompt”.
6. In the command prompt you will be using Robocopy to copy c:\Users to d:\Users
7. Type robocopy c:\Users d:\Users /mir /xj
8. /mir tells robocopy to mirror the directories, this will copy all files and permissions.
9. /xj is very important, this tells robocopy not to follow junction points. If you forget this, you will have a lot of trouble.
10. Make sure no files failed to copy (FAILED column = 0).
11. Remove the old Users Folder from the c: drive: rmdir /S /Q C:\Users
12. Create a NTFS Junction that points to the new Users folder: mklink /J C:\Users D:\Users
The problem with the above method is the drives letters in recovery mode may not be using the correct drive letters when in normal Windows. For example drive C: is the windows drive and drive Z: was the user drive. In recover mode it generally assigns drive letters incrementally so in order to get the drive to mount on Z: the user drive needs to be on the 24th SATA port. This is unrealistic.
Also after performing those steps you would find the user to be locked out because of the user mapping has changed. To fix this boot into safe mode and login and do the following steps outlined in Nigel’s blog
What now? Well I found additional registry entries with REGEDIT under
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
There was 1 line for each profile. Crucially if a profile is bad there are 3 things worth checking
a) Ensure the key name doesn’t end in “.bad”
b) Ensure the RefCount value is 0
c) Ensure the State value is 0
Having gone through all those steps it made the OS unstable. I’m not sure if it’s a hardware issue but there seemed to be long seek times or Windows was taking a lot longer to follow the symbolic link. Whilst it worked, it hangs and long load times was not acceptable to me.
This is the easiest setup and I started with using this as my solution when the above method did not work for me. The problem with this was that it left the user directory e.g C:\Users\Danny on the same drive as the Windows partition and I do use that directory (as well as my Desktop which can be mapped to another drive) as my dumping ground. Not totally satisfied I found a workable solution described below.
This is the final approach I took. It worked in the end but there was a lot of confusion when I did it but I ended up with the result I wanted.
Before changing the variable the files must be copied to the new drive. To do this I used the above method of dropping into command line, copying the files to the new location. Follow steps the steps in Mounting A Drive To A Directory section. Before closing the registry edit the attribute ProfileImagePath in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
to the path of the new user directory. Reboot and it should be done.
Update 16-Nov-2010
I have just reinstalled Windows and used the Change Profile and there are few things to note:
Whilst the last method worked. I’d like to go through it again to ensure the steps are correct but I’m sure it more or less sums it up. I’m happy I got the result I wanted but wished the symbolic link worked. I’m looking at separating the install directories as well such as the typical C:\Program Files directory so that the Windows partition only contains Windows related files.
Mount second drive as c:/Users in Windows 7.