How to upgrade Raspbian Wheezy to Jessie

Hey guys!

Now, as rPi owners, we know that the recommended OS for the Raspberry Pi is Raspbian. Some of us (including me) use BerryBoot to multiboot our Raspberry Pis. But when a new release comes around, people have two options:

1. Reimage the card (Single boot)
2. Download latest version and scrap the old one (Multiboot)

Both options are a pain to execute, especially if your current setup is just the way you want it. So for those people, this tutorial is for you. Please note that this tutorial will work for all base versions (Ex. when a new release of Debian comes, you can upgrade from Jessie)

Now before we begin, execute the following commands to ensure that our current system is up-to-date:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
Then once that's done, execute the following sed (Stream EDitor) command to switch software channels (replace wheezy and jessie appropriately):
sudo sed -i 's/wheezy/jessie/g' /etc/apt/sources.list
Now start the actual upgrade with:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
During the upgrade command, it will ask for permission to restart services automatically. It's best to manually choose what services to restart (you can restart sshd without any loss in connectivity, though). It will also say that some files have been modified and that the package maintainer released a new version. If you are OK with checking file diffs, press "d" and check the file to see whether the newer version overrides anything major. If it doesn't, (or you don't want to check the diffs) press "y" to install the newer version.

During the dist-upgrade command, it will ask whether SSH password authentication for the root user should be disabled. It's best not to disable root access over SSH (especially if you are upgrading over SSH).

UPDATE: If you are not able to log in locally but you have access through SSH, fix it by executing the following:
sudo apt-get remove dbus
sudo apt-get install dbus
sudo reboot
Basically, it reinstalls DBus and reboots. You should be able to log in locally now.

Once everything's done, reboot the system with:
sudo reboot
To check the version, execute:
cat /etc/*-version
Search the output for "Jessie" or whatever the version is. If it exists, Raspbian has been upgraded.

Cheers!
-Technohacker

Comments

Popular Posts