Packing/repacking Android boot images is annoying. Android Boot Image Tools makes it a breeze.
Make sure cpio, mkbootimg, and unmkbootimg are on your $PATH.
cpio seems to be fairly standard and shouldn't require special installation.
mkbootimg/unmkbootimg can be found here: https://github.com/pbatard/bootimg-tools
abit get-kernel boot.img kernel
abit get-ramdisk boot.img ramdisk
abit put-kernel boot.img kernel [-o boot2.img]
abit put-ramdisk boot.img ramdisk [-o boot2.img]