Raspi-image-spec/rootfs/etc/initramfs-tools/hooks/rpi-resizerootfs
Andres Salomon 4816680ba6 resizerootfs: switch from using sfdisk to parted for resizing partitions
sfdisk is a bit crusty - it doesn't understand gpt partition tables very well,
for example. By switching to parted, we can handle gpt issues (which may be
useful in the future, and is definitely useful for other boards), and we no
longer have to hardcode that 4M alignment workaround. Parted will tell us
the free space at the end of the disk.

Because we're already using partprobe, there's no additional dependencies
needed.
2021-08-25 01:23:20 +02:00

24 lines
541 B
Bash
Executable file

#!/bin/sh
set -e
#
# List the soft prerequisites here. This is a space separated list of
# names, of scripts that are in the same directory as this one, that
# must be run before this one can be.
#
PREREQS=""
case $1 in
prereqs) echo "$PREREQS"; exit 0;;
esac
. /usr/share/initramfs-tools/hook-functions
# XXX: tail and realpath are included by default, right?
#copy_exec /usr/bin/realpath
#copy_exec /usr/bin/tail
copy_exec /sbin/blkid
copy_exec /bin/lsblk
copy_exec /sbin/parted
copy_exec /sbin/partprobe
copy_exec /sbin/resize2fs