i m using ardunio uno board i have replaced the intial controller with a brand new controller , how do i burn the boot loader
i also checked some stuff but got some error :

avrdude: stk500_getsync(): not in sync: resp=0x00

Put the original controller back in, and go look up "Arduino as ISP".

The new chip needs a previously programmed chip to program it, unless you want to go buy a dedicated device.

You are also going to need a 16MHz crystal or resonator, a couple of ceramic capacitors, a 10k resistor, and a bit of time reading through the process. It's quite easy, actually.. but popping a new blank chip into your Arduino and trying to make it work would be similar to popping a new, blank brain into a person's body and then expecting them to dance and do calculus. The board is the "body", or the support circuitry, and the chip is the brain. To teach a new brain, you are going to set up your new brain (chip) on a breadboard and then connect it and let the current chip teach it how to do things the Arduino way... aka, a bootloader.

Good luck!

while burning the boot loader must the old i.e preloaded boot loader controller be present

No, the ISP will “feed” the hex file (bootloader) from your computer into your AVR’s flash memory. The ISP must be present though :wink:

i have a new atmega328 how do i burn the bootloader without the microcontroller (pre loaded bootloader)

You will need a In System Programmer (ISP) to load the hex file bootloader. Most ISP micro controllers do not have a bootloader on them, just the program. Arduino as ISP is the exception only to allow you to load the ISP sketch through a USB2TTL converter or the 8/16AU chip.

So, the layout is "PC w/ bootloader.hex" -> "ISP" -> "Target Micro Controller" whereas the PC is where the bootloader resides.