Burning fresh Atmega168's

I have an AVRISP MKII and Arduino Diecimila board. I tried to burn a few fresh Atmega168's so that I could make projects with them and ran into some problems.

My first problem is when I try to burn them from Arduino 10 in Windows XP, I get an error that it "AVR_dude" can't find the 'usb' port for the AVRISP MKII. Is there anything I need to set to make this work? I have both the AVRISP and my Arduino plugged into USB cables.

When I try to burn the bootloader from AVR Studio 4, it says that the bootloader won't fit the chip..
So I put the original Arduino Atmega168 chip in and read it in. The file read from the 'Flash' is larger than the bootloader itself.. and if I do a file compare with "Beyond Compare 2", there is a section of code near the middle which matches the bootloader file but still a good deal of data above and below that. There was also code in the 'eeprom' section which I think was my current sketch. I read that in too. I was able to take the downloaded flash and eeprom files and burn them to 2 other Atmega168's which now work when used in my Arduino board.

There are two different USB drivers for the AVRISP mkII: one used by AVR Studio, and the other used by avrdude (and Arduino). Unfortunately, you can't have them both installed and working at the same time, which would probably explain why avrdude couldn't find the 'usb' port.

Did you set any of the ATmega168 fuses from AVR Studio? The Arduino bootloader requires that the fuses be set for the largest bootloader size (2 KB or 1K words). That's the default value, but it's possible that erasing the chip changed those fuse settings. Can you check in AVR Studio what the bootloader size fuse settings are?

On the chips I got working, I did set the fuses the same as the one I copied, which was the largest setting it allowed, for 1k bootloader size.

It baffled me as to why it said that arduino bootloader file 'wouldn't fit'... yet the one that I extracted was larger than the bootloader file..