{"id":567,"date":"2017-11-04T13:00:59","date_gmt":"2017-11-04T13:00:59","guid":{"rendered":"http:\/\/chewett.co.uk\/blog\/?p=567"},"modified":"2017-11-03T22:12:11","modified_gmt":"2017-11-03T22:12:11","slug":"upgrading-raspbian-jessie-raspbian-stretch","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/567\/upgrading-raspbian-jessie-raspbian-stretch\/","title":{"rendered":"Upgrading Raspbian Jessie to Raspbian Stretch"},"content":{"rendered":"<p>This post describes how you can upgrade Raspbian Jessie, version 8, to Raspbian Stretch, version 9. Raspbian Stretch was recently released and while they recommend installing from fresh you are able to upgrade the versions. Here I follow the steps of upgrading the Raspberry Pi&#8217;s in my cluster including some of the common problems that may occur.<\/p>\n<p><!--more--><\/p>\n<h2>Preparing the Raspberry Pi&#8217;s before Upgrading<\/h2>\n<p>Before doing any kind of updates to your Raspberry Pi you should ensure all your important data is backed up. While upgrading the OS of a Raspberry Pi is relatively safe there is always a chance something might fail.<\/p>\n<p>One of the ways you can fully backup your Raspberry Pi is by cloning the disk. This can be done by following my previous blog post explaining <a href=\"\/blog\/441\/cloning-raspberry-pi-sd-card-another\/\">how to clone a Raspbian SD Card to another<\/a>. While the previous blog post was intended to set up multiple Pi&#8217;s it can be used as a useful backup tool.<\/p>\n<p>Instead of imaging the SD cards I am going to take a simple backup of the using <code>scp<\/code>. This follows the instructions on <a href=\"\/blog\/569\/creating-raspberry-pi-backup-script-scp-bash-windows\/\">how to create a simple backup script<\/a> I wrote previously.<\/p>\n<p>Once the full backup of the machine has been completed I am ready to upgrade the Raspberry Pi.<\/p>\n<h2>Upgrading a Raspberry Pi to Raspbian Stretch<\/h2>\n<p>The first thing that needs to be done is update the sources files. This lists where the Raspberry Pi gets the details of package updates for. The following files need to be modified:<\/p>\n<pre>\/etc\/apt\/sources.list\r\n\/etc\/apt\/sources.list.d\/raspi.list<\/pre>\n<p>In both of the files we need to change every occurrence of the word <code>jessie<\/code> to <code>stretch<\/code>.\u00a0 Both of these files require sudo rights to edit.<\/p>\n<p>Once this has been done we can run the following two commands to update the Raspberry Pi to Raspbian Stretch.<\/p>\n<pre>sudo apt-get update\r\nsudo apt-get -y dist-upgrade<\/pre>\n<p>Once this has finished running rebooting your machine will complete the upgrade.<\/p>\n<h2>Possible Errors during upgrade<\/h2>\n<p>During the upgrade process I encountered a couple errors over my various devices. Listed here are the errors and the fixes for them.<\/p>\n<h3>E: dpkg was interrupted<\/h3>\n<p>If this occurs, as in the full error below you need to run <code>sudo dpkg --configure -a<\/code>\u00a0to correct the issue. The full error has been listed below.<\/p>\n<pre>E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.<\/pre>\n<p>Once this has been run you can continue the upgrade process. The full commands to run to correct this and continue are reproduced below.<\/p>\n<pre>sudo dpkg --configure -a\r\nsudo apt-get update\r\nsudo apt-get -y dist-upgrade<\/pre>\n<h3>APT had planned for dpkg to do more than it reported back<\/h3>\n<p>During the dist upgrade on one Raspberry Pi apt reported back the following error.<\/p>\n<pre>W: APT had planned for dpkg to do more than it reported back (5 vs 9).\r\n Affected packages: raspberrypi-ui-mods:armhf\r\n\r\nErrors were encountered while processing:\r\n raspberrypi-ui-mods\r\nE: Sub-process \/usr\/bin\/dpkg returned an error code (1)<\/pre>\n<p>To fix this I rebooted the Raspberry Pi and then restarted the upgrade process with the following commands.<\/p>\n<pre>sudo apt-get update\r\nsudo apt-get -y dist-upgrade<\/pre>\n<p>Once this had been run the update was finished successfully.<\/p>\n<h2>Final steps after upgrade<\/h2>\n<p>Once the <code>dist-upgrade<\/code> has run it is recommended to reboot the Raspberry Pi. Following this reboot this is a good chance to remove any packages that are not used anymore. This can be performed by running the autoremove command below.<\/p>\n<pre>sudo apt-get autoremove<\/pre>\n<p>Autoremove goes through all the packages that were previously required but not anymore and removes them. For safety you will want to check to see what is being removed in case something is being removed wrongly.<\/p>\n<h2>Summary of the upgrade<\/h2>\n<p>Upgrading to Raspbian Stretch should be a relatively painless process but it is important to back up your Raspberry Pi before doing so. This will mean that in the rare event during the upgrade you lose data you will be able to restore it. During my upgrades no nodes needed to be reinstalled as the upgrades were fine.<\/p>\n<p>Using the above commands and the noted fixes I was able to upgrade my cluster to Raspbian Stretch.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post describes how you can upgrade Raspbian Jessie, version 8, to Raspbian Stretch, version 9. Raspbian Stretch was recently released and while they recommend installing from fresh you are able to upgrade the versions. Here I follow the steps of upgrading the Raspberry Pi&#8217;s in my cluster including some of the common problems that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":812,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[122],"tags":[39,185,186,37,101],"class_list":["post-567","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi-cluster","tag-linux","tag-rasbian","tag-rasbian-stretch","tag-raspberry-pi","tag-raspberry-pi-cluster"],"wppr_data":{"cwp_meta_box_check":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/upgrading_to_raspbian_stretch.jpg?fit=800%2C800&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-99","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":241,"url":"https:\/\/chewett.co.uk\/blog\/241\/installing-raspbian-onto-raspberry-pi\/","url_meta":{"origin":567,"position":0},"title":"Installing Raspbian onto a Raspberry Pi","author":"Chewett","date":"May 17, 2017","format":false,"excerpt":"Here I suggest some recommended steps to install Raspbian on top of their install guide. Choosing an OS for the Raspberry Pi One of the main ways to install a Raspberry Pi OS is to download a disk image called NOOBS.\u00a0This lets you\u00a0choose to easily install a number of different\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":448,"url":"https:\/\/chewett.co.uk\/blog\/448\/testing-performance-raspberry-pi\/","url_meta":{"origin":567,"position":1},"title":"Testing the performance of a Raspberry Pi","author":"Chewett","date":"July 12, 2017","format":false,"excerpt":"I will be testing the performance of each Raspberry Pi version in my cluster. This is to determine what each one is best suited to running. To do this I need a similar set of tests to run for each and compare them. Ideally the tests will also be runnable\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":521,"url":"https:\/\/chewett.co.uk\/blog\/521\/add-new-user-account-raspbian-raspberry-pi\/","url_meta":{"origin":567,"position":2},"title":"Add a new user account in Raspbian Raspberry Pi","author":"Chewett","date":"August 5, 2017","format":false,"excerpt":"For my cluster project I will add a new user to each Raspberry Pi. This is so the user I use for all other systems will be the \u00a0same on the Raspberry Pi's. This post describes how to add another user to Raspbian OS. Adding a new user to Raspbian\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/add_user_to_raspbian_os.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/add_user_to_raspbian_os.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/add_user_to_raspbian_os.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/add_user_to_raspbian_os.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":764,"url":"https:\/\/chewett.co.uk\/blog\/764\/virtualized-raspian-os-virtualbox\/","url_meta":{"origin":567,"position":3},"title":"Virtualized Raspian OS with Virtualbox","author":"Chewett","date":"October 21, 2017","format":false,"excerpt":"This post walks you through the process of installing the Raspberry Pi OS, Raspbian, with VirtualBox. I am going to use this at times to test my software running on the OS that the Raspberry Pi Cluster runs. Why do I need a special version of Raspbian OS to work\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/raspbian_on_virtualbox.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/raspbian_on_virtualbox.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/raspbian_on_virtualbox.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/raspbian_on_virtualbox.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":307,"url":"https:\/\/chewett.co.uk\/blog\/307\/adding-a-creator-ci20-to-the-cluster\/","url_meta":{"origin":567,"position":4},"title":"Adding a Creator CI20 to the cluster","author":"Chewett","date":"October 17, 2018","format":false,"excerpt":"This post talks about the Creator CI20 and explains the differences between it and the Raspberry Pi. What is the Creator CI20? The Creator CI20 is a small Linux based computer that is similar to the Raspberry Pi. I have been looking at these for a while and decided to\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/creator_main_post_image.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/creator_main_post_image.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/creator_main_post_image.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/10\/creator_main_post_image.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":409,"url":"https:\/\/chewett.co.uk\/blog\/409\/setting-raspberry-pi-cluster-node\/","url_meta":{"origin":567,"position":5},"title":"Setting up a Raspberry Pi Cluster Node","author":"Chewett","date":"August 19, 2017","format":false,"excerpt":"To set up a Raspberry Pi node I will follow a specific set of steps so that every Pi is set up \u00a0similarly. For the initial deployment I will follow this once and then clone the SD Card multiple times. If at a later date more are added I will\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/setting_up_a_raspi_cluster_node.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/setting_up_a_raspi_cluster_node.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/setting_up_a_raspi_cluster_node.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/setting_up_a_raspi_cluster_node.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=567"}],"version-history":[{"count":8,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/567\/revisions"}],"predecessor-version":[{"id":830,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/567\/revisions\/830"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/812"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}