you can see here that your mega 2560 normally have an stk500v2 bootloader. (ctrl-F "2560")
So you'll find the .hex to upload (and c to compile if needed), via avr studio and your external programmer in :
arduino-0021/hardware/arduino/bootloader/stk500v2/stk500boot_v2_mega2560.hex
pay attention that the version of avrdude using to upload via the bootloader (in arduino/hardware/tools/avrdude is a patched version of the normal one you should have in avr-studio.
- so to upload via the bootloader -> arduino's avrdude,
- to upload via isp
-> normal avrdude (don't know avr-studio and where it has instal
it.
as an extra, you can see the command line used by the arduino software to communicate with the bootloader by pressing MAJ when compiling/uploading.
To upload a bootloader, somme tricks with the fuse are needed, to lock his part of the memory.
I reload the bootloader with an external programmer and those command line (arduino uno):
avrdude -p atmega328p -c stk500 -P /dev/STK500 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xde:m -Ulfuse:w:0xff:m
avrdude -p atmega328p -c stk500 -P /dev/STK500 -Uflash:w:optiboot_atmega328.hex:i -Ulock:w:0x0f:m
Again, I found those with the arduino software, using MAJ to see what it does.