Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

21 September 2010

Windows 7 system drive letters

I've previously blogged about Wandering drive letters in Windows 7. I've now a little more hard-won knowledge of what's going on.

Be very careful if you resize a Windows 7 system partition when the partition letter is not C. In fact, don't do it!

I am revisiting this issue because I ran into a problem. Our family shared laptop came with Vista. However this started playing up showing a DOS box regularly and Windows Update wouldn't install a particular patch. So I decided to install Windows 7 on drive D. This worked fine with W7 running with its system drive as D:.

Recently, drive D: started getting full so I decided to resize the partitions with the great Partition Wizard. This seemed to go OK. However, Windows 7 started playing up very badly, showing DwmHintDxUpdate error messages and worse. I eventually tracked the problem down to the fact that Windows 7 had decided that drive D: would now be called drive C: which is a serious problem as Windows and other software will store many full file locations (in the registry and elsewhere). If W7 thinks a file should be on drive D when in fact it is on drive C, then there's going to be serious problems. It's amazing that it booted at all.

The post by MarcusOS7 here explained what was going on, ie that Windows 7 tries to rename its system partition to drive C if the drive is resized, ie when the drive identifier changes. This is a serious flaw in Windows 7 and must be fixed.

I had hoped that with this information, I would be able to mend my W7 system. Even though I could just run regedit, I did not know what magic to do to change the system drive letter.

Eventually I decided to reinstall Windows 7. I saved the data over to an external USB drive. For this installation I wanted to be sure that W7 would install itself on drive C. Previously I must have done the installation when running the Vista system which somehow prevented W7 from using the C drive. This time, I was careful to do the install after booting into the Windows DVD. This trick ensured that W7 marked its install partition as drive C (even though it was not on the first partition).

In fact: before doing this, I re-partitioned the system so I had 3 partitions in the laptop, one each for Vista and W7, and one as a data drive. This process also helped me clear the previous W7 installation which was quite stubborn to remove, permission-wise. I eventually had to clear the partition by reformatting the drive.

Back in the new W7 system, I was able to restore the desired user data from the backup. And then I had to set up W7 again from scratch for each user, and installing all my development tools. As usual one of my first tasks is to turn off various system sounds, particularly the annoying Start Navigation click...

14 January 2010

Wandering drive letters in Windows

My main computer's motherboard died - long live the new computer! Thankfully, all the data on the two existing drives were OK. A hastily bought 3.5 inch USB drive caddy worked a treat, keeping me going on the laptop.

The new computer was pre-installed with Windows 7 Home Premium on drive C with a separate partition on drive D for data. I have an MSDN subscription and I wanted to set up various versions of Windows multi-booting on the same computer. I have two different systems that I want to run normally, one with Visual Studio 2008 and the other with various older bits of software. I also want to have some different versions of Windows for software testing, ideally Windows 7, Vista and XP, both in x86 and x64 versions.

OK - I know I can run a virtual PC, but I want to use two of these systems regularly at top speed. I haven't tried virtual PC yet, so I decided to stick with what I knew, which is the HyperOs multibooter, though I had to upgrade to the latest version.

The first task was to repartition the disk, to give more partitions, each with a Windows installation, as well as big photo/video partition. I found that there were already two extra partitions, a (Packard Bell?) Recovery Partition and a small System Reserved partition set up by Windows 7, ie 4 Primary partitions in total. The W7 Disk Management tool wanted to convert my disk to Dynamic Disks to give me more partitions, but these cannot be used for booting, so a swift exit was called for.

HyperOS mentioned the Acronis partitioner but this wasn't playing - not sure if it was Windows 7 or the size of the disk. I did have a copy of gparted on CD, but this hadn't worked for me before. Eventually I found Partition Wizard www.partitionwizard.com which has worked brilliantly. I got a free commercial licence for this.

Using Partition Wizard, I deleted (empty) drive D and made quite a few other Logical partitions. Partition Wizard is clever enough to know that it cannot do changes in some circumstances, and so does it on reboot. Partition Wizard can also resize partitions, moving data if need be. So far that's worked fine. (Check your computer power settings don't shut your disk down at an awkward moment.)

Having done that, I could now copy all my precious data onto the new hard disk from the drive caddy.

Anyway, I've now done various Windows installations, some by installing from DVD from Windows, but mostly by installing from DVD at reboot, ie choosing DVD at boot up from the BIOS boot menu - and choosing Custom Setup to choose the install partition. The problem that I have found is that the drive letters that Windows uses and sees seems to change a lot. The original W7 system is on drive C on the "first" partition. I have another W7 on the fifth partition which thinks of itself as being on drive M - fine. However, most other W7 and Vista installations think of themselves as being drive C, even though they are on partition 4, 7 or 8. When I have rebooted in one of these systems, the drive letters are assigned in a fairly random way. The DVD drive is usually drive E but not always.

In Windows Disk Management you change the drive letters - for some drives at least. But there's limited scope for what you can change to. Partition Wizard can do this, and is probably more successful. However there appears to be no way of persuading a Windows on partition 4 (that thinks it is at drive C) to think of itself as being drive L for example.

All these wandering drive letters might not be problem. However my software development stuff and business data has always been carefully set up (for various reasons) to be stored on both drives C and D. I don't tend to put data in "My Documents", "Documents", "Pictures", etc because these are (usually) stored in different locations for each version of Windows. Anyway, I have persuaded partition 2 to be drive D in all the installations so far. However it was a problem that partition 1 kept wandering all over the shop. My solution was to move all my crucial data from drive C onto a bigger drive D. Ok - fairly simple in itself, but I'm still having to work out what dependencies there are in all my scripts.

Another complication in this process was that Windows XP was dying during installation (with a BSOD). This turned out to be because the SATA drives were being accessed using AHCI. Changing the BIOS to use the SATA setting "Native IDE" got the XP installation to work. However I did not want to leave this setting as is, so I change it whenever I want to switch to XP. XP also doesn't recognise many of the motherboard peripherals, eg Ethernet, so the installation is not very useful. The option to press F6 during installation would let me install a suitable driver, but (a) I don't have the driver and (b) the system doesn't have a floppy; it does look as though new motherboard has a floppy interface, but there's no connector soldered in there!

I was also able to add an IDE/PATA cable and drive to the system to connect my old drives, but the installation still did not work if I was in AHCI SATA mode.

I've still many applications to configure and systems to set up, but I'm getting there.