Small interactive shell initramfs generator written in POSIX shell

d1b1e89 Initial commit

~trb pushed to ~trb/mkmanramfs git

2 years ago

New git repository added

2 years ago

#mkmanramfs - trb's manual initramfs generator

#What is this?

This is a simple and small POSIX shell script that creates an initramfs image that simply puts the user into an interactive shell and lets them manually prepare and mount their root filesystem. The script contains several hardcoded variables near the top of the file that are intended to be edited to configure the initramfs. Read the documentation near the top of the script for more information.

Keep in mind that this script was written specifically for my purposes and may not be exactly what you want. I will make changes to fix bugs, improve documentation, or to better generalize it to other Linux distributions than the one I wrote it on (Alpine Linux), but I will not be adding any new features as it is fully functional already.

#Why would I want my initramfs to just be an interactive shell?

If you have an unusual setup (say, for security purposes) that you don't want other people to figure out by inspecting what the initramfs is doing, this will give you that at the expense of needing to manually type the commands every time you boot. This of course will not prevent someone from guessing what your setup may be by seeing what executables and kernel modules are included in the initramfs.

There is nothing stopping you from using this script as a base and modifying it to automatically run your custom setup---I've yet to see another generator that also works as a simple framework to be used like this and this is the only reason why I released this script in the first place.


This script is MIT-0 licensed, which is the MIT license sans the attribution clause. This means the script is effectively public domain while remaining usable in places that don't respect people dedicating their works to the public domain (yes, this is a thing and you should never just release your code to the public domain without also providing an alternate license). The license text is included at the end of the script.