2

This seems absurdly easy, and I have the idea I used to know how to find out, but...

On Mac OS 10.4, I want to do a raw copy between two devices using dd if=inputdev of=outputdev ibs=?? obs=??. How can I tell what are the best block sizes to pass to ibs and obs?

Related information — There was a question on SO, Purpose of ibs/obs/bs in dd, with a very nice answer by Jonathan Leffler.

Postscript: Looks hard, I'm afraid. From a message on the drawin-drivers list:

The problem is that the Size, and Preferred Block Size information in the IORegistry is unreliable for open session CD-R discs, and in order to provide compatibility with the widest range of devices, I need to issue a sequence of SCSI commands to the device in order to determine where the actual last written block on the disc is, and what the actual block size of the media is.

So the contents of Preferred Block Size in the IO Registry, even if it can be accessed, could be be wrong...

But a reliable method of getting this information would still be valued.

1 Answer 1

1

If drivers load for those devices then their block sizes should be recorded in the IORegistry. How to find the entries you want in said registry is not something anyone can even guess at without knowing more about the devices in question. Odds are good you can just use 512 either way.

If the driver that loads isn't reliable enough for you, then you're basically going to have to write your own. There's no way to send raw ATA or SCSI commands to a device from the command line that I'm aware of, but someone else might know something I don't.

3
  • CD-ROMs usually have 2048 byte blocks. Yes, you can use 512 byte blocks, but it is not ideal, and could cause timing errors. Feb 27, 2010 at 9:21
  • Apparently the contents of Preferred Block Size in the IORegistry can be wrong... See the PS to my question. Feb 27, 2010 at 18:57
  • 2
    CD blocks are 2352 bytes as far as the device is concerned. Feb 28, 2010 at 0:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .