Project

General

Profile

Actions

Bug #9167

closed

gptzfsboot and zfsloader can't find slices inside PTABLE_VTOC label after 9099

Added by Bill Sommerfeld almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
bootloader
Start date:
2018-02-21
Due date:
% Done:

100%

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

Description

The fix for Issue 9099 introduced a regression that broke booting on a system of mine; gptzfsboot can no longer find /boot/zfsloader inside a slice of a MBR partition with a PTABLE_VTOC label inside it.

There are two varieties of Solaris VTOC disk labels; the boot code classifies them as "PTABLE_VTOC" (with 16 slices) and "PTABLE_VTOC8" (with 8). I'm uncertain of the history here but I believe the 8-slice version goes back to pre-solaris SunOS and the 16-slice version is from svr4 and was only used on solaris x86.

The system in question boots from either of a pair of ssds with an MBR in disk sector 0 which specifies a single primary partition starting at "cylinder 1"; the primary partition contains the VTOC. One slice in the VTOC contains one side of the root zfs pool; other slices contain cache and slog devices for a different pool.

31898fe72 added tests for PTABLE_VTOC8 (but not PTABLE_VTOC) in three places before recursing into the partitions identified by the label.

My system had "PTABLE_VTOC" labels and booted fine before this change.

I believe the fix is to allow PTABLE_VTOC as well as PTABLE_VTOC8 in all three places touched in 31898fe72; when I made that change and rebuilt & installed the resulting zfsloader and gptzfsboot I was able to boot again.

Workaround is to follows the model found here: "Workaround 2" here: https://wiki.openindiana.org/oi/MBR+reinstall+after+illumos+loader+update :
boot from a usb stick with bootblocks before 9099 (oi-hipster 2017.10 usb minimal image worked for me), escape out of the menu and use beadm activate to select the desired pool and root filesystem.
To make it stick, before re-running bootadm install-bootloader, copy the working gptzfsboot and zfsloader from /boot on the USB stick into /boot in the root filesystem of the BE

Marking "Urgent" because the change in 31898fe72 renders working systems unbootable.


Related issues

Related to OpenIndiana Distribution - Bug #9183: pkg update in newly installed OI renders system unbootableResolved2018-02-23

Actions
Actions #1

Updated by Toomas Soome almost 6 years ago

  • Status changed from New to In Progress
  • Assignee set to Toomas Soome
  • % Done changed from 0 to 90
  • Tags deleted (needs-triage)
Actions #2

Updated by Tony Albers almost 6 years ago

  • Related to Bug #9183: pkg update in newly installed OI renders system unbootable added
Actions #3

Updated by Electric Monk almost 6 years ago

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

git commit 1cfad7ce453b4a7fce6acafb641bef8702579395

commit  1cfad7ce453b4a7fce6acafb641bef8702579395
Author: Toomas Soome <tsoome@me.com>
Date:   2018-02-23T15:37:24.000Z

    9167 gptzfsboot and zfsloader can't find slices inside PTABLE_VTOC label after 9099
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Bill Sommerfeld <sommerfeld@alum.mit.edu>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF