Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian....@packages.debian.org
Usertags: pu
X-Debbugs-Cc: cloud-initramfs-to...@packages.debian.org
Control: affects -1 + src:cloud-initramfs-tools

[ Reason ]
The cloud-initramfs-growroot package in bookworm currently fails to install
binary dependencies in the initramfs image, rendering it pretty much
non-functional for its intended purpose.  The cloud team would like to
update a fix for this.  The issue has been fixed in sid and trixie with
version 0.18.debian14.

[ Impact ]
Virtual machine-images embedding the cloud-initramfs-growroot do not
correctly respond to the size of their root volumes and resize their
filesystems accordingly.

[ Tests ]
Manual testing within the VM images generated by the cloud team.  Without
the change, we see the following logged during boot:

Begin: Running /scripts/local-bottom ... GROWROOT: /sbin/growpart: 824: 
/sbin/growpart: grep: not found
GPT PMBR size mismatch (4194303 != 25165823) will be corrected by write.
The backup GPT table is not on the end of the device.
/sbin/growpart: 853: /sbin/growpart: sed: not found
WARN: unknown label
/sbin/growpart: 354: /sbin/growpart: sed: not found
FAILED: sed failed on dump output
/sbin/growpart: 83: /sbin/growpart: rm: not found
done.

With the change, the partition is resized as expected:

Begin: Running /scripts/local-bottom ... [    2.148255] EXT4-fs (vda1): 
unmounting filesystem d4ac13e9-307d-4465-b881-74e03b.
[    2.451612]  vda: vda1 vda14 vda15
[    2.456354]  vda: vda1 vda14 vda15
GROWROOT: CHANGED: partition=1 start=262144 old: size=3930112 end=4192255 new: 
size=24903647 end=25165790
[    2.515864] EXT4-fs (vda1): mounted filesystem 
d4ac13e9-307d-4465-b881-74e03b39c6dc ro with ordered data mode. Quota mode.
done.

[ Risks ]
The initramfs image is slightly larger due to the inclusion of the
additional binaries.  This could have unintended consequences in certain
cases, but the risk is small.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
Update the growroot initramfs hook to copy the missing dependencies,
recursively, to the initramfs image.
diff -Nru cloud-initramfs-tools-0.18.debian13/debian/changelog 
cloud-initramfs-tools-0.18.debian13+deb12u1/debian/changelog
--- cloud-initramfs-tools-0.18.debian13/debian/changelog        2023-05-24 
07:16:27.000000000 -0400
+++ cloud-initramfs-tools-0.18.debian13+deb12u1/debian/changelog        
2024-08-20 11:44:21.000000000 -0400
@@ -1,3 +1,9 @@
+cloud-initramfs-tools (0.18.debian13+deb12u1) bookworm; urgency=medium
+
+  * growroot: add missing dependencies (Closes: #1037914)
+
+ -- Noah Meyerhans <no...@debian.org>  Tue, 20 Aug 2024 11:44:21 -0400
+
 cloud-initramfs-tools (0.18.debian13) unstable; urgency=medium
 
   [ Andreas Beckmann ]
diff -Nru cloud-initramfs-tools-0.18.debian13/growroot/hooks/growroot 
cloud-initramfs-tools-0.18.debian13+deb12u1/growroot/hooks/growroot
--- cloud-initramfs-tools-0.18.debian13/growroot/hooks/growroot 2023-05-24 
07:16:27.000000000 -0400
+++ cloud-initramfs-tools-0.18.debian13+deb12u1/growroot/hooks/growroot 
2024-08-20 11:16:30.000000000 -0400
@@ -12,6 +12,10 @@
 copy_exec /sbin/sfdisk /sbin
 copy_exec /usr/bin/growpart /sbin
 copy_exec /bin/udevadm /sbin
+copy_exec /usr/bin/awk /bin
 copy_exec /usr/bin/flock /bin
+copy_exec /usr/bin/grep /bin
+copy_exec /usr/bin/rm /bin
+copy_exec /usr/bin/sed /bin
 
 # vi: ts=4 noexpandtab

Reply via email to