{"id":3191,"date":"2016-09-12T06:55:51","date_gmt":"2016-09-12T12:55:51","guid":{"rendered":"http:\/\/dev.iachieved.it\/iachievedit\/?p=3191"},"modified":"2016-09-12T06:55:51","modified_gmt":"2016-09-12T12:55:51","slug":"xenial-xerus-ethernet-fixup-for-the-raspberry-pi","status":"publish","type":"post","link":"https:\/\/dev.iachieved.it\/iachievedit\/xenial-xerus-ethernet-fixup-for-the-raspberry-pi\/","title":{"rendered":"Xenial Xerus Ethernet Fixup for the Raspberry Pi"},"content":{"rendered":"<p>Xenial Xerus has a <a href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/systemd\/+bug\/1579969\">peculiar bug<\/a> that can cause a Raspberry Pi to lose Ethernet connectivity after a reboot.  Several individuals noticed it after an <code>apt-get update &amp;&amp; apt-get -y upgrade<\/code> while following instructions for <a href=\"http:\/\/dev.iachieved.it\/iachievedit\/building-swift-3-0-on-a-raspberry-pi-3\/\">building Swift on a Pi 3<\/a>.<\/p>\n<p>To fix this, power down the Pi, remove the microSD card and reinsert it into another system and then mount the Pi filesystem with something like:<\/p>\n<pre class=\"crayon:false\">\n# mkdir pifs\n# mount \/dev\/sdX2 pifs\n<\/pre>\n<p>where <code>X<\/code> depends on where your microSD was mapped.  I turn to <code>dmesg|tail<\/code> to find this:<\/p>\n<pre class=\"crayon:false\">\n[6099875.497524] usb-storage 2-4:1.0: USB Mass Storage device detected\n[6099875.497771] scsi host21: usb-storage 2-4:1.0\n[6099876.498806] scsi 21:0:0:0: Direct-Access     Generic  STORAGE DEVICE   0817 PQ: 0 ANSI: 6\n[6099876.499682] sd 21:0:0:0: Attached scsi generic sg8 type 0\n[6099876.832189] sd 21:0:0:0: [sdi] 31293440 512-byte logical blocks: (16.0 GB\/14.9 GiB)\n[6099876.833257] sd 21:0:0:0: [sdi] Write Protect is off\n[6099876.833266] sd 21:0:0:0: [sdi] Mode Sense: 23 00 00 00\n[6099876.834375] sd 21:0:0:0: [sdi] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA\n[6099876.840573]  sdi: sdi1 sdi2\n[6099876.845072] sd 21:0:0:0: [sdi] Attached SCSI removable disk\n<\/pre>\n<p>In this case <code>\/dev\/sdi2<\/code> is used.<\/p>\n<p>Once your filesystem is mounted navigate over to the Pi&#8217;s <code>\/var\/log\/<\/code> directory:<\/p>\n<pre class=\"crayon:false\">\n# mount \/dev\/sdX2 pifs\n# cd pifs\/var\/log\n<\/pre>\n<p>Using <code>grep -a<\/code>, search for the phrase <i>renamed from<\/i> in <code>syslog<\/code>:<\/p>\n<pre class=\"crayon:false\">\nroot@darthvader:\/tmp\/pifs\/var\/log# grep -a \"renamed from\" syslog\nSep  4 21:59:59 ubuntu kernel: [    5.533471] smsc95xx 1-1.1:1.0 enxb827eb9721d5: renamed from eth0\n<\/pre>\n<p>Notice the new Ethernet device name <code>enxb827eb9721d5<\/code>.  Now go to the <code>\/etc\/network\/interfaces.d\/<\/code> directory on the Pi filesystem:<\/p>\n<pre class=\"crayon:false\">\nroot@darthvader:\/tmp\/pifs\/var\/log# cd ..\/..\/\nroot@darthvader:\/tmp\/pifs# cd etc\/network\/interfaces.d\/\n<\/pre>\n<p>Edit <code>50-cloud-init.cfg<\/code> and replace instances of <code>eth0<\/code> with the new device name <code>enxb827eb9721d5<\/code>:<\/p>\n<pre class=\"crayon:false\">\n# cat 50-cloud-init.cfg\nauto lo\niface lo inet loopback\n\nauto enxb827eb9721d5\niface enxb827eb9721d5 inet dhcp\n<\/pre>\n<p>Unmount the filesystem:<\/p>\n<pre class=\"crayon:false\">\n# cd \/tmp\/\n# umount pifs\n<\/pre>\n<p>Return the microSD card to the Pi and reapply power.  Your Pi&#8217;s Ethernet should now be available.<\/p>\n<p>A special thanks to <a href=\"https:\/\/twitter.com\/tjw\">@tjw<\/a> for providing clues to the fix for this issue!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Xenial Xerus has a peculiar bug that can cause a Raspberry Pi to lose Ethernet connectivity after a reboot. Several individuals noticed it after an apt-get update &amp;&amp; apt-get -y upgrade while following instructions for building Swift on a Pi 3. To fix this, power down the Pi, remove the microSD card and reinsert it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3035,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[60,31,46],"class_list":["post-3191","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi","tag-ethernet","tag-raspberry-pi","tag-xenial-xerus"],"_links":{"self":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts\/3191"}],"collection":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/comments?post=3191"}],"version-history":[{"count":3,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts\/3191\/revisions"}],"predecessor-version":[{"id":3194,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/posts\/3191\/revisions\/3194"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/media\/3035"}],"wp:attachment":[{"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/media?parent=3191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/categories?post=3191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.iachieved.it\/iachievedit\/wp-json\/wp\/v2\/tags?post=3191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}