Starting Electronics needs your help! Please make a donation to help cover our hosting and other costs. Click the donate button to send a donation of any amount.

Burning a Bootloader to the Arduino Uno in Linux using the AVRISP mkII

Created on: 10 October 2012

It is quick and easy to load the bootloader to an Arduino Uno board using the AVRISP mkII programmer in Linux. You will need to load the bootloader to the Arduino board if you have replaced the microcontroller IC.

The tutorial on how to replace the microcontroller on an Arduino Uno shows how to remove the old microcontroller and insert a new one.

It is possible to buy a microcontroller with the bootloader already loaded, but if the incorrect bootloader software is loaded on the microcontroller, then you will need to load the correct bootloader software.

The bootloader software allows you to load sketches to the Arduino via the USB port. Every Arduino that is sold has the bootloader preloaded on the microcontroller.

This video shows how to load the bootloader to the microcontroller using Lubuntu Linux. Loading the bootloader to the microcontroller is also known as burning the bootloader or Flashing the bootloader.

Can't see the video? View on YouTube →

Steps to Load the Bootloader

These steps assume that you have the Arduino IDE software loaded on a Linux PC such as Ubuntu or similar.

  1. Plug the AVRISP mkII USB connection into a spare USB port of the computer.
  2. Plug the AVRISP mkII into the 6 pin header (3 × 2 pin header) on the Arduino Uno board. Make sure that you connect the AVRISP the correct way around. Pin 1 is marked on the header and on the AVRISP connector.
  3. Power up the Arduino board with either external power or USB power from the Arduino USB connector.
  4. Open a terminal window in Linux and enter sudo arduino and then enter your password when prompted. The arduino IDE will open with root privileges.
  5. In the Arduino IDE, make sure that the correct board is selected under Tools → Board and that the AVRISP mkII is selected under Tools → Programmer.
  6. Click Tools → Burn Bootloader to load the bootloader to the Aruino board. The status message at the bottom of the Arduino IDE will let you know when the programming has finished.
  7. Load a sketch such as the Blink example program to make sure that the bootloader is working.