rust-coreutils inside the initrd caused regressions like
https://github.com/uutils/coreutils/issues/16128

** 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.
  
+ rust-coreutils inside the initrd caused regressions like
+ https://github.com/uutils/coreutils/issues/16128
+ 
  [ 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.
  
-  * This update should be tested on as many different systems before releasing 
it (check the initrd generation and booting). This includes:
-    - Stock Ubuntu desktop install in a VM
-    - Ubuntu desktop install in a VM with LVM without encryption
-    - Ubuntu desktop install in a VM with LVM with encryption
-    - Ubuntu desktop install in a VM with ZFS without encryption
-    - Ubuntu desktop install in a VM with ZFS with encryption
-    - Ubuntu server install in a VM
-    - A system booting via iSCSI
-    - A system booting via NFS
-    - A system booting with RAID
-    - A desktop machine
-    - A laptop
-    - Raspberry Pi Zero 2
-    - Raspberry Pi 3/4/5
-    - Release upgrade of Raspberry Pi from noble
+  * This update should be tested on as many different systems before releasing 
it (check the initrd generation and booting). This includes:
+    - Stock Ubuntu desktop install in a VM
+    - Ubuntu desktop install in a VM with LVM without encryption
+    - Ubuntu desktop install in a VM with LVM with encryption
+    - Ubuntu desktop install in a VM with ZFS without encryption
+    - Ubuntu desktop install in a VM with ZFS with encryption
+    - Ubuntu server install in a VM
+    - A system booting via iSCSI
+    - A system booting via NFS
+    - A system booting with RAID
+    - A desktop machine
+    - A laptop
+    - Raspberry Pi Zero 2
+    - Raspberry Pi 3/4/5
+    - Release upgrade of Raspberry Pi from noble
  
-  * Test this change on the cloud images (that uses dracut).
+  * Test this change on the cloud images (that uses dracut).
  
-  * Test booting via the rescue option in the grub menu
+  * Test booting via the rescue option in the grub menu
  
  [ 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). 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
  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 (sorry for the 36 patches) and
  the risk of regression is higher than other SRUs I have done. I am
  committed to follow-up possible needed fixes.
  
   * Test packages have been published in
  https://launchpad.net/~bdrung/+archive/ubuntu/dracut
  
  [ 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.

** Bug watch added: github.com/uutils/coreutils/issues #16128
   https://github.com/uutils/coreutils/issues/16128

-- 
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