[parted-devel] [PATCH] mac: support sector size > 512 correctly

Brian C. Lane bcl at redhat.com
Tue Apr 22 23:50:45 UTC 2014


On Sat, Mar 01, 2014 at 09:43:31PM +0100, Sergei Antonov wrote:
> This patch fixes several problems found when trying to do Apple
> Partition Map on a 4K-sector iPod. The problems happened because of
> unneeded conversion between physical sectors and 512-byte units.
> For devices with sector 512 the conversion did no harm, for others it did.
> 
> List of problems (all are gone with the patch):
> 
> * Partition in OS X, connect to Linux, run "parted <dev> print".
>   "Error: Can't have a partition outside the disk!" is shown.
>   Every partition is displayed 8 times (4k/512) bigger its real size.
> 
> * Exec "mktable mac", connect to OS X.
>   The drive's partitioning scheme is not recognized.
> 
> * mkpart creates partitions 8 times (4k/512) smaller than requested.
> 
> Signed-off-by: Sergei Antonov <saproj at gmail.com>
> ---
>  libparted/labels/mac.c | 59 ++++++++++++++++++--------------------------------
>  1 file changed, 21 insertions(+), 38 deletions(-)

Do you have any documentation you can reference for this disk label? It
looks like the ones linked to in mac.c are gone.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)



More information about the parted-devel mailing list