Does /bin/bash
exist in your recovery environment? The fact that the messages you're seeing refer to minzip
and run_program
indicate that the recovery environment might be quite strictly stripped-down: it might have a different, more compact shell like dash
instead of bash
.
It looks like your actual script is also adding parted
to the system:
minzip: Extracted file "/sbin/parted"
But did you ensure that all the libraries required by parted
are also present? You can use the ldd
command to view the list of libraries an executable (or another library) depends on. For example, here's the list of dependencies from an x86_64 version of parted
. Your actual list will probably be different, depending on options chosen when compiling parted
, your system architecture and the pathname conventions of the Linux distribution you're using.
$ ldd /sbin/parted
linux-vdso.so.1 (0x00007ffff609a000)
libparted.so.2 => /lib/x86_64-linux-gnu/libparted.so.2 (0x00007f9d17be2000)
libreadline.so.7 => /lib/x86_64-linux-gnu/libreadline.so.7 (0x00007f9d17995000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f9d1776b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9d173cc000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f9d171c7000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9d16fc3000)
libdevmapper.so.1.02.1 => /lib/x86_64-linux-gnu/libdevmapper.so.1.02.1 (0x00007f9d16d6f000)
libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007f9d16b29000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9d18048000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9d16921000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f9d166f9000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f9d1822e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9d164dc000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9d161d8000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f9d15f65000)
Here, linux-vdso.so.1
is a virtual shared object provided by the kernel itself. But all the rest are libraries that must be present or else parted
cannot be successfully loaded for execution.
If your environment did not already have parted
installed, it's fairly likely it also did not have libparted.so.*
installed. Missing that library would have caused the failure of the parted
command.
The error message
run_program: execv failed: No such file or directory
is probably trying to tell you that either the command file itself, or one of the libraries it depends on, was not available. A proper shell might have displayed a more detailed error message, but here the message seems to be coming from run_program
, which I suppose is the thing that is trying to start your script in the first place.