2020-04-17 19:44:25 +05:30
Tinyramfs
=========
**Currently tinyramfs is incomplete, don't expect that everything is working**
2020-02-10 02:43:39 +05:30
Features
2020-04-12 01:06:16 +05:30
--------
2020-04-12 01:01:02 +05:30
- No `local` 's, no bashisms, only POSIX shell
2020-02-10 02:43:39 +05:30
- Easy configuration
2020-04-17 19:44:25 +05:30
- mdev, mdevd, eudev
2020-05-07 17:36:34 +05:30
- LUKS, LVM
- LUKS detached header and key embedded into initramfs
2020-04-12 01:01:02 +05:30
Dependencies
2020-02-10 02:43:39 +05:30
------------
2020-04-12 01:01:02 +05:30
2020-05-07 17:36:34 +05:30
* POSIX utilities ( find, mkdir, ... )
2020-04-12 01:01:02 +05:30
* POSIX shell
2020-04-17 19:44:25 +05:30
* `switch_root`
* `readlink`
* `install`
* `setsid`
* `mount`
2020-05-07 17:36:34 +05:30
* `blkid`
2020-04-17 19:44:25 +05:30
* `cpio`
* `strip`
- Optional
2020-05-07 17:36:34 +05:30
* `gzip`
- Required by default
2020-04-12 01:01:02 +05:30
* `mdev` OR `mdevd` OR `eudev`
2020-04-17 19:44:25 +05:30
- systemd-udevd not tested
2020-04-12 01:01:02 +05:30
* `lvm2`
- Required for LVM support
2020-04-17 19:44:25 +05:30
* `cryptsetup`
- Required for LUKS support
* `kmod` OR `busybox modutils` with [this patch ](https://gist.github.com/illiliti/ef9ee781b5c6bf36d9493d99b4a1ffb6 ) (already included in KISS Linux)
2020-05-07 17:36:34 +05:30
- Not required for monolithic kernel
2020-04-17 19:44:25 +05:30
Notes
-----
2020-05-07 17:36:34 +05:30
* busybox modutils doesn't handle soft dependencies (modules.softdep). You must manually include them using `modules` config option
* busybox and toybox blkid doesn't support PARTUUID. You must use util-linux blkid
* zsh (in POSIX mode) shows some errors in init stage. Just ignore these errors, it's harmless
* `cp` in toybox incorrectly handles `-P` flag. You need to apply patch from [this issue ](https://github.com/landley/toybox/issues/174 ) or replace cp with another implementation
2020-04-17 19:44:25 +05:30
Installation
------------
2020-05-07 17:36:34 +05:30
2020-04-17 19:44:25 +05:30
```sh
git clone https://github.com/illiliti/tinyramfs
cd tinyramfs
make install
vi /etc/tinyramfs/config # edit config for your needs
tinyramfs -o /boot/initramfs
# update your bootloader
# reboot...
```
2020-04-12 01:01:02 +05:30
Usage
-----
2020-02-10 02:43:39 +05:30
```
2020-04-17 19:44:25 +05:30
usage: tinyramfs [option]
2020-04-13 00:47:01 +05:30
-o, --output < file > set initramfs output path
2020-04-12 01:01:02 +05:30
-c, --config < file > set config file path
-m, --moddir < dir > set modules directory
-k, --kernel < ver > set kernel version
-F, --files < dir > set files directory
-d, --debug enable debug mode
-f, --force overwrite initramfs image
2020-02-10 02:43:39 +05:30
```
2020-01-30 22:03:24 +05:30
2020-02-10 02:43:39 +05:30
Configuration
2020-04-12 01:06:16 +05:30
-------------
2020-02-10 02:43:39 +05:30
2020-05-07 17:36:34 +05:30
Statically via config
2020-04-17 19:44:25 +05:30
-----------------
See [config ](config )
2020-05-07 17:36:34 +05:30
Dynamically via kernel parameters
2020-04-17 19:44:25 +05:30
-----------------------------
TODO finalize and document kernel command-line parameters
Thanks
------
2020-04-12 01:01:02 +05:30
2020-05-07 17:36:34 +05:30
[E5ten ](https://github.com/E5ten )
2020-04-17 19:44:25 +05:30
[dylanaraps ](https://github.com/dylanaraps )
2020-04-12 01:01:02 +05:30
License
2020-04-12 01:06:16 +05:30
-------
2020-04-12 01:01:02 +05:30
Licensed under GPLv3