Project

General

Profile

Actions

Bug #13974

closed

gptzfsboot: fall back device name is always disk-1:

Added by Toomas Soome 2 months ago. Updated 2 months ago.

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

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

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

Actions #1

Updated by Toomas Soome 2 months ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk 2 months ago

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

git commit 5dfe3bc3a91b2e1069f643e17f6213f089f5979b

commit  5dfe3bc3a91b2e1069f643e17f6213f089f5979b
Author: Toomas Soome <tsoome@me.com>
Date:   2021-07-30T09:14:00.000Z

    13974 gptzfsboot: fall back device name is always disk-1:
    Reviewed by: C Fraire <cfraire@me.com>
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>

Actions

Also available in: Atom PDF