Make-initrd development discussion
 help / color / mirror / Atom feed
* [make-initrd] [PATCH v4 1/4] Separate new feature of bootchain-core from pipeline
@ 2021-10-13 17:21 Leonid Krivoshein
  2021-10-13 18:07 ` Arseny Maslennikov
  0 siblings, 1 reply; 5+ messages in thread
From: Leonid Krivoshein @ 2021-10-13 17:21 UTC (permalink / raw)
  To: make-initrd

From: Leonid Krivoshein <klark@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@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%)
  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
+
+- A set of `bootchain` modules was developed in order to create a
+  replacement in stage1 programs `propagator`, fully integrated into
+  the run-time `make-initrd`. In the original version, the `pipeline`
+  feature did not satisfy this need. At an early stage of development,
+  it was not yet known what functionality `bootchain` would eventually
+  have, how far it would go from the fork and be able to whether to be
+  fully compatible with it.
+- For some time, the development of `bootchain` was carried out 
independently
+  of the main project `make-initrd`. To build and test bootable disks with
+  `make-initrd` and `bootchain` so that `bootchain` does not depend on
+  `make-initrd` versions, so that not intersect with the `pipeline` 
features
+  built into the `make-initrd` and so as not to interfere the author of
+  `make-initrd`, the `pipeline` feature had to be copied under a different
+  name, giving it a more appropriate name at the same time.
+- The result of the completed step is not always used next. Steps-scripts
+  they can use the results not only of the previous one, but also of any
+  earlier one the completed step. So it's not a pipeline in its purest
+  form, but rather a chain loading steps, the sequence of actions 
performed.
+
+## 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. 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
+
+- check_parameter() - checks that the required parameter is not empty, 
otherwise
+  it exits via fatal().
+- get_parameter() - outputs the value of the parameter of the current 
step by
+  the index $callnum.
+- resolve_target() - output the path to a file, directory or device, 
depending
+  on from the parameter.
+
+## Example
+
+Cmdline: root=pipeline pipeline=getimage,mountfs,overlayfs,rootfs 
getimage=http://ftp.altlinux.org/pub/people/mike/iso/misc/vi-20140918-i586.iso 
mountfs=rescue
+
+Following these parameters, the daemon loads the image 
"vi-20140918-i586.iso",
+mounts it via the loop device, mounts the "rescue" file from it as 
squashfs of
+the root system, makes it writable using overlayfs and tries to boot 
from it.
diff --git a/features/bootchain-core/config.mk 
b/features/bootchain-core/config.mk
new file mode 100644
index 0000000..33e66ed
--- /dev/null
+++ b/features/bootchain-core/config.mk
@@ -0,0 +1,8 @@
+$(call feature-requires,depmod-image add-udev-rules)
+
+BOOTCHAIN_CORE_DATADIR = $(FEATURESDIR)/bootchain-core/data
+
+BOOTCHAIN_CORE_RULES = \
+	*-cdrom_id.rules
+
+BOOTCHAIN_CORE_MODULES = isofs squashfs overlay
diff --git a/features/pipeline/data/etc/initrd/cmdline.d/pipeline 
b/features/bootchain-core/data/etc/initrd/cmdline.d/bootchain-core
similarity index 63%
rename from features/pipeline/data/etc/initrd/cmdline.d/pipeline
rename to features/bootchain-core/data/etc/initrd/cmdline.d/bootchain-core
index 4200d57..8af3a20 100644
--- a/features/pipeline/data/etc/initrd/cmdline.d/pipeline
+++ b/features/bootchain-core/data/etc/initrd/cmdline.d/bootchain-core
@@ -1,4 +1,5 @@
-register_parameter string PIPELINE
+register_parameter string BOOTCHAIN
+register_alias BOOTCHAIN PIPELINE
  register_array string GETIMAGE
  register_array string MOUNTFS
  register_array string OVERLAYFS
diff --git a/features/pipeline/data/etc/rc.d/init.d/pipeline 
b/features/bootchain-core/data/etc/rc.d/init.d/bootchain
similarity index 83%
rename from features/pipeline/data/etc/rc.d/init.d/pipeline
rename to features/bootchain-core/data/etc/rc.d/init.d/bootchain
index 89d9de5..1e95e7d 100755
--- a/features/pipeline/data/etc/rc.d/init.d/pipeline
+++ b/features/bootchain-core/data/etc/rc.d/init.d/bootchain
@@ -1,6 +1,6 @@
  #!/bin/bash
  ### BEGIN INIT INFO
-# Provides:            pipeline
+# Provides:            bootchain
  # Required-Start:      uevent udev
  # Should-Start:
  # Required-Stop:
@@ -13,14 +13,14 @@
  . /.initrd/initenv
  . /etc/init.d/template
  -NAME=pipelined
+NAME=bootchained
  PIDFILE="/var/run/$NAME.pid"
  ARGS="--lockfile $LOCKFILE --pidfile $PIDFILE --name $NAME 
--displayname $NAME"
   prepare() {
  	local dir i n
  -	dir=/.initrd/pipeline/waitdev
+	dir=/.initrd/bootchain/waitdev
  	mkdir -p -- "$dir"
   	i=0
@@ -32,7 +32,7 @@ prepare() {
   start() {
  	RETVAL=0
-	if [ "${ROOT-}" = pipeline ]; then
+	if [ "${ROOT-}" = bootchain ] || [ "${ROOT-}" = pipeline ]; then
  		prepare
  		start_daemon --background $ARGS "$NAME"
  		RETVAL=$?
diff --git 
a/features/pipeline/data/etc/udev/rules.d/50-pipeline-waitdev.rules 
b/features/bootchain-core/data/etc/udev/rules.d/50-bootchain-waitdev.rules
similarity index 77%
rename from 
features/pipeline/data/etc/udev/rules.d/50-pipeline-waitdev.rules
rename to 
features/bootchain-core/data/etc/udev/rules.d/50-bootchain-waitdev.rules
index e473deb..e4b8616 100644
--- a/features/pipeline/data/etc/udev/rules.d/50-pipeline-waitdev.rules
+++ 
b/features/bootchain-core/data/etc/udev/rules.d/50-bootchain-waitdev.rules
@@ -1 +1 @@
-SUBSYSTEM=="block", ACTION!="remove", 
RUN+="/lib/uevent/filters/pipeline-waitdev"
+SUBSYSTEM=="block", ACTION!="remove", 
RUN+="/lib/uevent/filters/bootchain-waitdev"
diff --git a/features/pipeline/data/lib/pipeline/getimage 
b/features/bootchain-core/data/lib/bootchain/getimage
similarity index 93%
rename from features/pipeline/data/lib/pipeline/getimage
rename to features/bootchain-core/data/lib/bootchain/getimage
index 409ad14..1f141ac 100755
--- a/features/pipeline/data/lib/pipeline/getimage
+++ b/features/bootchain-core/data/lib/bootchain/getimage
@@ -1,6 +1,6 @@
  #!/bin/bash -efu
  -. pipeline-sh-functions
+. bootchain-sh-functions
   check_parameter GETIMAGE
  url="$(get_parameter GETIMAGE)"
diff --git a/features/pipeline/data/lib/pipeline/mountfs 
b/features/bootchain-core/data/lib/bootchain/mountfs
similarity index 91%
rename from features/pipeline/data/lib/pipeline/mountfs
rename to features/bootchain-core/data/lib/bootchain/mountfs
index d15ae91..45ffa68 100755
--- a/features/pipeline/data/lib/pipeline/mountfs
+++ b/features/bootchain-core/data/lib/bootchain/mountfs
@@ -1,6 +1,6 @@
  #!/bin/bash -efu
  -. pipeline-sh-functions
+. bootchain-sh-functions
   check_parameter MOUNTFS
  param="$(get_parameter MOUNTFS)"
diff --git a/features/pipeline/data/lib/pipeline/overlayfs 
b/features/bootchain-core/data/lib/bootchain/overlayfs
similarity index 95%
rename from features/pipeline/data/lib/pipeline/overlayfs
rename to features/bootchain-core/data/lib/bootchain/overlayfs
index 23b869b..58261cc 100755
--- a/features/pipeline/data/lib/pipeline/overlayfs
+++ b/features/bootchain-core/data/lib/bootchain/overlayfs
@@ -1,6 +1,6 @@
  #!/bin/bash -efu
  -. pipeline-sh-functions
+. bootchain-sh-functions
   target="$(get_parameter OVERLAYFS)"
  diff --git a/features/pipeline/data/lib/pipeline/rootfs 
b/features/bootchain-core/data/lib/bootchain/rootfs
similarity index 86%
rename from features/pipeline/data/lib/pipeline/rootfs
rename to features/bootchain-core/data/lib/bootchain/rootfs
index e4b2ca9..6ac64a6 100755
--- a/features/pipeline/data/lib/pipeline/rootfs
+++ b/features/bootchain-core/data/lib/bootchain/rootfs
@@ -1,6 +1,6 @@
  #!/bin/bash -efu
  -. pipeline-sh-functions
+. bootchain-sh-functions
   [ -n "$prevdir" ] ||
  	fatal "no previous step to use as rootfs"
diff --git a/features/pipeline/data/lib/pipeline/waitdev 
b/features/bootchain-core/data/lib/bootchain/waitdev
similarity index 83%
rename from features/pipeline/data/lib/pipeline/waitdev
rename to features/bootchain-core/data/lib/bootchain/waitdev
index f818cc5..74af6ea 100755
--- a/features/pipeline/data/lib/pipeline/waitdev
+++ b/features/bootchain-core/data/lib/bootchain/waitdev
@@ -1,12 +1,12 @@
  #!/bin/bash -efu
  -. pipeline-sh-functions
+. bootchain-sh-functions
   check_parameter WAITDEV
  devspec="$(get_parameter WAITDEV)"
   while [ -n "$devspec" ]; do
-	envfile="/.initrd/pipeline/waitdev/$callnum"
+	envfile="/.initrd/bootchain/waitdev/$callnum"
   	if [ -s "$envfile" ]; then
  		devfile=
diff --git a/features/bootchain-core/data/lib/initrd/cmdline.d/bootchain 
b/features/bootchain-core/data/lib/initrd/cmdline.d/bootchain
new file mode 100755
index 0000000..b692f6d
--- /dev/null
+++ b/features/bootchain-core/data/lib/initrd/cmdline.d/bootchain
@@ -0,0 +1,6 @@
+#!/bin/bash -efu
+
+. /.initrd/initenv
+
+[ "${ROOT-}" != bootchain ] ||
+	echo bootchain > /etc/initrd/method
diff --git a/features/pipeline/data/lib/initrd/cmdline.d/pipeline 
b/features/bootchain-core/data/lib/initrd/cmdline.d/pipeline
similarity index 64%
rename from features/pipeline/data/lib/initrd/cmdline.d/pipeline
rename to features/bootchain-core/data/lib/initrd/cmdline.d/pipeline
index ac65b68..21b164c 100755
--- a/features/pipeline/data/lib/initrd/cmdline.d/pipeline
+++ b/features/bootchain-core/data/lib/initrd/cmdline.d/pipeline
@@ -3,4 +3,4 @@
  . /.initrd/initenv
   [ "${ROOT-}" != pipeline ] ||
-	echo pipeline > /etc/initrd/method
+	echo bootchain > /etc/initrd/method
diff --git a/features/pipeline/data/lib/uevent/filters/pipeline-waitdev 
b/features/bootchain-core/data/lib/uevent/filters/bootchain-waitdev
similarity index 77%
rename from features/pipeline/data/lib/uevent/filters/pipeline-waitdev
rename to features/bootchain-core/data/lib/uevent/filters/bootchain-waitdev
index d975006..272aee7 100755
--- a/features/pipeline/data/lib/uevent/filters/pipeline-waitdev
+++ b/features/bootchain-core/data/lib/uevent/filters/bootchain-waitdev
@@ -3,8 +3,8 @@
  . /.initrd/initenv
  . initrd-sh-functions
  -mkdir -p -- /.initrd/pipeline/waitdev
-cd /.initrd/pipeline/waitdev
+mkdir -p -- /.initrd/bootchain/waitdev
+cd /.initrd/bootchain/waitdev/
   i=0
  while [ "$i" -lt "${WAITDEV:-0}" ]; do
diff --git a/features/pipeline/data/sbin/pipeline-sh-functions 
b/features/bootchain-core/data/sbin/bootchain-sh-functions
similarity index 70%
rename from features/pipeline/data/sbin/pipeline-sh-functions
rename to features/bootchain-core/data/sbin/bootchain-sh-functions
index 662d069..fa6201f 100644
--- a/features/pipeline/data/sbin/pipeline-sh-functions
+++ b/features/bootchain-core/data/sbin/bootchain-sh-functions
@@ -1,13 +1,13 @@
  #!/bin/bash -efu
  -if [ -z "${__pipeline_sh_functions-}" ]; then
-__pipeline_sh_functions=1
+if [ -z "${__bootchain_sh_functions-}" ]; then
+__bootchain_sh_functions=1
   . /.initrd/initenv
  . shell-signal
  -handlerdir="/lib/pipeline"
-mntdir="/dev/pipeline"
+handlerdir=/lib/bootchain
+[ "${ROOT-}" = pipeline ] && mntdir=/dev/pipeline || mntdir=/dev/bootchain
   check_parameter()
  {
@@ -29,7 +29,7 @@ resolve_target()
  		'')
  			;;
  		pipe[0-9]|pipe[0-9][0-9]|pipe[0-9][0-9][0-9])
-			target="$mntdir/dst/$target"
+			target="$mntdir/dst/step${target:4}"
  			;;
  		*)
  			if [ -z "${prevdir-}" ]; then
@@ -48,4 +48,4 @@ run()
  	"$@"
  }
  -fi # __pipeline_sh_functions
+fi # __bootchain_sh_functions
diff --git a/features/pipeline/data/sbin/pipelined 
b/features/bootchain-core/data/sbin/bootchained
similarity index 78%
rename from features/pipeline/data/sbin/pipelined
rename to features/bootchain-core/data/sbin/bootchained
index 1d30061..d401101 100755
--- a/features/pipeline/data/sbin/pipelined
+++ b/features/bootchain-core/data/sbin/bootchained
@@ -21,7 +21,7 @@ exit_handler()
  set_cleanup_handler exit_handler
  echo "$$" >"$pidfile"
  -. pipeline-sh-functions
+. bootchain-sh-functions
    [ "${RDLOG-}" != 'console' ] ||
@@ -35,22 +35,22 @@ mkdir -p -- "$mntdir"
  mountpoint -q "$mntdir" ||
  	mount -t tmpfs tmpfs "$mntdir" ||:
  -pipenum=0
-pipe="$PIPELINE"
+stepnum=0
+chainsteps="$BOOTCHAIN"
  datadir=
  destdir=
  -while [ -n "$pipe" ]; do
-	name="${pipe%%,*}"
+while [ -n "$chainsteps" ]; do
+	name="${chainsteps%%,*}"
  	exe="$handlerdir/$name"
   	if [ -x "$exe" ]; then
  		eval "callnum=\"\${callnum_$name:-0}\""
  -		datadir="$mntdir/src/pipe$pipenum"
-		destdir="$mntdir/dst/pipe$pipenum"
+		datadir="$mntdir/src/step$stepnum"
+		destdir="$mntdir/dst/step$stepnum"
  -		[ "$pipenum" != 0 ] ||
+		[ "$stepnum" != 0 ] ||
  			prevdir=""
   		mkdir -p -- "$datadir" "$destdir"
@@ -80,8 +80,8 @@ while [ -n "$pipe" ]; do
  		eval "callnum_$name=\"\$callnum\""
  	fi
  -	pipe="${pipe#$name}"
-	pipe="${pipe#,}"
+	chainsteps="${chainsteps#$name}"
+	chainsteps="${chainsteps#,}"
  -	pipenum=$(($pipenum + 1))
+	stepnum=$(($stepnum + 1))
  done
diff --git a/features/bootchain-core/rules.mk 
b/features/bootchain-core/rules.mk
new file mode 100644
index 0000000..724a0b0
--- /dev/null
+++ b/features/bootchain-core/rules.mk
@@ -0,0 +1,4 @@
+MODULES_TRY_ADD += $(BOOTCHAIN_CORE_MODULES)
+
+PUT_UDEV_RULES += $(BOOTCHAIN_CORE_RULES)
+PUT_FEATURE_DIRS += $(BOOTCHAIN_CORE_DATADIR)
diff --git a/features/pipeline/config.mk b/features/pipeline/config.mk
index 9172528..3ff29ac 100644
--- a/features/pipeline/config.mk
+++ b/features/pipeline/config.mk
@@ -1,8 +1 @@
-$(call feature-requires,depmod-image add-udev-rules)
-
-PIPELINE_DATADIR = $(FEATURESDIR)/pipeline/data
-
-PIPELINE_RULES = \
-	*-cdrom_id.rules
-
-PIPELINE_MODULES = isofs squashfs overlay
+$(call feature-requires,bootchain-core)
diff --git a/features/pipeline/rules.mk b/features/pipeline/rules.mk
index 3ccd260..e69de29 100644
--- a/features/pipeline/rules.mk
+++ b/features/pipeline/rules.mk
@@ -1,6 +0,0 @@
-MODULES_TRY_ADD += $(PIPELINE_MODULES)
-
-PUT_UDEV_RULES += $(PIPELINE_RULES)
-
-PUT_FEATURE_DIRS  += $(PIPELINE_DATADIR)
-PUT_FEATURE_FILES += $(PIPELINE_FILES)
-- 
2.24.1




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [make-initrd] [PATCH v4 1/4] Separate new feature of bootchain-core from pipeline
  2021-10-13 17:21 [make-initrd] [PATCH v4 1/4] Separate new feature of bootchain-core from pipeline Leonid Krivoshein
@ 2021-10-13 18:07 ` Arseny Maslennikov
  2021-10-13 18:26   ` Alexey Gladkov
  2021-10-15 21:58   ` Leonid Krivoshein
  0 siblings, 2 replies; 5+ messages in thread
From: Arseny Maslennikov @ 2021-10-13 18:07 UTC (permalink / raw)
  To: make-initrd

[-- Attachment #1: Type: text/plain, Size: 6010 bytes --]

On Wed, Oct 13, 2021 at 08:21:28PM +0300, Leonid Krivoshein wrote:
> From: Leonid Krivoshein <klark@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@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
> +
<...>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [make-initrd] [PATCH v4 1/4] Separate new feature of bootchain-core from pipeline
  2021-10-13 18:07 ` Arseny Maslennikov
@ 2021-10-13 18:26   ` Alexey Gladkov
  2021-10-13 18:55     ` Leonid Krivoshein
  2021-10-15 21:58   ` Leonid Krivoshein
  1 sibling, 1 reply; 5+ messages in thread
From: Alexey Gladkov @ 2021-10-13 18:26 UTC (permalink / raw)
  To: make-initrd

On Wed, Oct 13, 2021 at 09:07:23PM +0300, Arseny Maslennikov wrote:
> On Wed, Oct 13, 2021 at 08:21:28PM +0300, Leonid Krivoshein wrote:
> > From: Leonid Krivoshein <klark@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@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. :)

Good catch! :)

> Why not /sbin/bootchaind?

You guys can choose the name that seems right to you. I mean we can call
it "chaind". without "boot" prefix.

> >  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
> > +
> <...>

-- 
Rgrds, legion



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [make-initrd] [PATCH v4 1/4] Separate new feature of bootchain-core from pipeline
  2021-10-13 18:26   ` Alexey Gladkov
@ 2021-10-13 18:55     ` Leonid Krivoshein
  0 siblings, 0 replies; 5+ messages in thread
From: Leonid Krivoshein @ 2021-10-13 18:55 UTC (permalink / raw)
  To: make-initrd



13.10.2021 21:26, Alexey Gladkov пишет:
> On Wed, Oct 13, 2021 at 09:07:23PM +0300, Arseny Maslennikov wrote:
>> On Wed, Oct 13, 2021 at 08:21:28PM +0300, Leonid Krivoshein wrote:
>>> From: Leonid Krivoshein <klark@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@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. :)
> Good catch! :)

Неоднократно порывался переименовать по всем правилам, но как же дань 
Наутилусу? Ведь шаги и правда связаны одной цепью и цель у демона одна 
-- rootfs stage2! :-)


>> Why not /sbin/bootchaind?
> You guys can choose the name that seems right to you. I mean we can call
> it "chaind". without "boot" prefix.

Понял, придётся переименовать по всем исходникам и документации. К 
сожалению, таких косяков в сообщениях, наименованиях, тем более в 
переводах с моей стороны может быть много, английский совсем не мой 
родной язык.


>>>   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
>>> +
>> <...>

-- 
Best regards,
Leonid Krivoshein.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [make-initrd] [PATCH v4 1/4] Separate new feature of bootchain-core from pipeline
  2021-10-13 18:07 ` Arseny Maslennikov
  2021-10-13 18:26   ` Alexey Gladkov
@ 2021-10-15 21:58   ` Leonid Krivoshein
  1 sibling, 0 replies; 5+ messages in thread
From: Leonid Krivoshein @ 2021-10-15 21:58 UTC (permalink / raw)
  To: make-initrd


13.10.2021 21:07, Arseny Maslennikov пишет:
> Можно ли будет при желании писать свои стадии и включать их в свои
> initramfs? Т. е. мы рекомендуем администраторам держать при себе личные
> расширения или апстримить их функциональность?

К сказанному Алексеем сложно что-то добавить. Разве что вся связка 
bootchain/altboot уже сделана модульно, более 10-12 пакетов "bootchain" 
предлагается постепенно заапстримить и в некоторых есть по несколько 
шагов. Все методы загрузки отделены (nfs, cifs, cdrom/disk), ещё 
планируется отделить http/ftp в bootchain-curl. В отдельный под-пакетет 
вынесена функциональность "live-rw", создающая раздел для работы с 
сеансами LiveCD.

Также планировалось заменить временную фичу bootchain-waitnet фичей 
bootchain-network с нормальными диалогами конфигурирования сети. Хорошо 
бы добавить по аналогии другие методы загрузки, типа AoE и iSCSI. К 
версии 1.7 планировалось реализовать сетевую мульти-загрузку, кое-что 
для этого уже было реализовано. Кроме загрузки с ISO/флэшек/сетевой 
поддерживается и локальная загрузка с обычной rootfs для реализации 
такой фичи, как закрытие обычного корня на запись a.k.a overlayroot.


-- 
Best regards,
Leonid Krivoshein.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-15 21:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 17:21 [make-initrd] [PATCH v4 1/4] Separate new feature of bootchain-core from pipeline Leonid Krivoshein
2021-10-13 18:07 ` Arseny Maslennikov
2021-10-13 18:26   ` Alexey Gladkov
2021-10-13 18:55     ` Leonid Krivoshein
2021-10-15 21:58   ` Leonid Krivoshein

Make-initrd development discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/make-initrd/0 make-initrd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 make-initrd make-initrd/ http://lore.altlinux.org/make-initrd \
		make-initrd@lists.altlinux.org make-initrd@lists.altlinux.ru make-initrd@lists.altlinux.com
	public-inbox-index make-initrd

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.make-initrd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git