grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: phantom drives in GRUB on Apple Macbook Pro


From: Toomas Soome
Subject: Re: phantom drives in GRUB on Apple Macbook Pro
Date: Sat, 30 Nov 2019 22:53:21 +0200


> On 30. Nov 2019, at 22:41, Chris Murphy <address@hidden> wrote:
> 
> On Sat, Nov 30, 2019 at 11:47 AM Toomas Soome via Grub-devel
> <address@hidden> wrote:
> 
>> APFS is not just stand alone partition, APFS is container for subvolumes 
>> (vendor media paths) - like having partition table inside the partition. It 
>> sounds like grub is sorting them out wrong.
> 
> Perhaps. But I'd expect the firmware pre-boot environment can become
> aware of the container nature of APFS only if an APFS driver is
> loaded. Based on the "EFI jumpstart" description in the Apple File
> System Reference, I'm not sure if it is:
> 
> "A partition formatted using the Apple File System contains an
> embedded EFI driver thatʼs used to boot a machine from
> that partition."

It is not that simple. To access block device, you need to get handle, and 
unfortunately you get handles for *all* block devices. And you have no way to 
tell “please only give me handles for hard disks”.  So we need to identify 
those handles and use ones we know how to use. Unfortunately this 
identification is empirical and therefore prone to errors.


> 
> That section describes the minimal steps needed to locate and load
> Apple's APFS EFI driver from within an APFS formatted partition. It's
> plausible that this jumpstart is skipped if the first boot entry in
> NVRAM is not APFS, and the referenced EFI file is found and loadable -
> which is the case in this situation. NVRAM first boot entry points to
> grubx64.efi. And even if an APFS EFI driver is loaded, I'm not sure if
> GRUB's ls command is expected to be able to read APFS volumes and
> subvolumes?

there is no apfs driver in grub2 source tree.

> 
> When I do 'ls (hdX)/' I consistently get an error from
> efidisk.c:602:failure reading sector 0x80 for each of hd0, hd1, hd2,
> hd3. For hd4 I get a different error which is fs.c:120:unknown file
> system.
> 


ya that depends on how grub is performing the device, partitioning and file 
system probing.

rgds,
toomas


reply via email to

[Prev in Thread] Current Thread [Next in Thread]