coLinux
m (Fixed links)
AnMaster (talk | contribs)
m (changed to use templates)
Line 18: Line 18:
 
</nowiki></pre>
 
</nowiki></pre>
   
/!\ 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 [[LinuxCOBD|Using Block Devices in Colinux]] for details.
+
{{Box 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 [[LinuxCOBD|Using Block Devices in Colinux]] for details.}}
   
 
Then you can mount the disk image (contained in the file myDiskImage) by using the command:
 
Then you can mount the disk image (contained in the file myDiskImage) by using the command:
Line 30: Line 30:
 
See also:
 
See also:
 
* [[block_device]] (XML configuration element)
 
* [[block_device]] (XML configuration element)
* [[Configuration XML Format|Configuration XML format]]
+
* [[Configuration XML format|Configuration XML format]]
 
* [[Partitions]]
 
* [[Partitions]]
   
||''[[NunoLucas]]'' You can abreviate the path to use '''"\??\c:\path_to_file.fs"''' (the two ?? are intentional), instead of '''"\DosDevices\c:\path_to_file.fs"'''.||
+
:''[[NunoLucas]]'' You can abreviate 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)
 
Note that \Device\Harddisk0\Partition0 equals \PhysicalDrive0. (see also http://www.uml.org.cn/sjjm/20041613.htm)

Revision as of 10:55, 17 May 2006

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 the same number for the partition as would be reported by fdisk (XXX - can somebody confirm this?). If you are using VMWARE to bootup pre-installed linux, click "Edit Virtual machine active | Hardware | Hard disk". It will tell partition numbers, this number starts from 0, added by 1 as the partition number for your coLinux configuration file.

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.

See also:

NunoLucas You can abreviate 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