Bug #12018
closedloader.efi: efipart needs better support detecting nested partitions
100%
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
Updated by Toomas Soome over 2 years ago
- Related to Bug #11938: loader.efi: HARDDRIVE_DEVICE_PATH may have subpaths added
Updated by Electric Monk over 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>