6080 libbe should support installboot

Review Request #77 — Created July 23, 2015 and submitted

tsoome
illumos-gate
6080
78
809de41...
general
6080 libbe should support installboot

dmake lint/git-pbchk, functional test in loader project. Will add actual SPARC results once I get chance to access one.

Tested x86 grub; created test BE and incremented manually its cap version by 1 (to 26). be activate with test be and old be did correctly follow the version check and updated the bootloader+cap file when needed - verified with capability file check and truss traces.

for SPARC test I did port this code to dilos (functional logic is the same) and it does show correct behaviour:
igork: root@srv209:~# truss -f -o truss.txt beadm activate -v dilos-test
igork: ==be_do_installgrub: physpath=/pci@1d,700000/scsi@4/sd@0,0:a
igork: ==physpath:/pci@1d,700000/scsi@4/sd@0,0:a
igork: ==be_do_installboot: /dev/dsk/c1t0d0s0, dev_link:c1t0d0s0
igork: ==be_do_installboot: wholedisk=0
igork: ==be_do_installboot_helper: cmd:
igork: /usr/sbin/installboot -F zfs /tmp/.be.3uaSDa/usr/platform/SUNW,Sun-Blade-2500/lib/fs/zfs/bootblk /dev/rdsk/c1t0d0s0

so even as this sparc test is not 100% exactly the same diff as included here, it does show the logic itself is ok:)

  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
igork
  1. Ship It!
  2. 
      
tsoome
tsoome
tsoome
tsoome
tsoome
alp
  1. Ship It!
  2. 
      
richlowe
  1. 
      
  2. usr/src/lib/libbe/common/be_activate.c (Diff revision 4)
     
     

    doesn't the comment at line 1140 suggest that you're conflating "does not have grub" and "is sparc" here?

    1. it is on purpose and following the same style the libbe is using, the same logic is used to select grub menu.lst updates versus sparc pool/boot/menu.lst updates. it is a bit ugly, but as sparc has no grub and x86 means grub (in fact, be_has_grub() in be_utils.c is implemented to check if its "i386" and nothing more).

    2. Yuck. Seems like that should be fixed (separately) in preparation for the rest of your work, right?

    3. yes and no. this particular spot is. but be_has_grub() itself is still useful for loader project, as it will make it possible to switch to alternate bootloader and then it will have proper semantics.

  3. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...