Re: GRUB bug with Btrfs multiple devices

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

 



30.11.2019 19:31, Chris Murphy пишет:
On Sat, Nov 30, 2019 at 12:31 AM Andrei Borzenkov <arvidjaar@xxxxxxxxx> wrote:

30.11.2019 00:11, Chris Murphy пишет:
On Fri, Nov 29, 2019 at 1:50 PM Andrei Borzenkov <arvidjaar@xxxxxxxxx> wrote:

27.11.2019 02:53, Chris Murphy пишет:

The storage is one CD-ROM drive and one SSD drive. That's it. So I
don't know why there's hd2 and hd3, it seems like GRUB is confused
about how many drives there are, but that pre-dates this problem.


grub enumerates what EFI provides. What "lsefi" in grub says?

https://photos.app.goo.gl/pBxLJNdbzz6J9Vo56


These are vendor media device paths handles that are children of (some)
disk partitions. GRUB already tries to skip such handles:


        /* Ghosts proudly presented by Apple.  */
        if (GRUB_EFI_DEVICE_PATH_TYPE (dp) == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE
            && GRUB_EFI_DEVICE_PATH_SUBTYPE (dp)
            == GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE)
          {
            grub_efi_vendor_device_path_t *vendor =
(grub_efi_vendor_device_path_t *) dp;
            const struct grub_efi_guid apple = GRUB_EFI_VENDOR_APPLE_GUID;

            if (vendor->header.length == sizeof (*vendor)
                && grub_memcmp (&vendor->vendor_guid, &apple,
                                sizeof (vendor->vendor_guid)) == 0
                && find_parent_device (devices, d))
              continue;
          }

but these have different GUID. Google search comes with something
hinting on Apple still (like
https://www.macos86.it/topic/1136-asus-x202e-hm76-vs-n56vb-hm76/page/2/?tab=comments#comment-31186).
   Device paths look like

PciRoot(0x0)\Pci(0x1F,0x2)\Sata(0x0,0xFFFF,0x0)\HD(4,GPT,A640EF60-F7E9-4945-81A9-B04CCE53EE97,0x176F4800,0x482FC88)\VenMedia(BE74FCF7-0B7C-49F3-9147-01F4042E6842,4F20CFA89785973FAAF730597BFC41BA)

where vendor GUID is BE74FCF7-0B7C-49F3-9147-01F4042E6842

So we have hard disk, then partition as child and then this vendor media
as child of partition.

This should certainly be reported to grub list. What system is it - is
it Apple?

Yes. Macbook Pro 8,2 (2011). I'll report the phantom device problem to
grub-devel@

But still an open question is what's the instigator or secondary
factor because this wasn't happening before adding an unused but
already existing partition as a 2nd Btrfs device.

GRUB is normally using hints - grub-install (and grub-mkconfig) tries to guess firmware device name. At boot time grub tries to access hinted device first, if it succeeds, it does not try anything else. With second btrfs partition grub needs to find second device at boot time so it now probes everything and hits those vendor media devices.

At least this explains what you see as well as ...

Last time this
happened, all I did was remove the 2nd device and the problem went
away.

... this.

If you go in grub shell in this state (without errors), do you see those ghost devices?

I'm ready to try that again (remove the 2nd device) and see if
the problem goes away, but has enough information been collected about
the present state?



If you are reasonably sure that all errors are related to those phantom devices - I would say yes, the reason for these phantom devices to exist is already clear.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux