dracut icon indicating copy to clipboard operation
dracut copied to clipboard

feat(dmsquash-live): add support for dash

Open LaszloGombos opened this issue 3 years ago • 2 comments

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

LaszloGombos avatar Aug 15 '22 22:08 LaszloGombos

CC @nabijaczleweli

LaszloGombos avatar Aug 16 '22 00:08 LaszloGombos

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.

LaszloGombos avatar Aug 16 '22 02:08 LaszloGombos

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.

stale[bot] avatar Sep 25 '22 03:09 stale[bot]

bad bot

nabijaczleweli avatar Sep 25 '22 08:09 nabijaczleweli

@aafeijoo-suse ping for review

johannbg avatar Oct 21 '22 22:10 johannbg