Burning bootloader on Atmega8

i just got an Atmega8 chip, i was wondering how can i burn the arduino bootloader into it, can i place it in my arduino board and burn or should i use my arduino as an isp?

If you have an ISP device you can do either. If you have two Arduinos you can use one as an ISP and the other as the target. If you don't have a second Arduino you can use the Arduino as the ISP and put the target chip on a beadboard with a little bit of support circuitry (16 MHz resonator and pull-up resistor for the Reset line).

oh ok, so can i use this tutorial:http://arduino.cc/en/Tutorial/ArduinoISP, for atmega8?

adilmalik:
oh ok, so can i use this tutorial:http://arduino.cc/en/Tutorial/ArduinoISP, for atmega8?

Yes.

Note: they left out step 1.5: disable the auto-reset on the Arduino acting as ISP. If you don't the bootload burning process is going to reset your Arduino and start talking to its bootloader instead of the ArduinoISP sketch. A small resistor (about 120 ohm) from Reset to +5v or a capacitor (about 1 or 2 microfarad) between Reset and Ground will do it.

so i tried this but it didnt work :frowning:
i get this error avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51