[make-initrd] [PATCH v4 1/4] Separate new feature of bootchain-core from pipeline

Arseny Maslennikov arseny at altlinux.org
Wed Oct 13 21:07:23 MSK 2021


On Wed, Oct 13, 2021 at 08:21:28PM +0300, Leonid Krivoshein wrote:
> From: Leonid Krivoshein <klark at altlinux.org>
> 
> Pipeline live as a add-in over bootchain-core for backward
> compatibility with already existing solutions.
> For bootchain-core it is planned to implement a number of
> new features to cover the tasks of bootloading the installer
> and live systems.
> 
> Signed-off-by: Leonid Krivoshein <klark at altlinux.org>
> ---
>  features/bootchain-core/README.md             | 81 +++++++++++++++++++
>  features/bootchain-core/config.mk             |  8 ++
>  .../data/etc/initrd/cmdline.d/bootchain-core} |  3 +-
>  .../data/etc/rc.d/init.d/bootchain}           |  8 +-
>  .../udev/rules.d/50-bootchain-waitdev.rules}  |  2 +-
>  .../data/lib/bootchain}/getimage              |  2 +-
>  .../data/lib/bootchain}/mountfs               |  2 +-
>  .../data/lib/bootchain}/overlayfs             |  2 +-
>  .../data/lib/bootchain}/rootfs                |  2 +-
>  .../data/lib/bootchain}/waitdev               |  4 +-
>  .../data/lib/initrd/cmdline.d/bootchain       |  6 ++
>  .../data/lib/initrd/cmdline.d/pipeline        |  2 +-
>  .../lib/uevent/filters/bootchain-waitdev}     |  4 +-
>  .../data/sbin/bootchain-sh-functions}         | 12 +--
>  .../data/sbin/bootchained}                    | 22 ++---
>  features/bootchain-core/rules.mk              |  4 +
>  features/pipeline/config.mk                   |  9 +--
>  features/pipeline/rules.mk                    |  6 --
>  18 files changed, 133 insertions(+), 46 deletions(-)
>  create mode 100644 features/bootchain-core/README.md
>  create mode 100644 features/bootchain-core/config.mk
>  rename features/{pipeline/data/etc/initrd/cmdline.d/pipeline =>
> bootchain-core/data/etc/initrd/cmdline.d/bootchain-core} (63%)
>  rename features/{pipeline/data/etc/rc.d/init.d/pipeline =>
> bootchain-core/data/etc/rc.d/init.d/bootchain} (83%)
>  rename features/{pipeline/data/etc/udev/rules.d/50-pipeline-waitdev.rules
> => bootchain-core/data/etc/udev/rules.d/50-bootchain-waitdev.rules} (77%)
>  rename features/{pipeline/data/lib/pipeline =>
> bootchain-core/data/lib/bootchain}/getimage (93%)
>  rename features/{pipeline/data/lib/pipeline =>
> bootchain-core/data/lib/bootchain}/mountfs (91%)
>  rename features/{pipeline/data/lib/pipeline =>
> bootchain-core/data/lib/bootchain}/overlayfs (95%)
>  rename features/{pipeline/data/lib/pipeline =>
> bootchain-core/data/lib/bootchain}/rootfs (86%)
>  rename features/{pipeline/data/lib/pipeline =>
> bootchain-core/data/lib/bootchain}/waitdev (83%)
>  create mode 100755
> features/bootchain-core/data/lib/initrd/cmdline.d/bootchain
>  rename features/{pipeline =>
> bootchain-core}/data/lib/initrd/cmdline.d/pipeline (64%)
>  rename features/{pipeline/data/lib/uevent/filters/pipeline-waitdev =>
> bootchain-core/data/lib/uevent/filters/bootchain-waitdev} (77%)
>  rename features/{pipeline/data/sbin/pipeline-sh-functions =>
> bootchain-core/data/sbin/bootchain-sh-functions} (70%)
>  rename features/{pipeline/data/sbin/pipelined =>
> bootchain-core/data/sbin/bootchained} (78%)

Should we call it /sbin/bootchained? It is not chained. :)
Why not /sbin/bootchaind?

>  create mode 100644 features/bootchain-core/rules.mk
> 
> diff --git a/features/bootchain-core/README.md
> b/features/bootchain-core/README.md
> new file mode 100644
> index 0000000..e4b87d6
> --- /dev/null
> +++ b/features/bootchain-core/README.md
> @@ -0,0 +1,81 @@
> +# Feature: bootchain-core
> +
> +`bootchain-core` - it's a fork and further development the original
> +feature of `pipeline`. This feature allow us to consistently setup
> +steps-scripts one by one. For details about `pipeline` you can see
> +in ../features/pipeline/README.md.
> +
> +In fork process `pipeline` was divided by three parts:
> +
> +- `bootchain-core` - the main functional of feature `pipeline`, common
> +  API and daemon.
> +- `bootchain-getimage` - method to networking boot from ISO-image with
> +  the wget utility.
> +- `bootchain-waitdev` - method to boot from specified local media.
> +
> +The future work with `bootchain` allowed us to create a few modules.
> +They are expected to be upstream soon. This divide on modules allow
> +us to optimize fill in `initramfs` only which we are need.
> +
> +## Main components of bootchain-core
> +
> +- `/sbin/bootchain-sh-functions` - common API and evolution
> +  of `pipeline-sh-functions`.
> +- `/sbin/bootchained` - daemon, evolution of `pipelined`.
> +- `/etc/rc.d/init.d/bootchain` - sysvinit start script.
> +
> +## Reasons of making fork and rename pipeline
> +
> <...>
> +
> +## External elements of the bootchain (steps-scripts)
> +
> +- `mountfs` - mounts a file or device from the result of the previous or
> other
> +  specified step.
> +- `overlayfs` - combines one or more elements of the boot chain using
> overlayfs.
> +- `rootfs` - forces the daemon to use the result of the previous element as
> the
> +  found root of stage 2.
> +
> +## Boot parameters
> +
> +- `bootchain=name1[,name2][,name3]` - defines the initial state of the boot
> +  chains, i.e. the steps that the daemon must go through one by one. These
> can
> +  be both built-in pseudo-steps and real scripts of the actions performed.

Можно ли будет при желании писать свои стадии и включать их в свои
initramfs? Т. е. мы рекомендуем администраторам держать при себе личные
расширения или апстримить их функциональность?

> The
> +  names these steps are listed separated by commas.
> +- `pipeline=name1[,name2][,name3]` - alias for `bootchain=...`.
> +- `mountfs=target` - specifies the file or device to be mounted.
> +- `overlayfs=list` - defines the list of elements to combine.
> +
> +## bootchain-sh-functions API
> +
<...>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.altlinux.org/pipermail/make-initrd/attachments/20211013/97079059/attachment.bin>


More information about the Make-initrd mailing list