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

Re: create HFS partition



> >     u32     dpme_flags;
> > #if 0
> >     u32     dpme_reserved_2    : 23 ;  /* Bit 9 through 31.        */
> >     u32     dpme_os_specific_1 :  1 ;  /* Bit 8.                   */
> >     u32     dpme_os_specific_2 :  1 ;  /* Bit 7.                   */
> >     u32     dpme_os_pic_code   :  1 ;  /* Bit 6.                   */
> >     u32     dpme_writable      :  1 ;  /* Bit 5.                   */
> >     u32     dpme_readable      :  1 ;  /* Bit 4.                   */
> >     u32     dpme_bootable      :  1 ;  /* Bit 3.                   */
> >     u32     dpme_in_use        :  1 ;  /* Bit 2.                   */
> >     u32     dpme_allocated     :  1 ;  /* Bit 1.                   */
> >     u32     dpme_valid         :  1 ;  /* Bit 0.                   */
> > #endif
>
> Bit 30 is apparently the magic "automount on boot" flag. Using Apple's

Are you sure you're not off by a few bits (endianness)? The next to last
bit would be dpme_allocated... But I can build a test version of mac-fdisk
with that bit set for people to try out.

To be absolutely clear here: bit 30 when bit numbering starts from zero,
right? Well, a quick hack of the partition table dump code shows that bit
is indeed set on the MacOS partitions only. Looks good...

> Disk Setup tool, turning off the "automatically mount" option, and then
> booting into Linux and doing 'od -t x2 /dev/sda1' showed that that bit
> was changed in the MacOS partition's layout.

OK, for anyone with a spare disk/partition sitting around: there's a test
binary (just the ppc binary, no package) sitting at
people.debian.org/~schmitz/mac-fdisk-automount to test this. I don't have
a spare disk around right now so the 'create HFS partition with automount
flag' bit is untested. If you start mac-fdisk with the -d command option,
go into the expert menu ('x') and dump the partition data structures
('P'), partitions with bit 30 of the flags set should be marked by 'M'
(others by 'm'). Have fun.

	Michael



Reply to: