Thank you. Today I have found the bug. I forgot change line 119 in ATmegaBOOT.c for chip m324p. Now it works both reading & writing.
Bootloader code is here: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1000323#1000323
$ avrdude -c avrisp -p m324p -P com5 -b 19200 -F -D -U flash:r:readout.hex:i
$ echo 'this one reads the chip'
$ avrdude -c avrisp -p m324p -P com5 -b 19200 -F -D -U flash:w:main.hex:i
$ echo 'this one writes the chip'
$ echo '-c arduino instead of -c avrisp works too'