[initramfs]: move mke2fs to /usr/local/sbin

/usr/sbin/mke2fs is now rom busybox which does not support
the operation we need
This commit is contained in:
Guohan Lu 2020-02-07 19:43:57 +00:00
parent e5e26d9a43
commit 6f5ac4b282
2 changed files with 3 additions and 3 deletions

View File

@ -224,7 +224,7 @@ cmd="wait_for_root_dev"
run_cmd "$cmd" "$err_msg" run_cmd "$cmd" "$err_msg"
err_msg="Error: formatting to ext4 failed" err_msg="Error: formatting to ext4 failed"
cmd="mke2fs -t ext4 -F -O '^huge_file,^metadata_csum' $root_dev" cmd="/usr/local/sbin/mke2fs -t ext4 -F -O '^huge_file,^metadata_csum' $root_dev"
run_cmd "$cmd" "$err_msg" run_cmd "$cmd" "$err_msg"
err_msg="Error: mounting $root_dev to $root_mnt failed" err_msg="Error: mounting $root_dev to $root_mnt failed"

View File

@ -17,7 +17,7 @@ esac
. /usr/share/initramfs-tools/hook-functions . /usr/share/initramfs-tools/hook-functions
copy_exec /sbin/mke2fs copy_exec /usr/sbin/mke2fs /usr/local/sbin/
copy_exec /sbin/sfdisk copy_exec /sbin/sfdisk
copy_exec /sbin/fdisk copy_exec /sbin/fdisk
copy_exec /sbin/resize2fs copy_exec /sbin/resize2fs
@ -30,7 +30,7 @@ for type in $fstypes; do
if [ -h "$prog" ]; then if [ -h "$prog" ]; then
link=$(readlink -f "$prog") link=$(readlink -f "$prog")
copy_exec "$link" copy_exec "$link"
ln -s "$link" "${DESTDIR}/$prog" ln -s "/usr/local/sbin/$(basename $link)" "${DESTDIR}/$prog"
elif [ -x "$prog" ] ; then elif [ -x "$prog" ] ; then
copy_exec "$prog" copy_exec "$prog"
else else