Cart 0

Updating Raspbian on your microSD for the Raspberry Pi 2

microSD NOOBs Raspberry Pi Raspberry Pi2 Raspbian Tutorials

So, you have bought yourself a Raspberry Pi 2 to supplement your previous Pi, but you want to use the same microSD card as the old Pi?  The processor in the new Pi2 is based on the ARM 7, with the old Pi (models A, A+, B and B+) based on the ARM 6.  What this actually means is that the Pi's brain has been upgraded to a newer version, with the side effect of the original operating system needing an upgrade to work on the Pi2.  You can't just plug the old microSD into to the new Pi2 without first upgrading the operating system.

There are three options:

  1. Download the new version of Raspbian from the Raspberry Pi website and overwrite your microSD card.
  2. Copying the files from the microSD card onto a memory stick and use option 1.  We will be covering this in a future tutorial.
  3. Upgrading the operating system on the microSD card, keeping everything else in place.

With option 1 you will lose everything on your microSD card, including all your hard work and configurations.  While it's nice to have everything new, it's not necessary and why should you use all your hard work?

Option 2 is the next best thing - you can keep some files, but you will lose the configuration, settings and any programs that you have installed.

Option 3 is the best option.  You can upgrade the operating system on your Pi so that it will work on your new Pi2.  In fact, after upgrade it will work in both the old Pi and the new Pi2, so you have the best of both worlds!

How you upgrade your OS depends on whether you have NOOBs or if you have installed the Raspbian image.  Both start exactly the same, but the NOOBs upgrade requires a download from the web and copying of some files.

As always, when you are going to do anything to your microSD card, you should always back it up.  How you do this will depend on what other computers you have and their operating system.  I'm not going to cover how you can do this here, you should search the internet for a phrase like 'backup raspberry pi sd card on windows 7/osx/mac' (insert your OS).

Once the card has been backed up, put it in your original Pi (models A+/B+, or using an SD card adaptor with models A or B) and make sure the Pi is connected to your network. Start the Pi, and log in.  If your Pi boots into the graphical interface, open a terminal window.

First, we're going to get the latest list and version of 'packages' from the Raspbian 'repositories'.  'Packages' are the apps or software that runs on the Pi.  'Repositories' are places to download the 'packages', like the Play Store or App Store.  Type in the following:

sudo apt-get update

Next, we're going to tell your Pi to search through the lists it has just got and update any packages that it already has that has new versions:

sudo apt-get upgrade

Depending on how long it has been since you last updated or wrote the operating system to your Pi, this may take some time.  Leave it to complete.

In December 2014, the Foundation released an updated look and feel of Raspbian.  The way to tell the difference is in the old version, the menu bar is at the bottom of the screen.  In the new version, it is at the top.  Lots of other things have changed for the better too.  To get the update, use the following two commands:

sudo apt-get dist-upgrade

sudo apt-get install raspberrypi-ui-mods

If you started from the plain Raspbian image, then you're done.  If you have a NOOBs microSD card (perhaps one that you bought from the Pi Hut) then there are a few extra steps you need to go through.  You will need to do this on a PC or Mac, I'm afraid.

In both cases you should now shut-down your Pi so that you can remove the microSD card using either of the following commands:

sudo halt


sudo shutdown -h now

Once the Pi has stopped, unplug everything and remove the microSD card.

If you have NOOBS, insert the microSD card into a card reader and into your PC/Mac.  Download the latest 'NOOBs Lite' zipped image from the Raspberry Pi website:

Unzip the download, and extract everything from the ZIP file to a directory. Copy everything from the extracted ZIP EXCEPT for 'recovery.cmdline' to the top directory of your microSD card.

Once completed, remove the microSD from your PC.

You are now ready to insert the microSD card into your new Raspberry Pi2 and boot it up.  You should notice that your Pi2 boots really quickly compared with the old Pi, and see the four raspberries at the top indicating four cores.  Enjoy the speed!

NOTE: Some people are asking whether you should also run 'rpi-update'. The answer to that is 'no', you do not need it. In fact the advice is not to use it unless you absolutely have to have the very latest, bleeding edge software which may still be buggy and could stop parts of your Pi from working.

Older Post Newer Post