Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
CD-ROMs usually have 2048 byte blocks. Yes, you can use 512 byte blocks, but it is not ideal, and could cause timing errors. – Charles Stewart Feb 27 '10 at 9:21
Apparently the contents of Preferred Block Size in the IORegistry can be wrong... See the PS to my question. – Charles Stewart Feb 27 '10 at 18:57
CD blocks are 2352 bytes as far as the device is concerned. – Hasaan Chop Feb 28 '10 at 0:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.