Education needed!

D

Den

Hi Group:

I'm sure that there's an easy answer to this - but I don't know it! Can
someone explain?

Windows XP - I had two hard disks (disk0 and disk1) connected via IDE
cables, each with one partition on. The partitions appeared as C: and D:.

I removed disk1 (lets call it olddisk1 now) and added a new disk (newdisk1).
I then attached olddisk1 via a USB-IDE adaptor and rebooted.

What happened was that disk0 appeared as C:, newdisk1 appeared as G: (E: and
F: are DVD / CD's) and the olddisk1 now connected via the USB port was D:

My questions are:

* Why was newdisk1 not D:
* How did the olddisk1 know that it was still D:
* What happens if you install two drives that were both previously (say) C:

TIA

Den
 
V

*Vanguard*

Den said in news:[email protected]:
Hi Group:

I'm sure that there's an easy answer to this - but I don't know it!
Can someone explain?

Windows XP - I had two hard disks (disk0 and disk1) connected via IDE
cables, each with one partition on. The partitions appeared as C:
and D:.

I removed disk1 (lets call it olddisk1 now) and added a new disk
(newdisk1). I then attached olddisk1 via a USB-IDE adaptor and
rebooted.

What happened was that disk0 appeared as C:, newdisk1 appeared as G:
(E: and F: are DVD / CD's) and the olddisk1 now connected via the USB
port was D:

My questions are:

* Why was newdisk1 not D:
* How did the olddisk1 know that it was still D:
* What happens if you install two drives that were both previously
(say) C:

TIA

Den

Windows writes a signature onto the disk to identify it. When you move
it around, the signature is still on the disk and in the registry to
identify it. It is unlikely that different drives will have the same
signature. Multiple drives would NOT have been both assigned to C:
within that system. If you had a drive that used to be C:, remove it,
make another drive C:, and add back the old drive then its drive letter
gets assigned according to the order it is found physically and then
compensated for drive letters already assigned (so those don't change).
Physical order starts from C: for the first physical drive found
(motherboard IDE ports are searched first) for the active primary
partition on that disk, then on to the next physical disk to see if it
has an active primary partition, and so on across all the physical
disks. Then the scan goes back to the first physical disk and looks for
extended partitions. If there are logical drives in an extended
partition then they get assigned drive letters in the order they are
arranged within that extended partition. Then the 2nd physical drive is
checked for an extended partition and logical drives there get assigned
drive letters, and so on to the rest of the physical disks. However,
drive letters are assigned in the order that they are free; that is, if
a drive letter has already been assigned then it is skipped and the next
free drive letter gets used. So you end up with:

1. Scan each physical drive for a primary partition that is marked
active (only one can be active). If found, assign the next free drive
letter.
2. Scan the first physical disk for extended partitions. If there are
logical drives then assign each the next free drive letter.
3. Repeat step 3 for each additional physical disk in finding logical
drives.
4. Lastly assign the next free drive letter to each driver-support
device (i.e., CD-ROM, DVD, etc.).

(After writing the above, and the rest, I finally found Microsoft's KB
article regarding ordering, which is at
http://support.microsoft.com/?kbid=51978. However, NT's disk management
can change or override those assignments because of tracking by the
on-disk signatures.)

That was the physical scan scheme used under DOS, Windows 3.1/9x/ME,
and, I think, Windows NT4 (but it had its Disk Administrator so maybe
on-disk signatures arrived in that version of Windows; can't remember if
it was NT4 or 2000 when on-disk signatures first got used). That's why
someone with one disk with a primary partition as C: and logical drives
of D: and E: would add another disk with the result the primary
partition on the 2nd disk was D: and all the logical drives back on the
first disk got bumped up. So the trick was to NOT create primary
partition on the added drives but instead always created extended
partitions with logical drives. Then disk signatures arrived and
usurped that ordering (in order to prevent the drive letter reordering
that used to occur when you added another hard disk).

The on-disk signature is stored in the MBR. A copy of it is saved in
the registry. So Windows can identify a disk by comparing its on-disk
signature against those recorded in the registry. Since floppies and CD
drives won't have on-disk signatures, I suspect that moving them around
may not retain their old drive letter assignment. Driver-supported
devices, like CD-ROM drives, get drive letter assignments last in the
above scanning method described. That's why they appear to get the
highest drive letter assignments on an initial install (but later added
disks get assignments after them).

It's has been a long time since I had to bother investigating on-disk
signatures. I think their registry copy gets recorded at:

HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

I once had a problem that dir, Explorer, PartitionMagic, and everything
else was reporting the correct partition sizes but Disk Management (an
included tool in Windows) was reporting the wrong partition sizes.
Microsoft said it was because of the disk signatures. I had save a copy
of the MBRs but accidentally restored them to the wrong disks. They had
me exit Disk Management, delete the registry key, and rerun Disk
Management which would write new on-disk signatures and copy them to the
registry.

Just in case you don't believe me about Windows using disk signatures,
and although you might not be using clustering, read:

How to Replace a Disk That Is on a Windows 2000 or a Windows 2003 Server
Cluster
http://support.microsoft.com/?kbid=305793

Multiple-Path Software May Cause Disk Signature to Change
http://support.microsoft.com/?kbid=293778

Best Practices for Using Dynamic Disks on Windows 2000-Based Computers
http://support.microsoft.com/?kbid=329707
"When you start the Disk Management snap-in, it will enumerate all disks
in the system to see if any disks have changed or if any new disks were
attached to the system. If Disk Management finds any disks that are
unknown, that are not initialized, or that do not have a disk signature
in the MBR, Disk Management starts the Write Signature and Upgrade Disk
Wizard." "NOTE: This wizard was changed in Windows XP and later. It no
longer automatically selects the disks to be upgraded to dynamic."

The on-disk signature is also known as the Global Unique Identifier
(GUID) as applied against disk devices (GUID gets used as a term for
lots of stuff; for example,
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography had a data item named
"MachineGuid" which is your computer's (machine) GUID. The Disk
Management applet doesn't expose the actual disk signature. Using the
diskpart command by running the commands (I only have 1 hard disk):

diskpart
list disk
select disk 0
detail disk
exit

There was the line "Disk ID: 27992799" yet I saw no such number in the
MountedDevices registry key mentioned above. But this Disk ID reported
by diskpart seems a bit too short to be an effective signature. Under
the MountedDevices registry key was:

Data item: \DosDevices\C:

whose value was the same value as another data item under the same
registry key called:

Data item: \??\Volume{f28e58b9-9d40-11d8-8521-806d6172696f}

So I looked for "f28e58b9-9d40-11d8-8521-806d6172696f" and found:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Mou
ntPoints2\{f28e58b9-9d40-11d8-8521-806d6172696f}

whose data items merely told me it was a drive object. No joy. So I
search on the "27992799" disk id reported by diskpart. I found:


HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\MultifunctionAdapter\6\Di
skController\0\DiskPeripheral\0
Identifier = 79f51768-27992799-A

Also, under the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{53f56
30d-b6bf-11d0-94f2-00a0c91efb8b}

I found a bunch of subkeys with the disk id as part of their name:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{53f5630d-
b6bf-11d0-94f2-00a0c91efb8b}\##?#STORAGE#Volume#1&30a96598&0&Signature27
992799Offset...

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{53f56
30d-b6bf-11d0-94f2-00a0c91efb8b}\##?#STORAGE#Volume#1&30a96598&0&Signatu
re27992799Offset...

The value after "Offset" is different maybe because I have one primary
partition and an extended partition with one logical drive hence the two
subkeys. This is beyond me so I'm guessing here. When searching
Microsoft's knowledgebase, I didn't find any that told me how to display
the on-disk signature, where to find it recorded in the registry, and
how to reset, clear, or change it. It gets so convoluted with so little
good documentation that to the sane it is ****ing magic that only a
rainman could decipher. :)

There is the dumpcfg.exe (Dump Config) tool in the Windows 2000 Resource
Kit (probably works on Windows XP) that is supposed to let you view and
change the disk signature but I've never bothered to buy it. It isn't
included in the subset of free tools from the resource kit at
ftp://ftp.microsoft.com/reskit/win2000.

I didn't any menu in Disk Management (diskmgmt.msc) where I could start
its wizard but did see a Action -> Rescan menu, so I searched its help
on "rescan" and found:

A basic disk's status is Not Initialized.
Cause:
The disk does not contain a valid signature. After you install a new
disk, Windows XP must write a disk signature, the end of sector marker
(also called signature word), and a master boot record or GUID partition
table before you can create partitions on the disk. When you first start
Disk Management after installing a new disk, a wizard providing a list
of the new disks detected by Windows XP is displayed. If you cancel the
wizard before the disk signature is written, the disk status remains Not
Initialized.
Solution:
Initialize the disk. The disk status briefly changes to Initializing and
then Healthy status.

Since all my [hard] disks were initialized, there was no Initialize Disk
when I right-clicked on it. However, I'm not sure the wizard ever tells
you anything detailed, like the current signature value, but I do
remember something happening under Windows 2000 when I had to delete the
registry copy of the signatures to force Disk Management to rebuild them
on the disk and in the registry.


Okay, Den, WAKE UP! Class is dimissed. You can stop sleeping in class.
Uffda! And I bet you were expecting a simple answer.
 
D

Den

Wow

That has to be the most comprehensive reply I've ever seen. It gives a
clear and cogent answers to my questions ... Thank-you.

Den

*Vanguard* said:
Den said in news:[email protected]:
Hi Group:

I'm sure that there's an easy answer to this - but I don't know it!
Can someone explain?

Windows XP - I had two hard disks (disk0 and disk1) connected via IDE
cables, each with one partition on. The partitions appeared as C:
and D:.

I removed disk1 (lets call it olddisk1 now) and added a new disk
(newdisk1). I then attached olddisk1 via a USB-IDE adaptor and
rebooted.

What happened was that disk0 appeared as C:, newdisk1 appeared as G:
(E: and F: are DVD / CD's) and the olddisk1 now connected via the USB
port was D:

My questions are:

* Why was newdisk1 not D:
* How did the olddisk1 know that it was still D:
* What happens if you install two drives that were both previously
(say) C:

TIA

Den

Windows writes a signature onto the disk to identify it. When you move
it around, the signature is still on the disk and in the registry to
identify it. It is unlikely that different drives will have the same
signature. Multiple drives would NOT have been both assigned to C:
within that system. If you had a drive that used to be C:, remove it,
make another drive C:, and add back the old drive then its drive letter
gets assigned according to the order it is found physically and then
compensated for drive letters already assigned (so those don't change).
Physical order starts from C: for the first physical drive found
(motherboard IDE ports are searched first) for the active primary
partition on that disk, then on to the next physical disk to see if it
has an active primary partition, and so on across all the physical
disks. Then the scan goes back to the first physical disk and looks for
extended partitions. If there are logical drives in an extended
partition then they get assigned drive letters in the order they are
arranged within that extended partition. Then the 2nd physical drive is
checked for an extended partition and logical drives there get assigned
drive letters, and so on to the rest of the physical disks. However,
drive letters are assigned in the order that they are free; that is, if
a drive letter has already been assigned then it is skipped and the next
free drive letter gets used. So you end up with:

1. Scan each physical drive for a primary partition that is marked
active (only one can be active). If found, assign the next free drive
letter.
2. Scan the first physical disk for extended partitions. If there are
logical drives then assign each the next free drive letter.
3. Repeat step 3 for each additional physical disk in finding logical
drives.
4. Lastly assign the next free drive letter to each driver-support
device (i.e., CD-ROM, DVD, etc.).

(After writing the above, and the rest, I finally found Microsoft's KB
article regarding ordering, which is at
http://support.microsoft.com/?kbid=51978. However, NT's disk management
can change or override those assignments because of tracking by the
on-disk signatures.)

That was the physical scan scheme used under DOS, Windows 3.1/9x/ME,
and, I think, Windows NT4 (but it had its Disk Administrator so maybe
on-disk signatures arrived in that version of Windows; can't remember if
it was NT4 or 2000 when on-disk signatures first got used). That's why
someone with one disk with a primary partition as C: and logical drives
of D: and E: would add another disk with the result the primary
partition on the 2nd disk was D: and all the logical drives back on the
first disk got bumped up. So the trick was to NOT create primary
partition on the added drives but instead always created extended
partitions with logical drives. Then disk signatures arrived and
usurped that ordering (in order to prevent the drive letter reordering
that used to occur when you added another hard disk).

The on-disk signature is stored in the MBR. A copy of it is saved in
the registry. So Windows can identify a disk by comparing its on-disk
signature against those recorded in the registry. Since floppies and CD
drives won't have on-disk signatures, I suspect that moving them around
may not retain their old drive letter assignment. Driver-supported
devices, like CD-ROM drives, get drive letter assignments last in the
above scanning method described. That's why they appear to get the
highest drive letter assignments on an initial install (but later added
disks get assignments after them).

It's has been a long time since I had to bother investigating on-disk
signatures. I think their registry copy gets recorded at:

HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

I once had a problem that dir, Explorer, PartitionMagic, and everything
else was reporting the correct partition sizes but Disk Management (an
included tool in Windows) was reporting the wrong partition sizes.
Microsoft said it was because of the disk signatures. I had save a copy
of the MBRs but accidentally restored them to the wrong disks. They had
me exit Disk Management, delete the registry key, and rerun Disk
Management which would write new on-disk signatures and copy them to the
registry.

Just in case you don't believe me about Windows using disk signatures,
and although you might not be using clustering, read:

How to Replace a Disk That Is on a Windows 2000 or a Windows 2003 Server
Cluster
http://support.microsoft.com/?kbid=305793

Multiple-Path Software May Cause Disk Signature to Change
http://support.microsoft.com/?kbid=293778

Best Practices for Using Dynamic Disks on Windows 2000-Based Computers
http://support.microsoft.com/?kbid=329707
"When you start the Disk Management snap-in, it will enumerate all disks
in the system to see if any disks have changed or if any new disks were
attached to the system. If Disk Management finds any disks that are
unknown, that are not initialized, or that do not have a disk signature
in the MBR, Disk Management starts the Write Signature and Upgrade Disk
Wizard." "NOTE: This wizard was changed in Windows XP and later. It no
longer automatically selects the disks to be upgraded to dynamic."

The on-disk signature is also known as the Global Unique Identifier
(GUID) as applied against disk devices (GUID gets used as a term for
lots of stuff; for example,
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography had a data item named
"MachineGuid" which is your computer's (machine) GUID. The Disk
Management applet doesn't expose the actual disk signature. Using the
diskpart command by running the commands (I only have 1 hard disk):

diskpart
list disk
select disk 0
detail disk
exit

There was the line "Disk ID: 27992799" yet I saw no such number in the
MountedDevices registry key mentioned above. But this Disk ID reported
by diskpart seems a bit too short to be an effective signature. Under
the MountedDevices registry key was:

Data item: \DosDevices\C:

whose value was the same value as another data item under the same
registry key called:

Data item: \??\Volume{f28e58b9-9d40-11d8-8521-806d6172696f}

So I looked for "f28e58b9-9d40-11d8-8521-806d6172696f" and found:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Mou
ntPoints2\{f28e58b9-9d40-11d8-8521-806d6172696f}

whose data items merely told me it was a drive object. No joy. So I
search on the "27992799" disk id reported by diskpart. I found:


HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\MultifunctionAdapter\6\Di
skController\0\DiskPeripheral\0
Identifier = 79f51768-27992799-A

Also, under the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{53f56
30d-b6bf-11d0-94f2-00a0c91efb8b}

I found a bunch of subkeys with the disk id as part of their name:

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\DeviceClasses\{53f5630d-
b6bf-11d0-94f2-00a0c91efb8b}\##?#STORAGE#Volume#1&30a96598&0&Signature27
992799Offset...

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{53f56
30d-b6bf-11d0-94f2-00a0c91efb8b}\##?#STORAGE#Volume#1&30a96598&0&Signatu
re27992799Offset...

The value after "Offset" is different maybe because I have one primary
partition and an extended partition with one logical drive hence the two
subkeys. This is beyond me so I'm guessing here. When searching
Microsoft's knowledgebase, I didn't find any that told me how to display
the on-disk signature, where to find it recorded in the registry, and
how to reset, clear, or change it. It gets so convoluted with so little
good documentation that to the sane it is ****ing magic that only a
rainman could decipher. :)

There is the dumpcfg.exe (Dump Config) tool in the Windows 2000 Resource
Kit (probably works on Windows XP) that is supposed to let you view and
change the disk signature but I've never bothered to buy it. It isn't
included in the subset of free tools from the resource kit at
ftp://ftp.microsoft.com/reskit/win2000.

I didn't any menu in Disk Management (diskmgmt.msc) where I could start
its wizard but did see a Action -> Rescan menu, so I searched its help
on "rescan" and found:

A basic disk's status is Not Initialized.
Cause:
The disk does not contain a valid signature. After you install a new
disk, Windows XP must write a disk signature, the end of sector marker
(also called signature word), and a master boot record or GUID partition
table before you can create partitions on the disk. When you first start
Disk Management after installing a new disk, a wizard providing a list
of the new disks detected by Windows XP is displayed. If you cancel the
wizard before the disk signature is written, the disk status remains Not
Initialized.
Solution:
Initialize the disk. The disk status briefly changes to Initializing and
then Healthy status.

Since all my [hard] disks were initialized, there was no Initialize Disk
when I right-clicked on it. However, I'm not sure the wizard ever tells
you anything detailed, like the current signature value, but I do
remember something happening under Windows 2000 when I had to delete the
registry copy of the signatures to force Disk Management to rebuild them
on the disk and in the registry.


Okay, Den, WAKE UP! Class is dimissed. You can stop sleeping in class.
Uffda! And I bet you were expecting a simple answer.

--
____________________________________________________________
*** Post replies to newsgroup. Share with others.
*** Email: domain = ".com" and append "=NEWS=" to Subject.
____________________________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top