> > > Parted converts flags to funky partition type names, i think. Not idea, > > > but it > > > works, like said, i think parted is inherently broken on this, but there > > > is > > > not much we can do at this time. > > > > They might have done this following a comment of mine (my memory id fuzzy > > on this, not sure they ever asked). Using the partition type (which is > > just a string) is indeed broken IMO. > > Why ? take for example the bootstrap partition, which is Apple_bootstrap on > mac, and 0x41 on chrp/prep MBRs ? The same goes for LVM or RAID partitions.
Why? Because we don't know how MockOS will react to a partition _type_ set to anything but Apple_Bootstrap, Apple_HFS, Apple_UNIX_SVR2 or Apple_Free. If you're sure (or just reasonably confident) Linux_LVM will be ignored by Apple boot and disk mount code, go ahead. I can only test this for a fairly narrow range of OS X versions, and maybe a resurrected 8.6. Since there's always the partition name (for Apple_UNIX_SVR2 partitions which MacOS ignores since prehistoric times), I didn't really want to bother testing this. > Furthermore, i believe that the partition type is the right place to store > this info, confirmed by the fact that on MBR a type is used for both RAID and > LVM. After all, the fact that a partition does RAID or LVM cannot be > compatible by it being a linux swap partition for example, in the way the > bootable flag is set for example. > > I would suggest we use 'Linux_RAID' and 'Linux_LVM' for those two. And libfdisk (for example) used to look at the partition _name_ field in Mac partition tables for clues where to find swap. What's the problem with that? > > So we should press this point a bit more forcefully :-) > > Like said, i will gladly write the (trivial) code, if some consensus is > reached. We seem to have trouble reaching a consensus even here :-) Seriously though, let's just try with 'Linux_RAID' and 'Linux_LVM' partition _type_ fields in Mac partition tables, maybe add Linux_Swap later and keep plain data partitons as before. That should keep the comaptibility code to a minimum (look for 'swap' in type and name fields) and get the scheme some limited testing. > > If parted currently encodes the LVM flag in the partition type we can > > still put it into the partition name on top of that, and get the Debian > > LVM maintainer to accept either flag? > > No, i would vote against this. After all, a parted user can change the name of > a partition through the parted and d-i/partman interface. A mac-fdisk user can change either at will. Linux always reserves your right to shoot yourself into the foot. But for the sake of saving users from their own stupidity, go ahead with the scheme you suggested. Michael