===  perl-Bootloader - redone  ===

The script we are talking about is here:

https://github.com/openSUSE/perl-bootloader/blob/test_10/pbl

It replaces both 'bootloader_entry' and 'update-bootloader'.

It currently checks /etc/sysconfig/bootloader::LOADER_TYPE and
  - if "" -> does nothing
  - if /usr/lib/bootloader/$LOADER_TYPE exists, runs scripts from this directry
  - else -> calls old 'bootloader_entry' resp. 'update-bootloader' scripts (for compat)

There are two functions (scripts in $LOADER_TYPE dir) defined:
  - install: install the bootloader (to the disk)
  - config:  update the boot loader config file (e.g. /boot/grub2/grub.cfg)

If a script is missing, it is assumed that it is not necessary to do
anything (that is, it's not considered an error).


There are 2 cases:

(1) if the script is called with '--reinit', then run $LOADER_TYPE/install,
  followed by $LOADER_TYPE/config

(2) else run $LOADER_TYPE/config

Apart from this, the script arguments are ignored.

This basically mirrors what we currently (sle12/factory) do for grub2.

The scripts in /usr/lib/bootloader/ should exit with 0 if ok, else a failure is assumed.
Any output (stdout or stderr) is logged to /var/log/pbl.log.

ibs home:snwint:sle12test/perl-Bootloader has a test package that can be
used as a drop-in replacement for testing.


== What next? ==

Going forward I've had some discussion with Raymund and Michael about how to improve
the current situation.

Issues atm:

- grub2-install: you have to find out and specify --target; that should ideally not
  be necessary
- grub2-install: you have to add an install device or even repeat the call for several
  devices for i386-pc (and only there)
- grub2-install: i386-pc needs some extra options (like --force --skip-fs-probe)
- sometimes you have to call shim

Ideas so far:

- put the exact setup command into /etc/install_grub or so (like grub1)
- put the grub2 platform into /etc/sysconfig/bootloader (say, TARGET=[grub2-]x86_64-efi)

