All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Schmitt" <scdbackup@gmx.net>
To: grub-devel@gnu.org
Cc: bug-xorriso@gnu.org
Subject: Re: grub-mkrescue hfsplus GPT partition is not mountable on Linux
Date: Fri, 25 Dec 2015 11:36:24 +0100	[thread overview]
Message-ID: <26508584595220407814@scdbackup.webframe.org> (raw)
In-Reply-To: <567C5654.4060505@gmail.com>

Hi,

i wrote:
> > The HFS+ failure is due to APM block size 2048.
> > Linux has 512 hardcoded.

Andrei Borzenkov wrote:
> No, it has not.

Seems to fixed meanwhile, indeed.

I patched away MBR partition table and GPT. After that, the partition
/dev/sdb3 does mount. (sdb1 is the APM partition table, sbd2 and sdb4
are "Gap0" and "Gap1".)

But there is a HFS+ problem regardless of partitioning.
See below.


> Do not confuse APM and HFS+.

I shall rather not confuse APM with GPT when reading.

> If I adjust gpt3 to be of the same size
> as apple2 it is happily mounted by Linux.

I would not have expected that the oversize spoils mountability.
Thus my misreading.


Whatever, the lack of a GPT partition for HFS+ is fixed by
  http://bazaar.launchpad.net/~libburnia-team/libisofs/scdbackup/revision/1297/libisofs/system_area.c

It now yields when run by grub-mkrescue (Debian Sid, "2.02~beta2-33",
grub-efi-ia32-bin, grub-efi-amd64-bin, grub-pc-bin)

  GPT partition name :   3  48004600530050004c0055005300
  GPT partname local :   3  HFSPLUS
  GPT partition GUID :   3  54048af0155bb44aa145348d46e87e81
  GPT type GUID      :   3  005346480000aa11aa1100306543ecac
  GPT partition flags:   3  0x1000000000000001
  GPT start and size :   3  6096  24096

together with

  APM partition name :   2  HFSPLUS_Hybrid
  APM partition type :   2  Apple_HFS
  APM start and size :   2  1524  6024

I boot a Debian Jessie VM with that image as -hdb (booted is -hda).
fdisk reports

  Device     Start   End Sectors  Size Type
  /dev/sdb1     64   335     272  136K Microsoft basic data
  /dev/sdb2    336  6095    5760  2.8M EFI System
  /dev/sdb3   6096 30191   24096 11.8M Apple HFS/HFS+
  /dev/sdb4  30192 30791     600  300K Microsoft basic data

I can do as uperuser

  # mount /dev/sdb3 /mnt/hfs

without error message.
But then there is a HFS+ problem which i cannot explain yet:

  # ls /mnt/hfs
  ls: reading directory /mnt/hfs: Input/output error
  System  boot  empty-file.txt  mach_kernel

whereas

  # mount -o loop /dev/sdb /mnt/iso
  # ls /mnt/iso
  System  boot  boot.catalog  efi.img  empty-file.txt  mach_kernel

dmesg has:

  [  354.871503] hfsplus: Filesystem is marked locked, mounting read-only.
  [  359.020970] hfsplus: walked past end of dir

uname -a :

  Linux ... 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u4 (2015-09-19) x86_64 GNU/Linux


It does not look like a problem with the partition.
I have no clue of HFS+ internals. It's done by Vladimir's code in

  http://bazaar.launchpad.net/~libburnia-team/libisofs/scdbackup/view/head:/libisofs/hfsplus.c
  http://bazaar.launchpad.net/~libburnia-team/libisofs/scdbackup/view/head:/libisofs/hfsplus.h
  http://bazaar.launchpad.net/~libburnia-team/libisofs/scdbackup/view/head:/libisofs/hfsplus_case.c
  http://bazaar.launchpad.net/~libburnia-team/libisofs/scdbackup/view/head:/libisofs/hfsplus_classes.c
  http://bazaar.launchpad.net/~libburnia-team/libisofs/scdbackup/view/head:/libisofs/hfsplus_decompose.c

I only provided some glue code and replacements for copyrighted
tables (which are specified freely, to our luck).

If this is a real problem with the boot purpose of the ISO, then
we will have to ask Vladimir for help.

(Mountability and readability on Linux is nice-to-have. But i
 assume that Vladimir is too busy to work on such an issue.)


> > > And is the very first partition really needed? 
> > Vladimir wanted it.
> Not following here.

We should ask Vladimir for the exact motivation of the filler
partitions and show him an evaluation of drawbacks.


Have a nice day :)

Thomas



  reply	other threads:[~2015-12-25 10:34 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
2015-12-25 10:36     ` Thomas Schmitt [this message]
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=26508584595220407814@scdbackup.webframe.org \
    --to=scdbackup@gmx.net \
    --cc=bug-xorriso@gnu.org \
    --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.