Project

General

Profile

Bug #11757

installboot: install vbr only when stage2 is installed

Added by Toomas Soome about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

We only should update VBR (volume boot record or partition boot record) when we also update stage2 (gptzfsboot). This is because we do store the stage2 block count in vbr and if it should happen that block count does shrink, the VBR code will read less blocks from stage2 than we actually have.

Also adjust newlines to get more consistent screen output.

Testing done:

unpatched version:

root@test:~# installboot /dev/rdsk/c3t0d0s1

Bootblock version installed on /dev/rdsk/c3t0d0s1 is more recent or identical to
/boot/gptzfsboot
Use -F to override or install without the -u option.

/boot/pmbr will be written to /dev/rdsk/c3t0d0s1
stage1 written to slice 1 sector 0 (abs 524544)

Bootblock version installed on /dev/rdsk/c3t0d0s0 is more recent or identical to
/boot/loader64.efi
Use -F to override or install without the -u option.

Bootblock version installed on /dev/rdsk/c3t0d0s0 is more recent or identical to
/boot/loader32.efi
Use -F to override or install without the -u option.

/boot/pmbr is newer than one in /dev/rdsk/c3t0d0p0
stage1 written to slice 0 sector 0 (abs 0)

Patched version:
root@test:~# ./installboot /dev/rdsk/c3t0d0s1
Bootblock version installed on /dev/rdsk/c3t0d0s1 is more recent or identical to
/boot/gptzfsboot
Use -F to override or install without the -u option.

Bootblock version installed on /dev/rdsk/c3t0d0s0 is more recent or identical to
/boot/loader64.efi
Use -F to override or install without the -u option.

Bootblock version installed on /dev/rdsk/c3t0d0s0 is more recent or identical to
/boot/loader32.efi
Use -F to override or install without the -u option.

/boot/pmbr is newer than one in /dev/rdsk/c3t0d0p0
stage1 written to slice 0 sector 0 (abs 0)

root@test:~# 


Related issues

Related to illumos gate - Bug #11755: loader: command_lsmod does show garbage on screenClosedToomas Soome

Actions
Related to illumos gate - Bug #11634: installboot should support ESP updatesClosedToomas Soome

Actions
#1

Updated by Toomas Soome about 1 year ago

  • Description updated (diff)
#2

Updated by Joshua M. Clulow about 1 year ago

  • Related to Bug #11755: loader: command_lsmod does show garbage on screen added
#3

Updated by Joshua M. Clulow about 1 year ago

  • Related to Bug #11634: installboot should support ESP updates added
#4

Updated by Electric Monk about 1 year ago

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

git commit 9937ff193d3bb6c172dbd734ef4aee613a365d61

commit  9937ff193d3bb6c172dbd734ef4aee613a365d61
Author: Toomas Soome <tsoome@me.com>
Date:   2019-10-02T05:42:08.000Z

    11757 installboot: install vbr only when stage2 is installed
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF