Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clearlinux/clr-init
Initrd created using systemd as init program
https://github.com/clearlinux/clr-init
boot initrd systemd
Last synced: 3 months ago
JSON representation
Initrd created using systemd as init program
- Host: GitHub
- URL: https://github.com/clearlinux/clr-init
- Owner: clearlinux
- License: gpl-3.0
- Created: 2018-01-19T19:07:52.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-13T18:22:59.000Z (11 months ago)
- Last Synced: 2024-05-08T00:37:49.908Z (6 months ago)
- Topics: boot, initrd, systemd
- Language: Makefile
- Homepage:
- Size: 863 KB
- Stars: 9
- Watchers: 7
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
- awesome-initramfs - clr-init - Clear Linux (Projects)
README
## clr-init
Initrd created using systemd as init program## Luks Encryption support
The systemd rd parameters for luks most be added to the kernel cmdline to know who is the encrypted root partition:
https://www.freedesktop.org/software/systemd/man/systemd-cryptsetup-generator.html#Kernel%20Command%20LineThis initrd most not be using with LVM partitons, how ever it could be complemented adding services in an additional initrd
## How this works
This is the flow of an initrd with systemd:
```
+----------------+
| systemd (init) |
+----------------+
+
v
+--------------------------------+
| system-generators |
|--------------------------------|
| nfs-server-generator |
| rpc-pipefs-generator |
| systemd-cryptsetup-generator |
| systemd-debug-generator |
| systemd-fstab-generator |
| systemd-getty-generator |
| systemd-gpt-auto-generator |
| systemd-system-update-generator|
| systemd-veritysetup-generator |
+--------------------------------+
+
|
v
+-------------------+
|local-fs-pre.target|
+-------------------+
+
|
|
|
v
+-----------------------------+ +-----------------+ +-----------------------+
| local-fs.target | | swap.target | | cryptsetup.target |
|-----------------------------| |-----------------| |-----------------------|
| | | | | |
| tmp.mount | | (various swap | | (various cryptsetup |
| systemd-remount-fs.service | | devices...) | | devices...) |
| | | | | |
+-----------------------------+ +-----------------+ +-----------------------+
+ | |
| | |
+------------------------------>|<------------------------------+
v
+--------------------------------------+
| sysinit.target |
|--------------------------------------|
| systemd-ask-password-console.path |
| systemd-tmpfiles-setup-dev.service |
| systemd-tmpfiles-setup.service |
| systemd-udevd.service |
| systemd-udev-trigger.service |
+--------------------------------------+
+
|
+------------------+-----------------+|+---------------+------------------------+
| | | | |
| | | | |
v v | v v
+----------------+ +----------------+ | +------------------------------++---------------+
| timers.target | | paths.target | | | sockets.target || rescue.target |
|----------------| |----------------| | |------------------------------|+---------------+
| (various | | (various | | | systemd-udevd-control.socket|
| timers...) | | paths...) | | | systemd-udevd-kernel.socket |
| | | | | | |
+----------------+ +----------------+ | +------------------------------+
+ | +
| | |
| | |
+------------------>|<---------------+
|
|
|
v
+------------+
|basic.target|
+------------+
+
|
v
+--------------------------------+ +----------------+
| initrd-root-device.target | |emergency.target|
|--------------------------------| +----------------+
| sysroot.mount |
+--------------------------------+
+
|
v
+--------------------------------+
| initrd-root-fs.target |
|--------------------------------|
| initrd-parse-etc.service |
+--------------------------------+
+
|
v
+--------------------------------+
| initrd-fs.target |
|--------------------------------|
| (sysroot-usr.mount and |
| various mounts marked |
| with fstab option |
| x-initrd.mount...) |
+--------------------------------+
+
|
v
+------------------------------------+
| initrd.target |
|------------------------------------|
| initrd-cleanup.service |
| initrd-udevadm-cleanup-db.service |
+------------------------------------+
+
|
v
+-------------------------------+
| initrd-switch-root.target |
|-------------------------------|
| |
| initrd-switch-root.service |
| |
+-------------------------------+
+
|
v
+------------------------+
| Transition to Host OS |
+------------------------+
```## Create and Install
This will install clr-init.cpio.gz in /usr/lib/initrd
```
make && make install
```