commit dc42e7fe26be17c2514eb2ecb6eefe9705d0711b
parent 60106acc23565707869550402bc4466fc1f45f51
Author: Friedel Schoen <[email protected]>
Date: Thu, 29 Dec 2022 01:27:55 +0100
add some documentation
Diffstat:
M | docs/config.md | | | 68 | +++++++++++++++++++++++++++++--------------------------------------- |
M | readme.md | | | 89 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------ |
2 files changed, 91 insertions(+), 66 deletions(-)
diff --git a/docs/config.md b/docs/config.md
@@ -1,10 +1,8 @@
-# DUAL-INIT
+# Configuration Reference
-## Config Commands
+## Controlling
-### Controlling
-
-#### `include <path>`
+### `include <path>`
> includes an file
@@ -14,13 +12,13 @@
---
-#### `end`
+### `end`
> ends a section
-### General Configuration
+## General Configuration
-#### `section <name> <root>`
+### `section <name> <root>`
> starts the definition of a section (has to be closed with `end`)
@@ -31,23 +29,25 @@
---
-#### `mount`
+### `mount`
> starts a mount-section which has to be closed with `end`
---
-#### `mount-default <enable>`
+### `share/rshare <dirs...>`
-> defines if color should be enabled
+> shares dictionaries `dirs` (recursive if `rshare`)
+>
+> alias for mount `- <dir> <dir> bind/rbind`
-| parameter | description |
-| ------------------------ | -------------------------- |
-| enable (`true`\|`false`) | if color-output is enabled |
+| parameter | description |
+| --------- | ------------------------- |
+| dirs | dictionaries to be shared |
---
-#### `mount-master <enable>`
+### `color <enable>`
> defines if color should be enabled
@@ -57,17 +57,7 @@
---
-#### `color <enable>`
-
-> defines if color should be enabled
-
-| parameter | description |
-| ------------------------ | -------------------------- |
-| enable (`true`\|`false`) | if color-output is enabled |
-
----
-
-#### `verbose <enable>`
+### `verbose <enable>`
> defines if color should be enabled
@@ -77,7 +67,7 @@
---
-#### `timeout <duration>`
+### `timeout <duration>`
> set timeout to duration
@@ -85,27 +75,27 @@
| --------- | ------------------ |
| duration | timeout in seconds |
-### Section Configuration
+## Section Configuration
-#### `mount`
+### `mount`
> starts a mount-section which has to be closed with `end`
---
-#### `master`
-
-> defines this section as master
-
----
+### `share/rshare <dirs...>`
-#### `default`
+> shares dictionaries `dirs` (recursive if `rshare`)
+>
+> alias for mount `- <dir> <dir> bind/rbind`
-> defines this section as default
+| parameter | description |
+| --------- | ------------------------- |
+| dirs | dictionaries to be shared |
---
-#### `init <path> [args...]`
+### `init <path> [args...]`
> defines the init with possible args (defaults to `/sbin/init`)
@@ -114,9 +104,9 @@
| path | path to init |
| args | arguments you want to pass to `init` |
-### Mount Configuration
+## Mount Configuration
-#### `<type> <source> <target> [options]`
+### `<type> <source> <target> [options]`
> defines a new mount-point
diff --git a/readme.md b/readme.md
@@ -1,45 +1,80 @@
# DualINIT
-A meta-init system for Linux to 'dualboot' multiple Linux distributions in user-space
+A meta-init system for Linux to 'dualboot' multiple Linux distributions in user-space sharing one Linux kernel
-> Work in progress!
+> :warning: Work in progress!
-## Directory Structure
+## Installation
-### Minimal Directure Hierachie
+### Building the executable
+
+You are required to have:
+
+- [Git](https://git-scm.com/)
+- [GCC for your Linux-architecture](https://www.gnu.org/software/gcc/)
+- [GNU make](https://www.gnu.org/software/make/)
+
+> If you are building DualINIT for an other architecture than your host, grab a cross-compiler and set the environment-variable `CC` to your compiler-path.
+
+Now you can invoke the commands to clone this repository and compile `bin/dualinit`:
+
+```
+$ git clone https://github.com/friedelschoen/dualinit.git
+$ cd dualinit
+$ make bin/dualinit
+```
+
+Congratulations! :tada: You have a fresh built of DualINIT, you can continue to set up a running dualinit-system.
+
+If something went wrong, feel free to open an issue!
+
+### Getting Started
+
+Some dictionaries and files in the filesystem-root are required for DualINIT and Linux to work:
+
+- `/boot` - the Linux kernel and bootloader
+- `/dev` - an empty dictionary filled by the kernel with various devices
+- `/proc` - an empty dictionary filled by the kernel with process information
+- `/sys` - an empty dictionary filled by the kernel with various kernel files
+- `/sbin/init` - the dualinit executable
+- `/etc/dualinit.conf` - dualinit configuration
+- `/<section>` - a section to be loaded
+- `/<section>/{dev,sys,proc}` - pseudo-filesystems binded from root
+- `/<section>/{run,tmp}` - temporary dictionaries for services and applications
+- `/<section>/dualinit` - the filesystem-root to configure DualINIT
+- `/<section>/boot` - can be mounted to `/boot` to update the kernel, bootloader, etc.
+
+Resulting in a structure like that:
```
/
-├── boot/ (mounted to /<master>/boot)
-│ ├── ...
+├── boot/
│ ├── initramfs-x.x.img
-│ └── vmlinuz-x.x
-├── lost+found/ (mounted to /<master>/lost+found)
-├── dev/ (pseudo-fs)
+│ ├── vmlinuz-x.x
+│ └── ...
+├── dev/
├── etc/
│ └── dualinit.conf
-├── proc/ (pseudo-fs)
+├── proc/
├── sbin/
│ └── init
-├── sys/ (pseudo-fs)
-├── <environments>/
-└── ...
+├── sys/
+└── <section>/
+ ├── dev/
+ ├── sys/
+ ├── proc/
+ ├── run/
+ ├── tmp/
+ ├── dualinit/
+ └── (boot/)
```
-## Default Mounts
+## Configuration
-```
-- /dev /dev rbind
-- / /dualinit bind
-proc proc /proc relatime
-tmpfs run /run mode=0755
-- /sys /sys rbind
-tmpfs tmp /tmp mode=1777,strictatime
-```
+Move the [basic configuration-file](/docs/dualinit.conf) to `/etc/dualinit.conf` and edit it to fit your needs.
-### Master Mounts
+A reference to all commands can be found [here](/docs/config.md).
-```
-/boot -> /<master>/boot
-/lost+found -> /<master>/lost+found
-```
+## License
+
+This whole project is licensed under the beautiful terms of the [`zlib-license`](LICENSE).