diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2018-11-22 04:21:11 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2018-11-22 08:24:21 +0100 |
commit | 9f3b9ebfdcebcfc9d202a9e2aa155278c83776f0 (patch) | |
tree | 114137f24f6005d734b980f4b9a01abaab4ce0e4 /perl-install | |
parent | 1c97bdb720c166c3d44b50d414b38dea338c7f99 (diff) | |
download | drakx-9f3b9ebfdcebcfc9d202a9e2aa155278c83776f0.tar drakx-9f3b9ebfdcebcfc9d202a9e2aa155278c83776f0.tar.gz drakx-9f3b9ebfdcebcfc9d202a9e2aa155278c83776f0.tar.bz2 drakx-9f3b9ebfdcebcfc9d202a9e2aa155278c83776f0.tar.xz drakx-9f3b9ebfdcebcfc9d202a9e2aa155278c83776f0.zip |
doc: explain how to support a bootloader
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/bootloader.pm | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 215e70f42..71d50eaa6 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -33,6 +33,50 @@ Example of usage: (...) bootloader::action($bootloader, 'write', $all_hds); +A particular bootloader is handled in separate typical functions that can be called by action() by /sbin/bootloader-config: + + +=head1 VFS aka how to support a bootloader + +Most of the code is generic. + +A particular bootloader implementation/support is done through a couple functions: + +=over 4 + +=item * read_FOOBAR() + +read the config file(s) of the FOOBAR bootloader, returning a $bootloader object + +=item * install_FOOBAR($bootloader, $all_hds) + +usually call write_FOOBAR() & install_raw_FOOBAR() if existing, aka: + +=over 4 + +=item * updating config files + +=item * then reinstalling the bootloader + +=back + +=item * install_raw_FOOBAR() + +Optionnal: Low level installation of the stage1 of the bootloader, usually embedding it in MBR or on ESP, ... (eg: running lilo or /boot/grub*/install.sh) + +=item * write_FOOBAR($bootloader, $all_hds) + +update the config files, ie when a kernel was installed or removed. +when_config_changed_FOOBAR() is called right after in case something is needed when config is done (eg: lilo needs to be reinstalled) + +=item * when_config_changed_FOOBAR() + +Run needed action when config has changed or when initrds were regenerated, ... +Usually nothing for intelligent bootloaders such as grub-legacy or grub2. +But eg: lilo needs to rewrite its stage1 (thus it needs to rerun lilo). + +=back + =head1 Functions =over @@ -2419,6 +2463,8 @@ Calls the C<$action> function with @para parameters: If needed, the function name will be resolved to call a boot loader specific function (eg: for LILO/GRUB/...) +This Swiss army knife function is heavily used by eg /sbin/bootloader-config + =cut sub action { |