WTF is the deal with all the device names?
==========================================
With every version of windows, the real name of disks and partitions changes.
If you realy want to know what is going on, grab a copy of System Internals
WinObj.
There are 2 main sets of devices. Those which are exported to the Win32
namespace and those which can only be accessed from NT Native API.
Win32 devices names are also called "Dos Devices" and are opened using the Win32
CreateFile function (This means Create a File handle, which may refer to an
already existing file). The filename is passed in as '\\.\devicename'.
This gets confusing because the "Dos Devices" are stored inside the NT directory
called '\??' so the Win32 API converts '\\.\devicename' into '\??\devicename'.
For these "Dos Devices", dd uses the prefix '\\.'. When it sees this prefix it
open the device using the Win32 API like a normal file.
The other devices are only exported into the NT object namespace. These devices
are normally in the 'Device' directory so for example, the first cdrom CdRom0
is called '\Device\CdRom0'. This name must be passed into NtCreateFile so dd
introduces a special prefix '\\?' to indicate this. Therefor, 'dd --list' will
show names like '\\?\Device\CdRom0'
Multiple names
Unfortunatly, there are multiple ways to identify a single device. Each version
of windows is different but normally there is only a single device and the
alternative name is a symbolic link. Symbolic links will be familiar to Unix
users but for the sake of Windows users, it is like a shortcut to another file.
These symbolic links can only exist in the NT object namespace and are not
generaly exported to Win32. (AFAIK, the normal NT filesystems do not suport
Unix like symbolic links, though there is no reason why they couldn't)
'dd --list' will print out the destination of a link under the name of the
device. These links are always is the NT namespace and start with '\\?'.
You can use these links to match up which devices from each namespace are
indeed the same device.
Simple eh?