Copy cygwin1.dll into the same directory as the upgrader. That should eliminate any problems with it not being able to find the DLL.

As about the flash_kernel thing. Try using /proc/kernel_flash instead.

To create the image you need to mount a file using the loopback device with ext2 format.