Wikia

coLinux

WindowsDevicePaths

Talk2
234pages on
this wiki

The contents of the <block_device> element's path attribute are not at all defined by colinux. Colinux, which is entirely ignorant of the meaning of this attribute, instead depends on the host operating system to understand the value and to provide the correct resource. For colinux under Windows, that means the value must be a valid Windows device path.

I won't provide an exhaustive list of these device paths, but will provide enough for most users to accomplish what they want:

  • \DosDevices\c:\...: This is a simple matter of specifying a file path after the initial "\DosDevices\". The referenced file will be read and used as a disk image. You can either download such images off the Internet, or make one yourself.
  • \Device\CdromZ: Z, which is indexed from zero, refers to the specific cd/dvd drive. See CdDvdAccess for details how use a CD/DVD drive.
  • \Device\HarddiskX\PartitionY: X, which is indexed from zero, refers to the specific harddrive. All hard drives on a system are ennumerated in the order in which Windows finds them (which, of course, is also the order in which it searches for them). Although you can mess around with the orderring if you have the know-how, I'll assume that most readers will still be using a "normal" setup. For IDE, the first controller precedes the second in the search order, and a master precedes its slave. For SCSI, drives are found first by controller, then by channel, and finally by device-id (0-6). The partition number, Y, is a 1-based index of the list of partitions (both primary and logical) found while enumerating the disk's partitions. This differs from linux, where partitions receive special numbering based on whether they are primary or logical.

Contrast between windows and unix:

\Device\Harddisk0\Partition1   /dev/hda1

If your extended partition space is the second entry in the partition table:
\Device\Harddisk0\Partition2   /dev/hda5
\Device\Harddisk0\Partition3   /dev/hda6
...

If your extended partition space is the third entry in the partition table:
\Device\Harddisk0\Partition2   /dev/hda2
\Device\Harddisk0\Partition3   /dev/hda5
\Device\Harddisk0\Partition4   /dev/hda6
...

If your extended partition space is the fourth entry in the partition table:
\Device\Harddisk0\Partition2   /dev/hda2
\Device\Harddisk0\Partition3   /dev/hda3
\Device\Harddisk0\Partition4   /dev/hda5
\Device\Harddisk0\Partition5   /dev/hda6
...

If you have no extended partitions:
\Device\Harddisk0\Partition2   /dev/hda2
\Device\Harddisk0\Partition3   /dev/hda3
\Device\Harddisk0\Partition4   /dev/hda4

If you want further information on partitions and linux numbering, see http://www.linux.com/howtos/Partition/partition-2.shtml

Examples:

<block_device index="2" path="\DosDevices\C:\Co Linux\myDiskImage" enabled="true" />
<block_device index="3" path="\Device\Cdrom0" enabled="true"/>
<block_device index="4" path="\Device\Harddisk0\Partition1" enabled="true" />
Note: To use these devices in the coLinux guest linux, you must set up your cobd block devices in your /dev file system, e.g. /dev/cobd0 (the linux distribution images provided by the co Linux community will likely have done that already for you). See Using Block Devices in Colinux for details.

Then you can mount the disk image (contained in the file myDiskImage) by using the command:

mount /dev/cobd2 /mnt

Alternatively, you can mount the first partition of disk 1 (the second physical disk) by specifying /dev/cobd4 instead.

You may find it convenient to specify a device alias. This allows you to boot either natively or using coLinux from the same drive, without editing /etc/fstab

   <block_device index="0" path="\Device\Harddisk1\Partition1" alias="hdb1" enabled="true" />

See also:

NunoLucas You can abbreviate the path to use "\??\c:\path_to_file.fs" (the two ?? are intentional), instead of "\DosDevices\c:\path_to_file.fs".

Note that \Device\Harddisk0\Partition0 equals \PhysicalDrive0. (see also http://www.uml.org.cn/sjjm/20041613.htm)


MassTranslated on Sun Apr 23 17:37:02 UTC 2006

Around Wikia's network

Random Wiki