user36925: I tried flash bootloader into Arduino Pro Mini 328P 8MHz/3.3V clone, but got error.
First I did test:
~$ avrdude -c usbasp -p m328p

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)

avrdude: safemode: Fuses OK (E:FD, H:D9, L:E2)

avrdude done.  Thank you.


~$ avrdude -c usbasp -p m328p -v -U flash:w:optiboot_atmega328_pro_8MHz.hex

avrdude: Version 6.2
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/combox/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbasp
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as FD
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: reading input file "optiboot_atmega328_pro_8MHz.hex"
avrdude: error opening optiboot_atmega328_pro_8MHz.hex: No such file or directory
avrdude: can't determine file format for optiboot_atmega328_pro_8MHz.hex, specify explicitly
avrdude: read from file 'optiboot_atmega328_pro_8MHz.hex' failed

avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK (E:FD, H:D9, L:E2)

avrdude done.  Thank you.

@combox:~$ cd Downloads
@combox:~/Downloads$ cd Arduino
@combox:~/Downloads/Arduino$ avrdude -c usbasp -p m328p -v -U flash:w:optiboot_atmega328_pro_8MHz.hex

avrdude: Version 6.2
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/combox/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbasp
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as FD
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: reading input file "optiboot_atmega328_pro_8MHz.hex"
avrdude: input file optiboot_atmega328_pro_8MHz.hex auto detected as Intel Hex
avrdude: writing flash (32768 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 32768 bytes of flash written
avrdude: verifying flash memory against optiboot_atmega328_pro_8MHz.hex:
avrdude: load data flash data from input file optiboot_atmega328_pro_8MHz.hex:
avrdude: input file optiboot_atmega328_pro_8MHz.hex auto detected as Intel Hex
avrdude: input file optiboot_atmega328_pro_8MHz.hex contains 32768 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x7e00
         0x00 != 0x11
avrdude: verification error; content mismatch

avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as FE
avrdude: safemode: lfuse changed! Was e2, and is now fe
Would you like this fuse to be changed back? [y/n] 

How to solve this?

user36925: First, I put the voltage jumper on USBASP programmer to 5V, to increase voltage.
Then I set correct default fuse bits values for this board:
Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328

Low Fuse:   0xFF
High Fuse:  0xDA
Extended Fuse:  0x05


avrdude -c usbasp -p m328p -v -u -U lock:w:0x3f:m -U efuse:w:0xFD:m
avrdude -c usbasp -p m328p -v -u -U lock:w:0x3f:m -U hfuse:w:0xDA:m
avrdude -c usbasp -p m328p -v -u -U lock:w:0x3f:m -U lfuse:w:0xFF:m

Note, that I used option -u when modifying the fuse bits, this switch tell avrdude we really mean modify it. It disables the default behaviour of reading out the fuses three times before programming, then verifying at the end of programming that the fuses have not changed. I put 0xFD value for Extended Fuse Byte in place of 0x05, due to a bug in avrdude. (0xFD and 0x05 are the same value)
After that I flashed correct bootloader:
avrdude -c usbasp -p m328p -v -U flash:w:optiboot_atmega328_pro_8MHz.hex -U lock:w:0x0f:m

Now it fully fixed and works.

36925: <p>I tried flash <a href="https://raw.githubusercontent.com/Optiboot/optiboot/master/optiboot/bootloaders/optiboot/optiboot_atmega328_pro_8MHz.hex" rel="nofollow noreferrer">bootloader</a> into Arduino Pro Mini 328P 8MHz/3.3V clone, but got error.</p>

<p>First I did test:</p>

<pre><code>~$ avrdude -c usbasp -p m328p

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)

avrdude: safemode: Fuses OK (E:FD, H:D9, L:E2)

avrdude done.  Thank you.
</code></pre>

<hr>

<pre><code>~$ avrdude -c usbasp -p m328p -v -U flash:w:optiboot_atmega328_pro_8MHz.hex

avrdude: Version 6.2
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/combox/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbasp
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as FD
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: reading input file "optiboot_atmega328_pro_8MHz.hex"
avrdude: error opening optiboot_atmega328_pro_8MHz.hex: No such file or directory
avrdude: can't determine file format for optiboot_atmega328_pro_8MHz.hex, specify explicitly
avrdude: read from file 'optiboot_atmega328_pro_8MHz.hex' failed

avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK (E:FD, H:D9, L:E2)

avrdude done.  Thank you.

@combox:~$ cd Downloads
@combox:~/Downloads$ cd Arduino
@combox:~/Downloads/Arduino$ avrdude -c usbasp -p m328p -v -U flash:w:optiboot_atmega328_pro_8MHz.hex

avrdude: Version 6.2
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/combox/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbasp
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as FD
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: reading input file "optiboot_atmega328_pro_8MHz.hex"
avrdude: input file optiboot_atmega328_pro_8MHz.hex auto detected as Intel Hex
avrdude: writing flash (32768 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 32768 bytes of flash written
avrdude: verifying flash memory against optiboot_atmega328_pro_8MHz.hex:
avrdude: load data flash data from input file optiboot_atmega328_pro_8MHz.hex:
avrdude: input file optiboot_atmega328_pro_8MHz.hex auto detected as Intel Hex
avrdude: input file optiboot_atmega328_pro_8MHz.hex contains 32768 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x7e00
         0x00 != 0x11
avrdude: verification error; content mismatch

avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as FE
avrdude: safemode: lfuse changed! Was e2, and is now fe
Would you like this fuse to be changed back? [y/n] 
</code></pre>

<p>How to solve this?</p>
 36925: <p>First, I put the voltage jumper on USBASP programmer to 5V, to increase voltage.
Then I set correct <strong>default fuse bits values</strong> for this board:</p>

<pre><code>Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328

Low Fuse:   0xFF
High Fuse:  0xDA
Extended Fuse:  0x05


avrdude -c usbasp -p m328p -v -u -U lock:w:0x3f:m -U efuse:w:0xFD:m
avrdude -c usbasp -p m328p -v -u -U lock:w:0x3f:m -U hfuse:w:0xDA:m
avrdude -c usbasp -p m328p -v -u -U lock:w:0x3f:m -U lfuse:w:0xFF:m
</code></pre>

<p>Note, that I used option <strong>-u</strong> when modifying the fuse bits, this switch tell avrdude we really mean modify it. It disables the default behaviour of reading out the fuses three times before programming, then verifying at the end of programming that the fuses have not changed. I put <strong>0xFD</strong> value for Extended Fuse Byte in place of <strong>0x05</strong>, due to a bug in avrdude. (0xFD and 0x05 are the same value)</p>

<p>After that I flashed correct bootloader:</p>

<pre><code>avrdude -c usbasp -p m328p -v -U flash:w:optiboot_atmega328_pro_8MHz.hex -U lock:w:0x0f:m
</code></pre>

<p>Now it fully fixed and works.</p>
