Where is grow_partition.sh in BBAI-64 ? Any alternative ?

Hi @nmingotti just reboot… :wink:

Background (for all Bullseye images…) the package “generic-sys-mods” pre-installed on every Bullseye image does:

On first bootup, the systemd service file: grow_partition.service runs, it calls “/usr/bin/bb-growpart” to grow the partition and set the next resize_filesystem.service file to expand…

Sadly yes it requires a reboot to get everything done…

/usr/bin/bb-growpart

#!/bin/sh

if [ -f /etc/default/generic-sys-mods ] ; then
	. /etc/default/generic-sys-mods
fi

if [ ! "x${ROOT_DRIVE}" = "x" ] ; then
	if [ ! "x${ROOT_PARTITION}" = "x" ] ; then
		echo "/usr/bin/growpart ${ROOT_DRIVE} ${ROOT_PARTITION}"
		/usr/bin/growpart ${ROOT_DRIVE} ${ROOT_PARTITION}
	fi
fi

/usr/bin/bb-resizefs

#!/bin/sh

if [ -f /etc/default/generic-sys-mods ] ; then
	. /etc/default/generic-sys-mods
fi

unset is_btrfs
is_btrfs=$(cat /proc/cmdline | grep btrfs || true)

if [ "x${is_btrfs}" = "x" ] ; then
	if [ ! "x${ROOT_DRIVE}" = "x" ] ; then
		if [ ! "x${ROOT_PARTITION}" = "x" ] ; then
			echo "resize2fs ${ROOT_DRIVE}p${ROOT_PARTITION}"
			resize2fs ${ROOT_DRIVE}p${ROOT_PARTITION}
		fi
	fi
else
	echo "btrfs filesystem resize max /"
	btrfs filesystem resize max /
fi

Regards,

2 Likes