HTFC Forums

H.T.F.C.

How To Fix Computers





Go Back   HTFC Forums > Hardware Newsgroups > Storage > SCSI

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1  
Old 10-18-2007, 08:26 AM
galapogos
 
Posts: n/a
Default How to change a media to CDFS/ISO9660 file system?

Hi,

I have a USB mass storage device that I wish to change to CDFS. It
responds to the SCSI command set. I initially thought that all CD
device related information(drive geometry/file system etc) would be
contained in a CD ISO image, so I tried sector level writing the ISO
image directly with an imaging software as well as using dd. I also
changed the device's peripheral device type to CDROM device. However,
this didn't work. Windows sees that it's a CDROM device, but the file
system is RAW and I cannot access the drive at all. I did a SCSI
inquiry and saw that the drive geometry remained as before when it was
FAT32, i.e. 512 bytes/block instead of 2048 bytes/block.

I'm wondering what else I have to change in order to make the device
turn up with a CDFS file system?

Reply With Quote
Sponsored Links
  #2  
Old 10-18-2007, 10:29 AM
Rob Turk
 
Posts: n/a
Default Re: How to change a media to CDFS/ISO9660 file system?

"galapogos" <goister@gmail.com> wrote in message
news:1192692374.989391.215430@q3g2000prf.googlegro ups.com...
> Hi,
>
> I have a USB mass storage device that I wish to change to CDFS. It
> responds to the SCSI command set. I initially thought that all CD
> device related information(drive geometry/file system etc) would be
> contained in a CD ISO image, so I tried sector level writing the ISO
> image directly with an imaging software as well as using dd. I also
> changed the device's peripheral device type to CDROM device. However,
> this didn't work. Windows sees that it's a CDROM device, but the file
> system is RAW and I cannot access the drive at all. I did a SCSI
> inquiry and saw that the drive geometry remained as before when it was
> FAT32, i.e. 512 bytes/block instead of 2048 bytes/block.
>
> I'm wondering what else I have to change in order to make the device
> turn up with a CDFS file system?
>


Maybe you should tell a bit more of what you are trying to accomplish. You
mention that you changed the peripheral device type to CDROM. This suggests
that you are either building a hardware device or that you are developing a
filter driver to make something look like a CD-ROM that is not. In both
cases you will have to emulate/implement a whole bunch of CD-ROM
functionality, such as Read TOC. I'm also curious how you determined the
blocksize though Inquiry...

Rob



Reply With Quote
  #3  
Old 10-19-2007, 12:35 PM
galapogos
 
Posts: n/a
Default Re: How to change a media to CDFS/ISO9660 file system?

On Oct 18, 5:29 pm, "Rob Turk" <wipe_this_r.t...@rtist.nl> wrote:
> "galapogos" <gois...@gmail.com> wrote in message
>
> news:1192692374.989391.215430@q3g2000prf.googlegro ups.com...
>
>
>
> > Hi,

>
> > I have a USB mass storage device that I wish to change to CDFS. It
> > responds to the SCSI command set. I initially thought that all CD
> > device related information(drive geometry/file system etc) would be
> > contained in a CD ISO image, so I tried sector level writing the ISO
> > image directly with an imaging software as well as using dd. I also
> > changed the device's peripheral device type to CDROM device. However,
> > this didn't work. Windows sees that it's a CDROM device, but the file
> > system is RAW and I cannot access the drive at all. I did a SCSI
> > inquiry and saw that the drive geometry remained as before when it was
> > FAT32, i.e. 512 bytes/block instead of 2048 bytes/block.

>
> > I'm wondering what else I have to change in order to make the device
> > turn up with a CDFS file system?

>
> Maybe you should tell a bit more of what you are trying to accomplish. You
> mention that you changed the peripheral device type to CDROM. This suggests
> that you are either building a hardware device or that you are developing a
> filter driver to make something look like a CD-ROM that is not. In both
> cases you will have to emulate/implement a whole bunch of CD-ROM
> functionality, such as Read TOC. I'm also curious how you determined the
> blocksize though Inquiry...
>
> Rob


I'm actually developing the firmware for the device in order to make
it emulate a data CD. I used a tool called sg3_utils, it wasn't
inquiry but I believe a read capacity command that gave me back a
response telling me the block size is 512 instead of 2048. I'm just
trying to figure out what exactly I need to do, and where, in order to
make the device present itself as a CD-ROM to the OS. I've figured out
the peripheral device type, now I need to figure out the file system.
Any ideas?

Reply With Quote
  #4  
Old 10-19-2007, 01:22 PM
Rob Turk
 
Posts: n/a
Default Re: How to change a media to CDFS/ISO9660 file system?

"galapogos" <goister@gmail.com> wrote in message
news:1192793713.184431.107320@t8g2000prg.googlegro ups.com...
> On Oct 18, 5:29 pm, "Rob Turk" <wipe_this_r.t...@rtist.nl> wrote:
>>
>> Maybe you should tell a bit more of what you are trying to accomplish.
>> You
>> mention that you changed the peripheral device type to CDROM. This
>> suggests
>> that you are either building a hardware device or that you are developing
>> a
>> filter driver to make something look like a CD-ROM that is not. In both
>> cases you will have to emulate/implement a whole bunch of CD-ROM
>> functionality, such as Read TOC. I'm also curious how you determined the
>> blocksize though Inquiry...
>>
>> Rob

>
> I'm actually developing the firmware for the device in order to make
> it emulate a data CD. I used a tool called sg3_utils, it wasn't
> inquiry but I believe a read capacity command that gave me back a
> response telling me the block size is 512 instead of 2048. I'm just
> trying to figure out what exactly I need to do, and where, in order to
> make the device present itself as a CD-ROM to the OS. I've figured out
> the peripheral device type, now I need to figure out the file system.
> Any ideas?
>


Your first stop would be to get the SCSI specs from www.t10.org . It shows a
list of all mandatory SCSI commands you need to implement in order to
emulate a CD-ROM drive. For starters, check out this link to the oldest
Multimedia Commands (draft, just before becoming SCSI-2):
http://www.t10.org/ftp/t10/drafts/mmc/mmc-r10a.pdf

There are newer standards available, they add more commands for other
devices.

Once you have this implemented, you will need to study the actual filesystem
lay-out.

Rob


Reply With Quote
  #5  
Old 10-19-2007, 03:51 PM
Michael Baeuerle
 
Posts: n/a
Default Re: How to change a media to CDFS/ISO9660 file system?

galapogos wrote:
>
> I have a USB mass storage device that I wish to change to CDFS.


The device type has nothing to do with the filesystem. To change the
device type from "direct access" (USB mass storage is IIRC derived from
this) to CDROM you have to implement another SCSI command set (Rob Turk
told you where to look). But you should assume that the result will be
no longer USB mass storage compliant and no generic driver will handle
it, so you should read the USB specification too:
http://www.usb.org/developers/docs/.

To use a different filesystem is one level above and in no way SCSI
related.

> It responds to the SCSI command set.


There is no single SCSI command set, every device type has its own
command set.

> I initially thought that all CD
> device related information(drive geometry/file system etc) would be
> contained in a CD ISO image, so I tried sector level writing the ISO
> image directly with an imaging software as well as using dd. I also
> changed the device's peripheral device type to CDROM device. However,
> this didn't work. Windows sees that it's a CDROM device, but the file
> system is RAW and I cannot access the drive at all.


If that is the goal you want to achive, I think you cannot use the USB
mass storage class.

> I did a SCSI
> inquiry and saw that the drive geometry remained as before when it was
> FAT32, i.e. 512 bytes/block instead of 2048 bytes/block.


Changing the device type field in the INQUIRY data (that is an
information for the host and normally never read by the device itself)
do neither change the blocksize nor the whole command set of the device.
You have expected a miracle ...

> I'm wondering what else I have to change in order to make the device
> turn up with a CDFS file system?


Think about the difference again: If you need a CD filesystem simply
copy the image to an arbitrary medium, but if you need a CDROM device
emulation you have to build one because USB mass storage is emulating a
direct access device.


Micha
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing ISO9660 image to non-CD media(in this case USB flash drive) galapogos CD Recording 0 10-16-2007 10:32 AM
File Icons change - cannot change back binnsdrafting Windows XP 0 09-05-2007 11:20 PM
how to save a word file according to change in the file name in fo faruk Microsoft Office 9 07-18-2007 02:55 PM
change file system I agree that you have to be careful abou Windows XP 2 05-01-2007 01:39 AM
change file system I agree that you have to be careful abou Windows XP 4 04-29-2007 03:46 PM


All times are GMT. The time now is 08:55 PM.


Powered by vBulletin® Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004 - 2007 Web-S-Sense Pty. Ltd. Usenet and forums posts © their respective authors.
Ad Management by RedTyger