My topic below where I had problems using the bootloader without a FTDI or other serial interface. It was solved by adding a small delay at the beginning of setup. Could it be an interrupt problem? So far the problem only seems to occur when Setup has a serial.begin at its start.
Optiboot does not use interrupts. It also does not specifically disable any interrupts, counting on the documented behavior that interrupts are cleared after a RESET.
Optiboot also starts the user sketch by causing a RESET (via the watchdog), so the sketch should always be started with all the uart and interrupt registers in their reset state.
It might be an interesting question as to whether the startup code is "safe" WRT characters buffered in the usb/serial converter during restart...
westfw, OK it is good to know, no interrupts. None the less a delay at the beginning of Setup does solve the problem. I will try to find out how small. Maybe it is just a no op instruction.