All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: grub-mkrescue hfsplus GPT partition is not mountable on Linux
Date: Thu, 24 Dec 2015 23:32:20 +0300	[thread overview]
Message-ID: <567C5654.4060505@gmail.com> (raw)
In-Reply-To: <8610584908695216656@scdbackup.webframe.org>

23.12.2015 01:54, Thomas Schmitt пишет:
> 
> The HFS+ failure is due to APM block size 2048.
> Linux has 512 hardcoded.
> 

No, it has not.

> 
> My assessment back then with a Linux kernel 2.6i.32 was that the
> APM Block0 is not interpreted at all. Its bytes 2 and 3 tell the
> block size.

Do not confuse APM and HFS+. Block size in APM has no relation to block
size in HFS+. Neither in Linux nor in GRUB. And GRUB never uses APM
block size when reading HFS+ either.

> 
> In fs/hfsplus/hfsplus_raw.h i see:
> 
>   #define HFSPLUS_SECTOR_SIZE        512
>   #define HFSPLUS_SECTOR_SHIFT         9
> 

This is simply *minimal* HFS+ block size, same as in GRUB.

> 
>> I am not sure what is intended here, but apparently Linux does not
>> support APM
> 
> It supports APM with block size 512.

It supports APM with any size. It is just that APM has lower priority in
Linux so MSDOS or GPT win and Linux does not support multiple partition
labels on device.

And again - APM is irrelevant here, we do not access HFS+ via APM, we
access it via GPT in this case. If I adjust gpt3 to be of the same size
as apple2 it is happily mounted by Linux. So there is absolutely no
issue with block size in HFS+.

> 
> Hrmpf. This might be the reason why HFS+ was supposed to imply
> the production of GPT.
> I will investigate where and how i can add a GPT partition for
> HFS+ if GPT gets produced.
> 

If you insist on covering the whole range, just add one more GPT
partition after it.

> 
>> And is the very first partition really needed? It is not used by GRUB
>> anyway, and there is no requirement that each bit of media is covered.
> 
> Vladimir wanted it. It protects against inadverted partition editing.
> 

Not following here. The whole image is created by dedicated tool and is
mainly intended for read-only media anyway.



  reply	other threads:[~2015-12-24 20:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-22 19:17 grub-mkrescue hfsplus GPT partition is not mountable on Linux Andrei Borzenkov
2015-12-22 21:32 ` Thomas Schmitt
2015-12-22 22:54 ` Thomas Schmitt
2015-12-24 20:32   ` Andrei Borzenkov [this message]
2015-12-25 10:36     ` Thomas Schmitt
2015-12-26 11:39       ` Thomas Schmitt
2015-12-26 14:57         ` [Bug-xorriso] " Andrei Borzenkov
2015-12-26 19:20           ` Thomas Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=567C5654.4060505@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.