How to burn bootloader hex using AVR MKII on Mac

How would I go about burning the bootloader into the AVR chip using an AVR ISP MKII? I would like to program the hex file without using the Arduino IDE.

I did not try this but this is how I would proceed:

Install Arduino 1.0. Set preferences to verbose and use the IDE to “flash” the bootloader. No need to connect an Arduino. The point is that this should show the command in the log. Once you have the command parameters for avrdude you can use this from the commandline without hte IDE.

I can not verify this right now because the computer I am at right now does not have Arduino installed.

But would that also work to burn the software into the ATmega8U2 doing the USB to serial conversion?

No, if this is your goal you need to learn a little bit more about avrdude. Still it is a good step for learning to first learn how to flash the atmega 328. Once you understand this you just change the file names (for the hex and the fuse files) and the chipname parameter.