From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aCPhj-0002Sf-Jj for mharc-grub-devel@gnu.org; Fri, 25 Dec 2015 05:34:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCPhg-0002RC-FD for grub-devel@gnu.org; Fri, 25 Dec 2015 05:34:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCPhf-00023I-8R for grub-devel@gnu.org; Fri, 25 Dec 2015 05:34:32 -0500 Received: from mout.gmx.net ([212.227.17.21]:61016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCPha-00022m-Mp; Fri, 25 Dec 2015 05:34:26 -0500 Received: from scdbackup.webframe.org ([79.192.89.52]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0Lx4dh-1aEYGn3CzR-016ivF; Fri, 25 Dec 2015 11:34:24 +0100 Date: Fri, 25 Dec 2015 11:36:24 +0100 From: "Thomas Schmitt" To: grub-devel@gnu.org Subject: Re: grub-mkrescue hfsplus GPT partition is not mountable on Linux Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit References: <567C5654.4060505@gmail.com> In-Reply-To: <567C5654.4060505@gmail.com> Message-Id: <26508584595220407814@scdbackup.webframe.org> X-Provags-ID: V03:K0:Q0QctoltQrh1ODB0hP0i3iAiDSNJkpsMKgSFcDDuIbD5GqOiBG4 LZnfSuN9T8wApx3dHta30O1Hnq3SnzMMWP4/nu5E940Y88pdyxAz+nHznJomh9I/B+KL0uZ OPRPZ4WITRZFj/NsQFZ7cuzvvqhRxFNt9+lYBkk7gE5Os3gN8lehnZ2icMXnA6ndchj07/V 737+5Y9fpwgFSiX8Hmvtg== X-UI-Out-Filterresults: notjunk:1;V01:K0:CC2UEF+nVw0=:tiL6/3r4UDfRjOWHcT8/f8 J+Ll/l5r0WDeehWyROmWT3/LPHAGG54+hRaPCPDe4rtb8ZmJub6VTVgKmDQh4QOtHDWJLsuN0 /9o7Hf66alf3I1en51MkIfb/VXBtIefFmWsT4mMMEm3bJOPqzOlxg2LGmORtb643vmnr9ln9H ljfb3/xlzu0Teay67sPn3IAt0Ai42bMYhj74+miPo8GmAAfAYKtGv+3Eh8lUnzo3J5kk6Lb+S fZ613qbrTcwyMJAsE0JqP25aYcW7n+oDg7CaED3b9qpZI/dBhCRIYI0UH6eUz4Ln3q/li6ufe hOuwS8E/NnBryJ5puBcE2Qd2Opc34feN+AuckO0i37uImfXLxfXnjhDEPEAvXzEHyf5XyttL4 BXeGLskwFKT37xTIWPZnQRXAdo3A5/7KPxviCRb2kOFi9jZ3VHGAsgpBxBQE3v55TusYL/nAn S023H5dvaFE+l0By21JrFbvK6TC/T92ekFSCB2CxWR3enIfrWgU+c16WyEvgNegOi9iO2LfT8 Q5OjKeBHpR2bzBKseFyDE9KCEUiYfWDvr7mmN/Bu+NeizTfy8q8xMrz6QeIUHxZQx6ZZ1w6ku C1h5CXQMXnmgXMX8TPVU5yAcd6FUKCNSb2frdGx3RZYPKwoWKV6ydc0+53Z8kRtIRf01CcHED L1YHpSXPp0f5o7aqe1DWcDXNI/2oh39cmL6i3vYw85r7SZzV+22fXL7UXrLELvy7lF4D4JRnE VX+e73O+H4nTrJw01Ox7bQL8LWNeDh8gPNNE+kVWPFmXT/PBfmvkWbALJyCcR3ePc4AJ2GrbW nb7hkma X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 Cc: bug-xorriso@gnu.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Dec 2015 10:34:33 -0000 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