3 ms·
Most initramfs designs are based on shell scripts and use tools like `mount -t ext4`, cryptsetup, etc - normal userspace tools, tied together by shell scripts.
by Sir_Cmpwn 10y ago
Most initramfs designs are based on shell scripts and use tools like `mount -t ext4`, cryptsetup, etc - normal userspace tools, tied together by shell scripts. What you're suggesting is actually more special purpose than what we already have. Modern initramfs design is really great and not crufty at all.
- IshKebab 10y agoWait are you suggesting that something tied together with shell scripts is great?
- Sir_Cmpwn 10y agoOh yes. Bash is definitely not a good general purpose programming langauge, hell I'd hesitate to even call it a programming language. However, it's very much so the right tool for the job in an initramfs. How familiar are you with the early boot process on a modern Linux distro? Ever had to do it manually from an initramfs rescue shell? Well, if not, it basically just involes invoking a bunch of commands and minimal parsing. Most early boot configs like /etc/fstab are easily readable with awk and are well suited to handling with shell scripts. All you basically have is a stripped down userspace with coreutils plus the commands necessary to prepare the system for the full boot. Shell scripts are the natural choice for tying it all together. I actually really like bash in general, in the niches it's suited for it's very nice.