[haiku-development] Re: iPod on Haiku

  • From: Marcus Overhagen <marcusoverhagen@xxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 11 Apr 2009 02:47:43 +0200

Denis Papin schrieb:

After more investigation, mine has a MBR which is close to a Intel/MBR except it assumes that the LBA values are sectors of 2048-bytes instead of 512 bytes ! So what Apple uses is some kind of specific MBR, definitely not standard at all.
Yes, it's not standard, but it's valid. While ATA has been traditionally using block size of 512 bytes, some SCSI disks are already different, 256 byte sectors and 2048 byte sectors seem to exist.

For CD-ROM, block size is mostly 2048, but you can even change the block size on some SCSI or ATAPI devices using the mode select command to read
raw audio blocks (2352 bytes) or subchannel data.

As I think there is no "sector size" info anywhere in the MBR, they probably use the disk signature to do something like
As Michael already said, there is a SCSI command to read this information.

If yes, we may have to decide if we want to add specific partionning support ( for exemple x-byte-long sectors ) to the Haiku kernel ?

It looks like even ATA is going to get a different sector size, 4096
are planned for. We should not assume a fixed 512 byte size anywhere.

(Yes I'm guilty of writing code that assumes that, too.)

see also:

http://www.bigsector.org/

http://www.frontiernet.net/~mmarlette/Cloud-9/Support/Sector%20Size%20Issues.pdf

http://www.t13.org/Documents/UploadedDocuments/docs2002/e01138r2.pdf

regards
Marcus

Other related posts: