Re: off-spec-ness of HFS+ image from apple, hfsplus 2nd volume header, and mount options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hin-Tak,

On Aug 3, 2012, at 12:40 PM, Hin-Tak Leung wrote:
> 
> I know parition map can have different ideas about volume sizes. I was talking about the HFS+ volume header itself - located on the 3rd 512-byte, and *supposedly* located on the 2nd 512-byte from the "end" - the "end" being the size declared by multiplying the blocksize with blockcount in the HFS+ header, and counting from 1024 byte before the primary header. 
> 
> The smaller set of files also have blockcount way over the image size itself, and the 2nd header is located at the beginning of the last used 4k block.
> 
> Here they are:
> 
> dd if=xcode_4.3.3_for_lion.dmg of=/tmp/header1 count=3 skip=65
> dd if=xcode_4.3.3_for_lion.dmg of=/tmp/header2 count=1 skip=3858241
> 
> ("header1" includes the 2x512 bytes before the primary volume header, hence count=3).
> The HFS+ header says 482273 blocks of 4 KiB, which means the 2nd header sould be located at 65 + 482273 * 8 - 2, i.e. at skip 3858247 instead of 3858241 as above.
> 

I made some experiments with creation of hfs+ volumes under Mac OS X (10.6.8) Snow Leopard. I can't detect such anomaly in the case of my version of Mac OS. For example, I created  partition with size of 2097155 sectors (sector is 512 bytes in size) and I can see second volume header in the 2097153 sector. It means that second volume header is located on the distance in 1024 bytes from partition's end. In volume header I can see volume size in 0x40000 blocks (block is 4096 bytes) or 2097152 sectors. The detected position of second volume header is coincided with Apple's technical specification.

Unfortunately, I haven't any Apple hardware with installed Mac OS X Lion. So, I think that maybe reported by you anomaly is take place under only Lion. Maybe, it was made as optimization efforts for SSD case.  Do you have opportunity to make similar experiments under Lion?

With the best regards,
Vyacheslav Dubeyko.

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux