** Description changed:

- Original report
- =========================
+ [ Impact ]
+ 
+ The change to rust-coreutils in the initramfs was accidental, only the
+ userspace gnu coreutils was supposed to be replaced with rust-coreutils.
+ We do not want to increase the size of initramfs. This has a much larger
+ impact on devices with small boot partition like Raspberry Pi where we
+ are not able to hold 2 sets of Boot Assets for A/B Boot.
+ 
+ Some measurements have been done in
+ 
https://discourse.ubuntu.com/t/dracut-news-for-ubuntu-26-04-lts-and-26-10/87327/2
+ Summary:
+ * The compressed initrd size shrinks by 6-8 MB
+ * The uncompressed initrd size shrinks by 12-15 MB
+ * The initrd creation can be 28 % faster (1m45s instead of 2m26s on Pi Zero 2)
+ * Boot time is slightly faster
+ 
+ Another big reason for this change: In case of a failure in the initrd,
+ busybox provides a nice interactive shell that is much easier to use
+ than dash. Since busybox is inside the initrd, more tools for debugging
+ are available.
+ 
+ [ Test Plan ]
+ 
+  * Check that rust-coreutils in not included in the initrd. This can be
+ done by running:
+ 
+ ```
+ sudo 3cpio -tv /boot/initrd.img | grep cargo
+ ```
+ 
+ This grep should give no result on a fixed system, but show all aliases
+ on an effected system.
+ 
+  * The upstream test suite has been changed to test with busybox. A
+ busybox specific autopkgtest test has been added.
+ 
+ [ Where problems could occur ]
+ 
+  * The initrd might use a binary from rust-coreutils that busybox-
+ initramfs does not provide. Then the initrd would still include the big
+ multicall rust-coreutils binary and all size/speed improvements will
+ become void.
+ 
+  * The initrd might use command flags that are not supported by busybox.
+ I have checked all command invocations in the whole dracut source code
+ to check that all used parameters are supported. The worst case
+ scenario: The system would not boot any more.
+ 
+  * An external Dracut module might use command flags that are not
+ supported by busybox. In contrast to initramfs-tools the Dracut package
+ provides most modules (like systemd, networking, cryptsetup, mdraid,
+ etc). The worst case scenario: The system would not boot any more.
+ 
+  * Bugs in the package installation procedure might be triggered by the
+ upgrade like too small /boot partition or silently produces truncated
+ initramfs (see bug #2157789).
+ 
+ [ How to revert ]
+ 
+ In case of a regression, users can configure dracut to omit busybox:
+ 
+ ```
+ echo 'omit_dracutmodules+=" busybox "' | sudo tee 
/etc/dracut.conf.d/omit-busybox.conf
+ sudo dracut -f
+ ```
+ 
+ Alternatively they can remove the prefer_dracutmodules+=" busybox " line from
+ /usr/lib/dracut/dracut.conf.d/01-debian.conf (which would be reverted on the 
next dracut-core package update).
+ 
+ [ Other Info ]
+ 
+  * All the Dracut changes have been landed upstream and are tested by
+ the CI there as well.
+ 
+  * I have checked all command invocations in the whole dracut source
+ code to check that all used parameters are supported.
+ 
+  * I know that this is a bigger patch set and the risk of regression is
+ higher than other SRUs I have done. I am committed to follow-up possible
+ needed fixes.
+ 
+ [ Original report ]
  
  Unless there’s a clear reason to change, we should continue using
  busybox in the initrd due to its smaller footprint. Prior to 25.10,
  Ubuntu images used different coreutils.  gnu coreutils in the root
  filesystem and busybox in the initramfs. We can keep this approach, with
  rust-coreutils replacing GNU coreutils.
- 
- =========================
- 
- [ Impact ]
- 
-  * The change to rust-coreutils in the initramfs was accidental, only
- the userspace gnu coreutils was supposed to be replaced with rust-
- coreutils. We do not want to increase the size of initramfs. This has a
- much larger impact on devices with small boot partition like Raspberry
- Pi where we are not able to hold 2 sets of Boot Assets for A/B Boot.
- 
- [ Test Plan ]
- 
-  * detailed instructions how to reproduce the bug
- 
-  * these should allow someone who is not familiar with the affected
-    package to reproduce the bug and verify that the updated package
-    fixes the problem.
- 
-  * if other testing is appropriate to perform before landing this
-    update, this should also be described here.
- 
- Check that rust-coreutils in not included in the initrd. This can be
- done by running:
- 
- sudo 3cpio -tv /boot/initrd.img | grep usr/lib/cargo/bin/coreutils
- 
- [ Where problems could occur ]
- 
-  * Think about what the upload changes in the software. Imagine the
-    change is wrong or breaks something else: how would this show up?
- 
-  * It is assumed that any SRU candidate patch is well-tested before
-    upload and has a low overall risk of regression, but it's important
-    to make the effort to think about what ''could'' happen in the event
-    of a regression.
- 
-  * This must never be "None" or "Low", or entirely an argument as to why
-    your upload is low risk.
- 
-  * This both shows the SRU team that the risks have been considered,
-    and provides guidance to testers in regression-testing the SRU.
- 
- [ Other Info ]
- 
-  * Anything else you think is useful to include
- 
-  * Make sure to explain any deviation from the norm, to save the SRU
-    reviewer from having to infer your reasoning, possibly incorrectly.
-    This should also help reduce review iterations, particularly when the
-    reason for the deviation is not obvious.
- 
-  * Anticipate questions from users, SRU, +1 maintenance, security teams
-    and the Technical Board and address these questions in advance

** Description changed:

  [ Impact ]
  
  The change to rust-coreutils in the initramfs was accidental, only the
  userspace gnu coreutils was supposed to be replaced with rust-coreutils.
  We do not want to increase the size of initramfs. This has a much larger
  impact on devices with small boot partition like Raspberry Pi where we
  are not able to hold 2 sets of Boot Assets for A/B Boot.
  
  Some measurements have been done in
  
https://discourse.ubuntu.com/t/dracut-news-for-ubuntu-26-04-lts-and-26-10/87327/2
  Summary:
  * The compressed initrd size shrinks by 6-8 MB
  * The uncompressed initrd size shrinks by 12-15 MB
  * The initrd creation can be 28 % faster (1m45s instead of 2m26s on Pi Zero 2)
  * Boot time is slightly faster
  
  Another big reason for this change: In case of a failure in the initrd,
  busybox provides a nice interactive shell that is much easier to use
  than dash. Since busybox is inside the initrd, more tools for debugging
  are available.
  
+ Dracut in Ubuntu 26.10 (stonking) has these changes included and uses
+ busybox from the busybox package. The busybox source package in Ubuntu
+ 26.10 (stonking) dropped busybox-initramfs in favor on the normal
+ busybox package. This SRU patches Dracut to use busybox-initramfs. The
+ changes to the busybox package only affect the busybox-initramfs binary
+ and therefore reduces the blast radius.
+ 
  [ Test Plan ]
  
-  * Check that rust-coreutils in not included in the initrd. This can be
+  * Check that rust-coreutils in not included in the initrd. This can be
  done by running:
  
  ```
  sudo 3cpio -tv /boot/initrd.img | grep cargo
  ```
  
  This grep should give no result on a fixed system, but show all aliases
  on an effected system.
  
-  * The upstream test suite has been changed to test with busybox. A
+  * The upstream test suite has been changed to test with busybox. A
  busybox specific autopkgtest test has been added.
  
  [ Where problems could occur ]
  
-  * The initrd might use a binary from rust-coreutils that busybox-
+  * The initrd might use a binary from rust-coreutils that busybox-
  initramfs does not provide. Then the initrd would still include the big
  multicall rust-coreutils binary and all size/speed improvements will
  become void.
  
-  * The initrd might use command flags that are not supported by busybox.
+  * The initrd might use command flags that are not supported by busybox.
  I have checked all command invocations in the whole dracut source code
  to check that all used parameters are supported. The worst case
  scenario: The system would not boot any more.
  
-  * An external Dracut module might use command flags that are not
+  * An external Dracut module might use command flags that are not
  supported by busybox. In contrast to initramfs-tools the Dracut package
  provides most modules (like systemd, networking, cryptsetup, mdraid,
  etc). The worst case scenario: The system would not boot any more.
  
-  * Bugs in the package installation procedure might be triggered by the
+  * Bugs in the package installation procedure might be triggered by the
  upgrade like too small /boot partition or silently produces truncated
- initramfs (see bug #2157789).
+ initramfs (see bug #2157789). There was a security update recently that
+ carried the same risk.
  
  [ How to revert ]
  
  In case of a regression, users can configure dracut to omit busybox:
  
  ```
  echo 'omit_dracutmodules+=" busybox "' | sudo tee 
/etc/dracut.conf.d/omit-busybox.conf
  sudo dracut -f
  ```
  
  Alternatively they can remove the prefer_dracutmodules+=" busybox " line from
  /usr/lib/dracut/dracut.conf.d/01-debian.conf (which would be reverted on the 
next dracut-core package update).
  
  [ Other Info ]
  
-  * All the Dracut changes have been landed upstream and are tested by
+  * All the Dracut changes have been landed upstream and are tested by
  the CI there as well.
  
-  * I have checked all command invocations in the whole dracut source
+  * I have checked all command invocations in the whole dracut source
  code to check that all used parameters are supported.
  
-  * I know that this is a bigger patch set and the risk of regression is
+  * I know that this is a bigger patch set and the risk of regression is
  higher than other SRUs I have done. I am committed to follow-up possible
  needed fixes.
  
  [ Original report ]
  
  Unless there’s a clear reason to change, we should continue using
  busybox in the initrd due to its smaller footprint. Prior to 25.10,
  Ubuntu images used different coreutils.  gnu coreutils in the root
  filesystem and busybox in the initramfs. We can keep this approach, with
  rust-coreutils replacing GNU coreutils.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2150657

Title:
  Use busybox instead of rust-coreutils in initrd

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/busybox/+bug/2150657/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to