Hi There sorry for the delay in my response. I have been out of town doing some testing and haven't gotten online. So the process is relatively simple, but stuff can definitely go wrong. Here are the steps I take.
0) Go to the Arduino hardware file/bootloaders/optiboot
1) Back up the PinsDef, Optiboot, and make file into a different file so that you don't damage them and can replace them later
2) Copy the duel optiboot files (make, optiboot, and pinsdef) into Arduino/hardware/bootloaders/optiboot file to replace the files you just removed
3) Open the Command prompt and change the directory to the same Arduino/hardware/bootloaders/optiboot file that you placed your new duel optiboot files (make, optiboot, and pinsdef) in
4) In the command prompt type Make atmega1284p
6) Your new bootloader will appear in the folder and you can simply drag it to a different folder
7) remove your files from the optiboot folder and relace with the originals you backed up.
Note that if you changed the oscillator to something like an 8MHz one, you will need to change the clock speeds in the Make file, as well as possibly commenting out those sections or correcting them for your oscillator in the optiboot.c file. Most of my problems were the result of my using an 8MHz resonator and it took a while for me to figure out. If that is your issue, look for where it say Fcpu and modify as you need in the optiboot.c and change the baud in the makefile to be within the correct error range.
I really hope that this helps.
Charlie