View Issue Details

IDProjectCategoryView StatusLast Update
0008144Kali LinuxGeneral Bugpublic2023-08-25 16:20
Reporterdominik.borkowski Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionopen 
Product Version2022.4 
Summary0008144: continued issues with cloud-initramfs-growroot - after updates root filesystem cannot be resized in AWS
Description

Hello,

Looks like upstream Debian package for cloud-initramfs-growroot has problems again, after last month's issue outlined in https://bugs.kali.org/view.php?id=8091.

It seems Debian's package is no longer in sync with Ubuntu, and recent updates continue to be problematic. Kali comes with 0.18.debian8, while Debian issued 0.18.debian11, which is broken in a new way: it still doesn't have flock (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014662), and growroot complains about missing wait-for-root. (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1027050)

After some discussion with Ubuntu maintainer of cloud-initramfs-growroot, I'm not sure how Debian is expecting to fix this problem. Differences are fairly vast https://paste.opendev.org/show/bYpMFNvCIqqz0Bm3YDIX/.

I think there is a simpler solution, which will prevent this package being a problem in the future: simply remove this package. Functionally, that has no impact, as cloud-init will kick off resize still fairly early in the boot process, and there is no need to run it inside initramfs. We're doing it right now to get usable images based on current Kali that can grow, and it seems to work just fine.

Cheers!

Steps To Reproduce
  1. launch an ec2 using latest kali AMI ("ami-06e9ed0799116d0dd" # kali-rolling-amd64-2022.4.1-804fcc46-63fc-4eb6-85a1-50e66d6c7215)
  2. perform full apt update/upgrade
  3. shut down, add extend disk size by a couple of gigabytes
  4. boot, watch on the serial console growpart fail due to lack of 'flock' in initramfs

Second approach

  1. launch an ec2 using latest kali AMI ("ami-06e9ed0799116d0dd" # kali-rolling-amd64-2022.4.1-804fcc46-63fc-4eb6-85a1-50e66d6c7215)
  2. perform full apt update/upgrade
  3. add copying flock to /usr/share/initramfs-tools/hooks/growroot
  4. run updateinitramfs -u
  5. shut down, add extend disk size by a couple of gigabytes
  6. boot, watch on the serial console growpart fail with lack of 'wait-for-root', and also complain about lack of sed/rm/grep
Additional Information

Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.38.1
[/sbin/fsck.ext4 (1) -- /dev/nvme0n1p1] fsck.ext4 -a -C0 /dev/nvme0n1p1
/dev/nvme0n1p1: clean, 476704/974848 files, 3270689/3899387 blocks
done.
[ 9.308448] EXT4-fs (nvme0n1p1): mounted filesystem with ordered data mode. Quota mode: none.
done.
Begin: Running /scripts/local-bottom ... [ 9.527172] EXT4-fs (nvme0n1p1): unmounting filesystem.
GROWROOT: WARNING: resize failed: failed [flock:127] flock -x 9
/sbin/growpart: line 714: flock: not found
/scripts/local-bottom/growroot: line 97: wait-for-root: not found
done.
Begin: Running /scripts/init-bottom ... mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /dev on /root/dev failed: No such file or directory
done.
mount: mounting /run on /root/run failed: No such file or directory
BusyBox v1.35.0 (Debian 1:1.35.0-4+b1) multi-call binary.

Usage: run-init [-d CAP,CAP...] [-n] [-c CONSOLE_DEV] NEW_ROOT NEW_INIT [ARGS]

Free initramfs and switch to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,
execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.


Even after adding flock:

Begin: Running /scripts/local-premount ... done.
Begin: Wil[ 5.141988] Not activating Mandatory Access Control as /sbin/tomoyo-init does not exist.
l now check root file system ... fsck from util-linux 2.38.1
[/sbin/fsck.ext4 (1) -- /dev/nvme0n1p1] fsck.ext4 -a -C0 /dev/nvme0n1p1
/dev/nvme0n1p1: clean, 47914/974848 files, 451311/3899387 blocks
done.
done.
Begin: Running /scripts/local-bottom ... GROWROOT: /sbin/growpart: 824: /sbin/growpart: grep: not found
GPT PMBR size mismatch (31457279 != 41943039) 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.
Begin: Running /scripts/init-bottom ... done.

Activities

g0tmi1k

g0tmi1k

2023-08-25 16:20

administrator   ~0018390

This report has been filed against an old version of Kali. We will be closing this ticket due to inactivity.

Please could you see if you are able to replicate this issue with the latest version of Kali Linux (https://www.kali.org/get-kali/)?

If you are still facing the same problem, feel free to re-open the ticket. If you choose to do this, could you provide more information to the issue you are facing, and also give information about your setup?
For more information, please read: https://www.kali.org/docs/community/submitting-issues-kali-bug-tracker/

Issue History

Date Modified Username Field Change
2023-01-13 14:04 dominik.borkowski New Issue
2023-08-25 16:20 g0tmi1k Note Added: 0018390
2023-08-25 16:20 g0tmi1k Status new => closed