image_alt_text

22

Feb/10

Separating User & Windows On Different Drives

Monday, February 22nd, 2010

Overview

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.

Prerequisites

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!

Mounting Options

  1. Mounting a drive to a directory – I was very keen on using this technique when I saw in the Disk Management utility. It sounds like the method used in Linux and would make it fairly transparent to the user.
  2. Separate sub directories within users – This option makes it very simple to do because Windows 7 has the option of moving all the directories under the users one such as Pictures, Music, Search, etc. Just specify the new location and Explorer will move the files creating the directory along the way and taking care of permissions.
  3. Change the %UserProfile% in the registry so that it is pointing to another drive.

Mounting A Drive To A Directory

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.

Separate Sub Directories Within Users

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.

Change the %UserProfile%

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.

Summary

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.

Fixing User Profiles in Vista

27

Jan/10

Windows 7 Monitor Power Test

Wednesday, January 27th, 2010

There is a report generator in Microsoft Windows 7 which can help you track down what is being used in terms of power. The report tells you what is stopping the computer going into sleep mode (if sleep mode is turned on) as well as devices that do not “suspend”.

Go to the command line as an administrator. This can be achived by going to Start Menu and typing cmd in the search bar. Search for cmd.exe under Programs, hold Shift key and right click on cmd.exe. At this point you can let go of the shift key and select Run as administrator.

A dialogue box may warn you when starting the the program but OK it to start the program. Type:
powercfg -energy
and press enter to start it. The program will monitor your computer for 1 minute. In this time do what you wish.

Once it has finished it will print out the location of the report which is in a HTML (web page) format. You may need to copy to a suitable folder for your browser to open it.

Tekzilla Daily Tip #511

19

Oct/09

VirtualBox With Ubuntu Quick Review

Monday, October 19th, 2009

Overview

I found Sun’s VirtualBox and thought I’d try it out. As everything is going virtual and having used it in Mac I thought it was time to step it up in Windows so I can start running things like Linux and maybe other Windows under my main desktop. This allows me to play about without worrying about destroying my main PC and spend a day restoring everything.

For this review I am using Windows 7 as the host environment and Ubuntu 9.04 as the guest.

VirtualBox VM Setup

Media Manager

Creating and installing Linux under VirtualBox brought some interesting concept which I have not seen and would love to see in VMware Fusion. The Virtual Media Manager was a great idea. This allows you to control virtual HDDs to Floppy disk images. This means you create your home HDD which can be mounted on multiple virtual environments for example. All the steps in creating them is done once and can be re-used many times.

To get Ubuntu installed I decided to create a root partition which would also contain the swap drive and a separate partition for the home directory. Also I had to add the ISO image of the install CD.

The next step was to create the VM itself. Pressing new in the toolbar starts a wizard which prompts for the settings of essentially the emulated hardware the virtual machine would run and allocate resources. The wizard made it user friendly and easier for beginners to create. Once created the system should be ready for the install. The only criticism I have with the wizard is the defaults it presents to the user. For example the default video RAM is set to 12MB which is very low.

Starting the VM shows a similar boot and install process to a physical computer. The VM locks the mouse cursor to the VM window and by default pressing the right ctrl will unlock it from the environment back to the host. Simply clicking back inside the window locked it again.

The install process went smoothly and I proceeded to install and set up the VM on post install with no problems.

VirtualBox Drivers

The VM comes with Ubuntu compatible “Addtions” which installs some drivers and software to make it interact with VirtualBox. The most noticeable advantage to installing the additions is the display drivers. Without it Ubuntu’s X Windows system limits the max resolution without some hacks.

Ubuntu in VirtualBox

Performance

VirtualBox doesn’t look to suffer from any performance or hardware issues. All sound and other hardware related devices seem to work well without any glitches.

Virtual Machine Management

Main

VirtualBox’s first screen shows a list of virtual machines set up on the left hand side and the selected VM settings on the right. This is a very simple yet effective display of information about the VM and the toolbar makes creating, changing settings and starting VMs very simple.

The screen allows the user to also delete the VM listed. Once a VM is running in a separate window, this screen can be closed without closing the VM itself.

Snapshots

VirtualBox features the ability to take “snapshots” of the VM state. Once created, the snapshot is a freeze of the current state and allows the user to restore back to the state at any given time. This makes trashing and restoring a VM a trivial process hence great for development and testing things.

Summary

For a free tool it does all the basic things I need in order to run Ubuntu / Linux. I do miss the seamless mode where it integrates the guest OS with the host and the program does not run in a window. Besides this factor there is not a lot more negative points about it and it can only get better.

6

Jul/09

My Alternative Free Software On Windows

Monday, July 6th, 2009

Overview

Here are my picks for free software on Windows (currently Windows 7). Free and open source (two different licenses applied to software) have come a long way and have come to replace my ageing proprietary and non-free applications. I list my choices below in this post.

Multimedia Player

VLC – stands for Video Lan Client is an open source player that runs on all 3 major platforms (Windows, Linux and Mac). It supports a very wide varity of codecs and video formats. The player has plugins for web browsers and can be used to play music and videos.

I use it as my video player as it does not have a library component to manage my music and videos but does have a playlist feature.

Web Browser

Mozilla Firefox – I have been using Netscape 6 browser back in the day when the company still existed. Even though it was slow and crashed every so often it did not deter me from trying a different browser to Microsoft’s Internet Explorer. I leapt straight onto Firefox (what was called Phoenix at the time of it’s alpha launch) version 0.6 and stuck with it since. Whilst Safari and Opera has improved over the years along with Firefox moving to 3.5 very quickly.

Email

Mozilla Thunderbird – An open source using standard design I have used it for well over 2 years now. Whilst it feels lacking in terms of polish and that bit of TLC compared to Mozilla’s web browser offering it still forefills the task as a good email client. I do find it lacking development and features sometimes for example the lack of naitive calendar integration so I’m less likely to hold onto the software if a new and better software came out.

File Compression

7Zip – This is a free and open source software (FOSS) which handles a lot of different compression protocols from 7zip (it’s own format) to zip and rars. The UI could do with some work but it does have context menu built into Windows.

Drawing

Paint.NetPaint.net – Initially developed to replace paint in Windows it uses the .net framework and is free. The software does a lot of effects and enhancements to images all for no fee (but please donate to the project). It does all the simple things like cropping drawing to slightly more advanced tools like, layers, lots of undo levels and controls with good fine controls.

CD/DVD Burning

CDBurnerXPCDBurnerXP – Despite it’s name it does handle DVDs too. The software is not as good as Nero but does the job well enough. The software UI flow needs a bit of work but the burning part is faultless. When creating a project it detects the current media in the drive to determin the size. In my opinion I prefer to set what type of media I am going to burn because I don’t always take out pre-burnt or non writable media in the drive which means it will always say you don’t have enough space. Despite this it is free so I’m not going to complain – too much. It does not support any cover editing or light scribe burning.

PDF Reader

Foxit Reader – A much lighter version than Adobe’s PDF reader. It has all the features I use in Adobe Reader so it’s a perfect drop in replacement. The reader has plugins for web browsers so you can view PDF from within the browesr. It does have a tiny advertisment in the top right corner below the windows border.

FTP Client

Filezilla – A free and open source FTP program. It has a lot of options and clever download / upload queue which you can specify what you want to do with file conflicts. Transfer limites can be set by the user from number of simultaneous file downs to the speed at which it down / upload files.

Remote Desktop

RealVNC – It’s one of the stable tools in Linux but it is available on cross platform. The server application isn’t as secure but if you hide it behind a firewall and tunnel in it should be safe. It’s very basic but it works and quicker than Remote Desktop on slow connections. There is a free and paid version depending on your needs.

TODO

I still have use non-free software because I have yet to find an alternative to fill it’s place. A good site to search for alternative software is at AlternativeTo.net

These are the following programs I need to find a good replacement for:

  • Text editor – I would love Notepad++ to be 100% compatible with Windows 7 but it’s not quite there yet.
  • RSS Reader – I’m using Feed Daemon but I would like an RSS reader than supports Google Reader and on all 3 major platforms including the iPhone.
  • UPNP Player – Not quite figured out what I need or how it will work but I want to move all my video and music collection to one central place and accessible on my computers for personal use.
  • Podcatcher / Podcast Aggregator – I’m still using Juice but there has been no updates to it since early 2000 but I have yet to find a replacement.
  • Music Player – A good all round music player with library support. I also want to be able to play podcasts in accelerated mode.
  • Diagram Tool – A good FOSS alternative to Microsoft Visio. It seems I’m alone on this one as there are hardly any out there and the Linux Dia program is too basic. Dia also shows it’s age.
  • Office Suite – I’m using Microsoft Office and have used Open Office in the past but found it lacking in terms of stability or usability.

I would like to use agile light weight applications where it does not require say Mono on Windows but keeping them as independent as possible. Any suggestions or recommendations are welcome. I will try and update the list in the future.

26

Jun/09

Mozilla Firefox & Thunderbird Spell Checker

Friday, June 26th, 2009

Since version 3 of Firefox it has had a built in spell checker. This is handy if say you use your browser to write blogs or posts online for example. The problem is when you download the browser it doesn’t come with any dictionary installed so it has the ability to spell check things but it doesn’t have anything to check it against.

Mozilla Thunderbird also has the same problem as Firefox.

The spell checker uses the same technique used in Microsoft Word. It highlights an incorrect word by underlining it with a red dotted line.

To get spell checker head over to the dictionary page from Mozilla. Download your language(s). You only need to download the dictionary once if you want to use spell check in Firefox and Thunderbird.

Tools > Add-ons menu

Tools > Add-ons menu

Go to Tools > Add-ons menu and a window should appear. Drag the dictionary files into the window and it should ask for confirmation to install. Wait the timeout delay (usually 3 seconds) and press “Install”. It will then ask you to restart. You can continue using your application but the spell check feature won’t be enabled till you restart or close and re-open Firefox/Thunderbird.

This process works for both products.

Mozilla dictionary page