dracut
dracut copied to clipboard
feat(dmsquash-live): add support for dash
Using dash instead of bash saves about 0.5M initramfs size.
Changes
Checklist
- [X] I have tested it locally
- [ ] I have reviewed and updated any documentation if relevant
- [X] I am providing new code and test(s) for it
Fixes #1897
CC @nabijaczleweli
I would advocate for decision making based on data.
The size of the bash binary (1.4M) is more than 10x of the size of the dash binary (127K).
This size difference translates to about 608k size saving in the compressed initramfs (measured using the initrafs generated by the DMSQUASH test).
This saving could then translate to saving in storage size, network download size (e.g as part of an iso) or RAM size.
Other consideration for dash could be speed of script execution and security - these are harder to quantify and changes over time
There are some reports claiming that dash is 4x faster than bash (I do not know if this claim is true or not and/or if this is applicable for dracut, but I certainly like my system to boot up faster if possible).
The cost of this PR is about 5 hunks isolated in one file that is being tested by a test case to guard against regressions.
All the dependent modules are already supporting dash.
This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.
bad bot
@aafeijoo-suse ping for review