{"id":4233,"date":"2019-02-16T17:39:13","date_gmt":"2019-02-16T17:39:13","guid":{"rendered":"http:\/\/wiki.davelevy.info\/?p=4233"},"modified":"2024-03-27T06:53:08","modified_gmt":"2024-03-27T06:53:08","slug":"raspberry-pi-part-deux","status":"publish","type":"post","link":"https:\/\/davelevy.info\/wiki\/raspberry-pi-part-deux\/","title":{"rendered":"Raspberry Pi Part Deux"},"content":{"rendered":"<p>I have decided to have another look. Here are my notes, since re-factoring the old page seems a bit of a chore. And now part three, I may need to rebuild the OS image from scratch.<br \/>\n<!--more--><\/p>\n<h3>Creating a Boot disk<\/h3>\n<p>It is possible to make the Pi <a href=\"https:\/\/pimylifeup.com\/raspberry-pi-ssh\/#enablesshheadless\">perform a first time boot with sshd enabled<\/a> for use if the Pi is headless. Do,<\/p>\n<p><code>touch \/boot\/ssh<\/code><\/p>\n<p>The ip address <a href=\"https:\/\/www.raspberrypi.org\/documentation\/remote-access\/ip-address.md\">can be discovered using the router<\/a>.<\/p>\n<h3>Plugging it in again<\/h3>\n<p>I&#8217;d forgotten that plugging it in is obvious although power is micro USB. Fortunately I had recorded the critical parameters, the login still works.<\/p>\n<h4>APT &amp; Raspian<\/h4>\n<p>I moved forward from a two year old Jessie OS image to Stretch, I find that often I came across <a href=\"https:\/\/raspberrypi.stackexchange.com\/questions\/27819\/command-apt-get-upgrade-crashes-raspbian\">the apt-get hangs, a lot<\/a>, feature. It seems it&#8217;s short of resources. I have made further comments on <a href=\"https:\/\/davelevy.info\/wiki\/raspian-apt\/\">Raspbian &amp; APT<\/a> on this wiki and deleted the rest from this page in March 2020.<\/p>\n<h4>To Do<\/h4>\n<p>I turned <code>tor<\/code>\u00a0off also, I wrote a new <code>check_service<\/code>\u00a0script using the <code>service<\/code> command to examine the running services and <code>service tor stop<\/code> to stop it. I found <a href=\"https:\/\/www.raspberrypi.org\/forums\/viewtopic.php?t=126155\">this<\/a> helpful. But it restarts on reboot &#8230; I have forgotten how to <strong>fix this<\/strong> and the little f*cker now <a href=\"https:\/\/www.linux.com\/learn\/managing-services-linux-systemd\">seems to have <code>systemd<\/code><\/a>. I have run <code>systemctl disable tor<\/code>, let&#8217;s see if that works<\/p>\n<p>The desktop is barfed, it is missing all the icons; <a href=\"https:\/\/www.raspberrypi.org\/forums\/viewtopic.php?t=195283\">this talks about it<\/a>. Do I need to uninstall and reinstall the desktop? What is the desktop?<em> (Actually this went away once, I got to the status of a complete update!)<\/em><\/p>\n<p>I have installed <code>imagemagick<\/code>\u00a0, <code title=\"disk usage analyzer\">baobab<\/code> and removed <code>libreoffice<\/code>. I have also installed <code>lshw<\/code> and <code>locate<\/code>.<\/p>\n<p>I haven&#8217;t remembered how the &#8220;pi&#8221; advertises it&#8217;s hostname. I have upgraded <a title=\"my samba page on this wiki\" href=\"https:\/\/davelevy.info\/wiki\/samba\/\">samba<\/a>, because it seems to come with a name daemon of some description and when I ran <code>apt-get install<\/code>, it said it needed to upgrade the samba package; <code>samba<\/code> is also documented on <a title=\"the raspberry pi site\" href=\"https:\/\/www.raspberrypi.org\/documentation\/remote-access\/samba.md\">this page on the raspberry site<\/a> and can now &#8216;see&#8217; the pi on the network window. And now I can&#8217;t! I mucked around with the smb.conf file, so I remove and install.<\/p>\n<p>Shall I uninstall wolfram-engine? It seems to be a programming environment. Yes! Stretch is quite big.<\/p>\n<h3>Backup<\/h3>\n<p>How to <strong>back it up<\/strong>. See <a href=\"https:\/\/raspberrypi.stackexchange.com\/questions\/76929\/burn-iso-file-to-flash-drive-with-raspbian\">here at stack exchange<\/a>. The suggest this,<\/p>\n<pre>sudo dd if=\/path\/to\/your\/WIN10.ISO of=\/dev\/sdX bs=4M status=progress; sync\r\n<\/pre>\n<p>so is that <code>if=\/<\/code>. I exported <code>\/<\/code> using samba but imgburn fails with network errors and disk imager doesn&#8217;t recognise the device that I mounted it on. I found this to use <code>ssh<\/code>,<\/p>\n<pre>ssh hostname@my.ip.address \"sudo dd if=\/dev\/sdX \" | \\\r\n  dd of=\/home\/username\/Documents\/filename.image`\r\n<\/pre>\n<h4>Customisation<\/h4>\n<p>Check https:\/\/github.com\/dfl1955\/ubuntu-tools, there are useful tools in that repo.<\/p>\n<p>I have installed<em> Raspi Check<\/em> and <em>Juice SSH<\/em> on my phone. I had to add my login user to Raspi Check&#8217;s assumed default group. Shall I install <em>Zabbix<\/em> somewhere? It might help monitoring the speed of the web sites. I chose to use <a href=\"https:\/\/davelevy.info\/wiki\/web-monitoring-with-uptime-robot\/\">uptime robot<\/a>.<\/p>\n<h3>Reliability<\/h3>\n<p>This seems a bit shit and seems to be a problem with the electricity supply quality. This <a href=\"https:\/\/www.raspberrypi.org\/forums\/viewtopic.php?t=224493\">article on the raspbian community site<\/a> recommends buying a quality transformer. Using google with <a href=\"https:\/\/www.google.co.uk\/search?client=opera&amp;q=rasberry+pi+ups&amp;sourceid=opera&amp;ie=UTF-8&amp;oe=UTF-8\">the search key &#8220;raspberry pi ups&#8221;<\/a> comes back with a bunch of suggestions. I supect that <code>powertop<\/code>\u00a0isn&#8217;t the answer to this problem.<\/p>\n<p><span style=\"font-family: Montserrat, Helvetica, arial, sans-serif; font-size: 23px; font-weight: bold; letter-spacing: -0.0134rem;\">DDNS<\/span><\/p>\n<p>I need this for this purpose;\u00a0<a href=\"https:\/\/web.archive.org\/web\/20230129173554\/https:\/\/www.howtogeek.com\/66438\/how-to-easily-access-your-home-network-from-anywhere-with-ddns\/\">here&#8217;s how to geek on the subject<\/a>, hope it&#8217;s UK relevant. This recommends using the router&#8217;s DDNS interface.\u00a0 In my case, I use BT, and they have a specific list that they claim to work with. I chose one of them; if I had wanted to use something else I could have used the alternate configuration of needing an agent and port forwarding records on the router.<\/p>\n<p>No-ip has <a href=\"https:\/\/www.noip.com\/support\/knowledgebase\/install-ip-duc-onto-raspberry-pi\/\">a software tool<\/a>\u00a0, this is called a dynamic update client, to let them know the address is still in use. It is installed using <code>wget|untar|make<\/code>.\u00a0 I have written a <a href=\"https:\/\/github.com\/dfl1955\/ubuntu-tools\/blob\/master\/services\/noip2.service\">noip2.service file which is stored<\/a> at my github repo. This should be working and is something <em>Zabbix<\/em> could help with as might <code>raspicheck<\/code>. The no-ip daemon doesn&#8217;t seem to be working, asked to confirm again. Need to check this out.<\/p>\n<h3>UTServer<\/h3>\n<p>Google is my friend,\u00a0<a href=\"http:\/\/lmgtfy.com\/?q=how+to+run+a+bit+torrent+server+on+raspbian\">google: how to run a bit torrent server on raspbian<\/a><\/p>\n<p>https:\/\/eltechs.com\/run-utorrent-on-raspberry-pi\/<\/p>\n<p><a href=\"https:\/\/www.howtogeek.com\/142044\/how-to-turn-a-raspberry-pi-into-an-always-on-bittorrent-box\/\">https:\/\/www.howtogeek.com\/142044\/how-to-turn-a-raspberry-pi-into-an-always-on-bittorrent-box\/<\/a><\/p>\n<h3>Related Posts<\/h3>\n<blockquote class=\"wp-embedded-content\" data-secret=\"4cMuPiX4cS\"><p><a href=\"https:\/\/davelevy.info\/wiki\/raspberry-pi\/\">Raspberry Pi<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Raspberry Pi&#8221; &#8212; davelevy . info \/ wiki\" src=\"https:\/\/davelevy.info\/wiki\/raspberry-pi\/embed\/#?secret=Ec6IRuOj0E#?secret=4cMuPiX4cS\" data-secret=\"4cMuPiX4cS\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"F9L94NFGor\"><p><a href=\"https:\/\/davelevy.info\/wiki\/raspian-apt\/\">Raspian &#038; APT<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Raspian &#038; APT&#8221; &#8212; davelevy . info \/ wiki\" src=\"https:\/\/davelevy.info\/wiki\/raspian-apt\/embed\/#?secret=ohgdgtM8k9#?secret=F9L94NFGor\" data-secret=\"F9L94NFGor\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have decided to have another look. Here are my notes, since re-factoring the old page seems a bit of a chore. And now part three, I may need to rebuild the OS image from scratch.<\/p>\n","protected":false},"author":1,"featured_media":6777,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_share_on_mastodon":"0"},"categories":[8,3],"tags":[178,1283,994,1284,911],"class_list":["post-4233","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-technology","tag-bittorrent","tag-ddns","tag-raspberry-pi","tag-raspi-check","tag-technology"],"share_on_mastodon":{"url":"","error":""},"jetpack_featured_media_url":"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2022\/10\/raspberrytart-unsplash-alexandrakusper-cropped-w1024.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/4233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/comments?post=4233"}],"version-history":[{"count":3,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/4233\/revisions"}],"predecessor-version":[{"id":10800,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/4233\/revisions\/10800"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media\/6777"}],"wp:attachment":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media?parent=4233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/categories?post=4233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/tags?post=4233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}