Hi,
I have formatted with the FAT16 filesystem, made it bootable,
Made it bootable using the canon BOOTDISK string as described on
http://chdk.wikia.com/wiki/Bootable_SD_card ? This is *not* the same as the "make bootable" option in regular partition management tools.
and copied all the stuff into a 512 MB card; then protected it against writing, but it won't boot on the G9,
When you say it won't boot, do you mean the camera does not start at all, or the camera starts normally ? If the latter, is there a "card locked" message ?
If the camera doesn't boot at all (just sits there without starting) then you are probably using the wrong diskboot. If it does start, without a card locked message, then it is likely the lock sensing switch is not working.
Are you using a Mac ? If so, be sure to read
http://chdk.wikia.com/wiki/FAQ/Mac#Still_Having_Trouble.3F