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]

 



--- On Sun, 5/8/12, Vyacheslav Dubeyko <slava@xxxxxxxxxxx> wrote:

> 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?

Those images did mount and worked on Lion (as I mentioned I was helping a Mac-user friend to set up his dev environment in March). I can try downloading some of the earlier xcode images (or other dev material images) from Apple's to see if earlier Mac OS'es are supposed to be able to cope with that anomaly.

I should point out again that I did not make those images, nor know how they were made - they are "freely" available on apple's web site. They are the updates/installers of their standard dev tools (contain Apple's patched version of gcc, binutils, autoconf, etc) on Mac OS X, and Mac OS X [some version] obviously have no problem loop-back mounting them, even when they are off-spec.

It is free registration, and apple doesn't really try to bombard one with more info/offers, so everybody is free to take a look around, if interested.
--
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