There's always time to play

Monday, May 30, 2011

Moving "Documents and Settings" to another partition in Windows XP

Because you can't depend on Windows, it's nice to have some kind of backup scheme for when things go wrong. One of those solutions is to store important data on a seperate drive. I've seen a lot of people doing this the wrong way. User folder in C:\Documents and Settings\[user] and a partition D: or E: which then contains folders like Documents, Downloads, Photos and Music.

A home directory is not just a home directory for nothing, so store your files in there. The solution is simple, with NTFS drivers you can have a volume mount point, which allows you to use a seperate NTFS filesystem as if it was just a folder in another NTFS filesystem. Of course this doesn't make it easy yet, so these are the steps that need to be taken to have it fully functional:
  1. Format the new partition as NTFS
  2. In Disk Management in Windows setup the new filesystem as volume mount point on C:\newdoc
  3. Boot to something that is capable of moving stuff around on your drive (Parted Magic will do)
  4. Copy the contents of Documents and Settings to the new filesystem
  5. Move Documents and Settings to olddoc
  6. Move newdoc to Documents and Settings
  7. Reboot into Windows

Depending on what you used to copy the contents of Documents and Settings you might have to reset some of the file attributes (or permissions even), because otherwise a lot of Desktop.ini files will pop up.

One last improvement that can be made is to fix the icon for the mount point. By default this will show as a disk icon, but because we abstracted this fact we might also want to show it as a folder. Just create C:\Documents and Settings\autorun.inf with the following contents:

This requires a reboot before visible, but after that will work great.

Because we make effective use of NTFS volume mount points all legacy applications that probe for C:\Documents and Settings instead of using the proper functions to find profile directories will work as ever before. Just keep in mind to follow these steps after a Windows reinstall, except for the file copy part!

Wednesday, May 11, 2011

Linksys E4200 as an access point

At work we bought two Linksys E4200's to extend our wireless network. We wanted to use them as access points / wireless gateways instead of their normal router configuration. Googling turns up a few half-documented solutions, which might even work in case you've got a small home network set up, but I still couldn't get it to work. So I took one of the routers home, and this is what I've come up with (tested at home only right now):
  1. Start the router
  2. Connect a cable between your computer and one of the E4200 LAN ports
  3. Turn on remote management on the E4200
  4. Verify that the E4200 doesn't have a local address that belongs in your network's subnet (change it otherwise)
  5. Connect a cable between the E4200 WAN port and your network
  6. Connect a cable between your computer and network
  7. Turn off the DHCP server on the E4200
  8. Connect a cable between your network and one of the E4200 LAN ports
  9. Connect a cable between the E4200 WAN port and one of the E4200 LAN ports

Now you can wirelessly connect to your network using the E4200 and you can still access the E4200 admin interface as well!

Of course this all won't be necessary when DD-WRT or other alternative firmware releases are available for the E4200, but right now this probably is the best solution.