Project

General

Profile

Actions

Bug #12018

closed

loader.efi: efipart needs better support detecting nested partitions

Added by Toomas Soome almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

This is follow up work for 11938.

Just as disks can have nested partitions, the same happens with cd devices, so we need to detect device paths and make sure we will not mix the handles.

To address this:

We fetch handle array and create linked list of block devices. We walk the list and detect parent devices and set children pd_parent.
For {fd, cd, hd}, we walk device list and pick up our devices and store to corresponding list. We make sure we store parent device first.

For sorting we use 3 steps: We check for floppy, we check for cd and then everything else must be hd.

In general, it seems the floppy devices have no parent.
CD can have both parents and children (multiple boot entries, partitions from the hybrid disk image).

Add exclude filter for unwanted devices. Handle USB and USB/lun devices without media (ignore those devices).

FreeBSD review: https://reviews.freebsd.org/D22553

Testing: I have performed the basic functionality tests on systems I have access to.

Got OK from MBP UEFI 1.10 (with APFS)

Issue itself was spotted on Cisco UCS systems, C200 series, C220M5 and C240M4 and confirmed fixed.


Related issues

Related to illumos gate - Bug #11938: loader.efi: HARDDRIVE_DEVICE_PATH may have subpathsClosedToomas Soome

Actions
Actions #1

Updated by Toomas Soome almost 2 years ago

  • Related to Bug #11938: loader.efi: HARDDRIVE_DEVICE_PATH may have subpaths added
Actions #2

Updated by Toomas Soome almost 2 years ago

  • Description updated (diff)
Actions #3

Updated by Toomas Soome almost 2 years ago

  • Description updated (diff)
Actions #4

Updated by Electric Monk almost 2 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit c54162e4540c6b4eb112c199658a34287d2dc971

commit  c54162e4540c6b4eb112c199658a34287d2dc971
Author: Toomas Soome <tsoome@me.com>
Date:   2019-12-02T15:48:08.000Z

    12018 loader.efi: efipart needs better support detecting nested partitions
    Reviewed by: Matthias Scheler <mscheler@tintri.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF