So, as you said the problem is not in the busybox, but in the PATH.
That PATH is exported in the 'casper' script (/usr/share/initramfs-tools/scripts/casper) at line 5:
export PATH=/root/usr/bin:/root/usr/sbin:/root/bin:/root/sbin:/usr/bin:/usr/sbin:/bin:/sbin
I guess there is a reason for that, but I don't know if it's a problem to reverse this path list...
It could fix the problem, don't you think?
I'll try tomorrow and I'll report it here. If this is not possible, I guess the solution could be to put the absolute PATH of the static dd (/bin/dd) instead of just the command (dd).
rubepisc: My fault. I didn't check first other binaries in the initramfs...
The initramfs' /bin/dd came from the package 'klibc-utils' through the mkinitramfs (line 168): klibc/bin/ * ${DESTDIR}/bin
ln -s /usr/lib/
It's a statically linked binary: klibc/bin/ dd klibc/bin/ dd: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked (uses shared libs), stripped
juanje@mac:~$ file /usr/lib/
/usr/lib/
So, as you said the problem is not in the busybox, but in the PATH.
That PATH is exported in the 'casper' script (/usr/share/ initramfs- tools/scripts/ casper) at line 5: usr/bin: /root/usr/ sbin:/root/ bin:/root/ sbin:/usr/ bin:/usr/ sbin:/bin: /sbin
export PATH=/root/
I guess there is a reason for that, but I don't know if it's a problem to reverse this path list...
It could fix the problem, don't you think?
I'll try tomorrow and I'll report it here. If this is not possible, I guess the solution could be to put the absolute PATH of the static dd (/bin/dd) instead of just the command (dd).
We'll see.