From 40eb4e45d48337dfcd748540fe25c5eb684e911d Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Wed, 9 Sep 2020 17:51:04 +0300 Subject: Install docs --- src/docs/Configuring-Init.html | 122 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 src/docs/Configuring-Init.html (limited to 'src/docs/Configuring-Init.html') diff --git a/src/docs/Configuring-Init.html b/src/docs/Configuring-Init.html new file mode 100644 index 0000000..e90cd74 --- /dev/null +++ b/src/docs/Configuring-Init.html @@ -0,0 +1,122 @@ + + + + + + +Configuring Init (Carbs Linux User Manual) + + + + + + + + + + + + + + + + +
+

+Next: , Up: Init System  

+
+
+

3.1 Configuring Init

+ +

There are three ways you can change the behaviour of the init system. Those are: +

+
    +
  1. Kernel Command Line +
  2. /etc/init/rc.conf file +
  3. Init Hooks +
+ +

3.1.1 Kernel Command Line

+ +

On GRUB, you can edit the kernel command line parameters, which will be parsed +as variables on the init system. Not all of the parameters will be acted upon, +but all of them will be set as variables on the init script. For example an +example command line, and how it is interpreted. +

+
+
BOOT_IMAGE=/boot/vmlinuz root=/dev/sda2 rw loglevel=3 quiet
+
+ +

This command line will be parsed to set the following variables: +

+
+
BOOT_IMAGE=/boot/vmlinuz
+root=/dev/sda2
+rw=1
+loglevel=3
+quiet=1
+
+ +

Some of these variables, such as rw/ro, loglevel, and +quiet, will be used by the init system to change the behaviour of the +startup. +

+

3.1.2 /etc/init/rc.conf file

+ +

However, the kernel command line isn’t the only place to set your boot +parameters. You can specify variables here as well, although note that the +kernel command line always gets the priority for these variables since they can +be set just before boot. +

+

3.1.3 Init Hooks

+ +

Init hooks are for custom personal commands that the user may want to add to +alter their boot. These can be used to load kernel modules, modify interfaces, +and lot more. Those hooks are added to the /etc/init directory with the +hook name as the suffix. For example, a boot script will be placed as +/etc/init/my-hook.boot. Currently, there are 4 hooks that the user can use. +

+
+
early-boot
+

Run after pseudo-filesystems are mounted. +

+
boot
+

Run before the boot stage is completed. +

+
pre.shutdown
+

Run first when shutting down. +

+
post.shutdown
+

Run just before the system is halted. +

+
+ +
+
+

+Next: , Up: Init System  

+
+ + + + + -- cgit v1.2.3