Project

General

Profile

Bug #11634

installboot should support ESP updates

Added by Toomas Soome over 1 year ago. Updated over 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

The /usr/sbin/installboot is doing all the work about installing and updating boot program on boot disk(s), and till now, it is only handling components needed for BIOS boot. Update installboot to also handle UEFI boot program and EFI System Partition (ESP).

The UEFI boot needs pcfs in ESP and directory tree with specific files. Since we do not yet have tools to create and update EFI Boot manager variables, we are providing the ESP:/EFI/Boot directory and bootx64.efi and bootia32.efi files.

The installboot implementation is rewritten greatly to allow more modular approach about handling different boot programs, also updated manual and libbe.so.1 to use added option -b bootdir.

Tested with GPT, MBR+VTOC (with and without extended partition), plain MBR+FAT32 setup. installboot bootprogram install, installboot -i and installboot -M (mirror).

Sample installboot output is listed in https://illumos.org/rb/r/2268/


Related issues

Related to illumos gate - Bug #11757: installboot: install vbr only when stage2 is installedClosedToomas Soome

Actions
#1

Updated by Toomas Soome over 1 year ago

  • Description updated (diff)
#2

Updated by Electric Monk over 1 year ago

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

git commit d7802caee060fef7fc8e8c54b5f61e9efe26ff1e

commit  d7802caee060fef7fc8e8c54b5f61e9efe26ff1e
Author: Toomas Soome <tsoome@me.com>
Date:   2019-09-10T13:31:08.000Z

    11634 installboot should support ESP updates
    Reviewed by: Alexander Eremin <a.eremin@nexenta.com>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

#3

Updated by Joshua M. Clulow over 1 year ago

Testing Notes

root@beastie:/home/tsoome# env BE_PRINT_ERR=true  beadm activate openindiana-2019:08:28
be_do_installboot_walk: child 0 of 1 device raidz1
be_do_installboot_walk: child 0 of 4 device c3t0d0s1
  Command: "/usr/sbin/installboot -m -f -b //boot /dev/rdsk/c3t0d0s1" 
  Output:

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

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

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.
be_do_installboot_walk: child 1 of 4 device c3t1d0s1
  Command: "/usr/sbin/installboot -m -f -b //boot /dev/rdsk/c3t1d0s1" 
  Output:

//boot/gptzfsboot is newer than one in /dev/rdsk/c3t1d0s1
bootblock written for /dev/rdsk/c3t1d0s1, 276 sectors starting at 1024 (abs 525568)
//boot/pmbr is newer than one in /dev/rdsk/c3t1d0s1
stage1 written to slice 1 sector 0 (abs 524544)
//boot/loader64.efi is newer than one in /dev/rdsk/c3t1d0s0
bootblock written to /tmp/ibootsRaare/EFI/Boot/bootx64.efi
bootblock written to /tmp/iboottRaare/EFI/Boot/bootia32.efi
//boot/pmbr is newer than one in /dev/rdsk/c3t1d0p0
stage1 written to slice 0 sector 0 (abs 0)
  Errors:
Error reading bootblock from /tmp/ibootqRaare/EFI/Boot/bootia32.efi
be_do_installboot_walk: child 2 of 4 device c3t3d0s1
  Command: "/usr/sbin/installboot -m -f -b //boot /dev/rdsk/c3t3d0s1" 
  Output:
//boot/gptzfsboot is newer than one in /dev/rdsk/c3t3d0s1
bootblock written for /dev/rdsk/c3t3d0s1, 276 sectors starting at 1024 (abs 525568)
//boot/pmbr is newer than one in /dev/rdsk/c3t3d0s1
stage1 written to slice 1 sector 0 (abs 524544)
//boot/loader64.efi is newer than one in /dev/rdsk/c3t3d0s0
bootblock written to /tmp/ibootE8aire/EFI/Boot/bootx64.efi
//boot/loader32.efi is newer than one in /dev/rdsk/c3t3d0s0
bootblock written to /tmp/ibootF8aire/EFI/Boot/bootia32.efi
//boot/pmbr is newer than one in /dev/rdsk/c3t3d0p0
stage1 written to slice 0 sector 0 (abs 0)
be_do_installboot_walk: child 3 of 4 device c3t4d0s1
  Command: "/usr/sbin/installboot -m -f -b //boot /dev/rdsk/c3t4d0s1" 
  Output:
//boot/gptzfsboot is newer than one in /dev/rdsk/c3t4d0s1
bootblock written for /dev/rdsk/c3t4d0s1, 276 sectors starting at 1024 (abs 525568)
//boot/pmbr is newer than one in /dev/rdsk/c3t4d0s1
stage1 written to slice 1 sector 0 (abs 524544)
//boot/loader64.efi is newer than one in /dev/rdsk/c3t4d0s0
bootblock written to /tmp/iboot.Qaqre/EFI/Boot/bootx64.efi
//boot/loader32.efi is newer than one in /dev/rdsk/c3t4d0s0
bootblock written to /tmp/iboot_Qaqre/EFI/Boot/bootia32.efi
//boot/pmbr is newer than one in /dev/rdsk/c3t4d0p0
stage1 written to slice 0 sector 0 (abs 0)
Activated successfully
root@beastie:/home/tsoome# 
#4

Updated by Joshua M. Clulow over 1 year ago

  • Related to Bug #11757: installboot: install vbr only when stage2 is installed added

Also available in: Atom PDF