gptzfsboot: fall back device name is always disk-1:
When things go wrong and gptzfsboot fails to identify boot device/file system, it does attempt to set diskX: as fall back device name. It most likely wont work, but we still get boot disk name for boot: prompt.
Unfortunately, it is attempting to use bd_bios2unit() call to set disk name, but this call is not ready (disk list is not yet built) at this early startup time and will return -1.
When for some reason we fail to access root file system, gptzfsboot will attempt to use fallback device name - disk name without partition part. Because bd_bios2unit() returns -1, with current code, we will have disk name "disk-1:", which is rather confusing. The fix is to use boot disk id number instead.
Note, this fallback disk name does not help us to boot, but at least it is telling us, which disk device was attempted to be used.
Testing done: build/install/boot
Updated by Electric Monk 2 months ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
commit 5dfe3bc3a91b2e1069f643e17f6213f089f5979b Author: Toomas Soome <firstname.lastname@example.org> Date: 2021-07-30T09:14:00.000Z 13974 gptzfsboot: fall back device name is always disk-1: Reviewed by: C Fraire <email@example.com> Reviewed by: Andy Fiddaman <firstname.lastname@example.org> Approved by: Hans Rosenfeld <email@example.com>