Opened 9 years ago
Last modified 8 years ago
#45 new task
Write the physical CD/DVD/hdd/floppy capture code
Reported by: | Valery V. Sedletski | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | Enhanced |
Component: | Common Tasks | Keywords: | physical cd dvd floppy hdd capture |
Cc: |
Description
At the moment we haven't a possibility to capture physical disks like floppies, CDs/DVDs, hard disks, flash disks. We can only mount an image file, not a physical device. So, need to implement this.
Attachments (3)
Change History (7)
comment:1 by , 9 years ago
Summary: | Write the physical CD/DVD capture code → Write the physical CD/DVD/hdd/floppy capture code |
---|
by , 8 years ago
Attachment: | cdflop-avail-upd.diff added |
---|
comment:2 by , 8 years ago
Added two (yet uncommitted) patches:
1) http://trac.netlabs.org/vbox/attachment/ticket/45/cdflop-avail-upd.diff, update to floppy-detection code, distinguishes between floppies and other media types. Known drawbacks: considers erased CDRW's to be floppies.
2) http://trac.netlabs.org/vbox/attachment/ticket/45/host-cdflop.diff, host CD/floppy attach code. Opens/writes/reads/ejects/locks/unlocks door on the CD/floppy on the host computer. Known bugs: a) floppy performance is poor, because it VBox asks for 1 sector at a time. Need to try reading by 1 track at a time b) it traps sometimes when floppy is inserted, on some VM's c) traps rarely in pmmerge, probably, because of stack corrupting d) erases CDRW successfully, but I still have got a trap when trying to write ISO to CDRW in Nero in guest winxp e) no way to read DVD's with CDFS filesystem, they are considered to be CD's, so incorrect "cooked" 2048 byte-sector offset inside "raw" 2352 byte-sector. Need to find the way to distinguish between CD and DVD.
comment:3 by , 8 years ago
Added the new version of Host CD/floppy/HDD capture patch: http://trac.netlabs.org/vbox/attachment/ticket/45/host-cdflop-upd.diff. Now Floppy and CD/DVD opens in guest OS-es. But 1) floppy performance is still poor and VBox gets trapped if ERROR_SECTOR_NOT_FOUND error occurs. Need to process such errors. 2) CD/DVD direct access partially works. At least, CD/DVD is seen by guest OS, but some SCSI commands fail. For example, you can start Nero Burning ROM in windows and try burning the CDRW. CDRW erase works fine, but write of an ISO image is kinda, working. I.e., it reports that progress is ok and CD burned successfully, but does nothing. CD writing just fails, but Nero does not check error codes. So this still needs to be worked out. 3) You can add the host harddisks to your VM's. For that, you need to create the raw VMDK file and add it to a VM configuration. To create it, use VBoxManage command:
VBoxManage internalcommands createrawvmdk -filename somefile.vmdk -rawdisk w:
It will add the disk with a drive letter w: to somefile.vmdk. You can also add the whole physical disk by its number, followed by colon:
VBoxManage internalcommands createrawvmdk -filename somefile.vmdk -rawdisk 2:
Also, you can use "
.\Physical_Disk#" or "
.\w:" to use raw filesystem option (disk is read via DosRead instead of DosDevIOCtl and opened without OPEN_FLAGS_DASD). But this doesn't work with current os2dasd.dmd. It will just trap in os2dasd trying to open
.\Physical_Disk# or give ERROR_LONGLOCK on DosRead at some point. IBM added this option without even checking if it works really. So, this needs os2dasd or others disk drivers to be repaired to be working. But this case is supported.
Also, in windows, there exist the possibility to open
.\DiskNPartitionM, i.e., open partition by disk number and partition number, without assigned drive letter. We haven't such option on OS/2, so letting the VM to see a subset of a hard disk partitions (not a single partition and not all partitions) is currently impossible (If we will not try to convert M and N to a drive letter).
comment:4 by , 8 years ago
PS: Strange, but adding the raw .vmdk to a VM causes VM to fail if trying to start it from the command line ("no such VM"), but it starts successfully if VM is started from the selector window. This is a known problem.
Enhanced floppy detection code