
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.
24 lines
541 B
Bash
Executable file
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
|