Sorry for my ignorance, but I don't know how to use this script.
I placed getkernels-1.0.tar.gz in the kindle root and tried the following in ssh:
cd /mnt/us && ./getkernels /dev/mmcblk0 && cd -
they all reply
-sh: getkernels: not found
Also, the outputs main_kernel.img and diags_kernel.img actually corresponds to mmcblk0p1.img and mmcblk0p2.img right?