{"id":755,"date":"2020-10-19T12:00:00","date_gmt":"2020-10-19T19:00:00","guid":{"rendered":"http:\/\/letsbuildroboticswithshadow8472.com\/?p=755"},"modified":"2020-10-19T17:10:35","modified_gmt":"2020-10-20T00:10:35","slug":"raspberry-pi-os-review-and-clean-install-image","status":"publish","type":"post","link":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/2020\/10\/19\/raspberry-pi-os-review-and-clean-install-image\/","title":{"rendered":"Raspberry Pi OS: Review and Clean Install Image"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am going over the new official Raspberry Pi operating system and producing a custom image I can deploy in case I ever need a clean install. Let&#8217;s get started!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Raspberry OS Review<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">BlinkyPie is my Raspberry Pi 3B+ with a Pacman ghost case I printed and finished myself (with help). It&#8217;s supposed to eventually host an OpenCV powered feline deterrent system I&#8217;m still aiming to deploy some day. Today, I&#8217;m starting by installing the new official operating system for all Raspberry Pi&#8217;s: Raspberry Pi OS on a fresh MicroSD card.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Installation was fraught with several simple mistakes. My proper procedure is to: 1. Have an empty MicroSD card. 2. Download the OS image (over a WIRED connection) and verify it with its hash. 3. Quarantine the image and SD card on a computer I don&#8217;t mind rebuilding (no <strong>sdX<\/strong> other than the target SD in an adapter, internal MicroSD is <strong>mcblk0<\/strong>). 4. <strong>dd <\/strong>the image to <strong>\/mnt\/sdX<\/strong>. 5. Boot the image. 6. If it doesn&#8217;t work, lower the bit rate for the <strong>dd <\/strong>command (yes, it saved the project this time).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I didn&#8217;t skimp on resources this time: I got the full desktop image with recommended software. Long-term, I&#8217;m figuring it will be easier to maintain. Since I&#8217;ll be using this image over and over several times, I took a day or two to do things like localization settings, a lefty mouse, enabling SSH, and customizing the UI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;m looking to move away from using default, non-root accounts. Raspberry Pi OS (I&#8217;m just going to call it rPiOS from now on, if that&#8217;s okay) and Raspian before it come with one called &#8216;pi.&#8217; To change it, I had to first enable SSH, log out any and all sessions for the pi user, and change over the account and home directory names &#8212; preferably without logging into the GUI as root and creating a bunch of normal user files. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I poked around rPiOS without an agenda for a bit. There was always the games folder I never paid much attention to before, so I checked that out. Of special interest were the collection of simple Python games. They had no fewer than three Tetris clones, a normal one, one with one block pieces, and one with five block pieces, like the original Soviet precursor. The five-block per piece game runs a little fast, so after some time, I realized I&#8217;d like to try and slow it down a bit. I also found a &#8220;Bookshelf&#8221; where you can read up on Pi projects. It also came preloaded with a bunch of programming tools. I know it should be obvious, but rPiOS is built for learning. It has just enough there to be plug and play for a browsing machine, I know the Pi3 chugs a little under watching my church&#8217;s Livestream on Sabbath mornings, but it should be more than enough computer for anyone without serious computation needs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A Small, Custom rPiOS Image<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I have to admit, this week&#8217;s topic was a node for a much larger project I&#8217;ll be covering next week. Suffice it to say, I&#8217;m in a position where I may need to reinstall rPiOS several times in rapid succession. That is why I&#8217;m making an image file. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once I had tweaked rPiOS mostly to my liking, I shut it down and brought the card over to my Manjaro Pi 4. <strong>dd<\/strong> was not happy with me making backing up my MicroSD to a 1 TB external hard disk for some reason. Everyone helping me seemed sure it was corruption on the MicroSD card. As much as I respect their advice, I can&#8217;t help but be skeptical this time. It&#8217;s a new card with low usage so far. It boots fine, and I <em>was<\/em> trying to copy between two devices on the same USB 3 component. I&#8217;ll file this away as mystery unsolved for the time being, but for whatever reason, it confused BASH to the point where <strong>ls<\/strong> wouldn&#8217;t work with relative paths until I changed directories.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I eventually used the internal rPiOS card duplicator and made a physical copy over top my RasPup install. I tested it, and It booted normally. Moving things back over to the original card, I followed a tip I found in <a rel=\"noreferrer noopener\" href=\"https:\/\/youtu.be\/sUYVKhI_84E\" target=\"_blank\">this video<\/a> and used <strong>dd if=\/dev\/sdX | gzip &gt; imageName.gz<\/strong> to make a compressed copy of my pi SD directly on itself. I copied it over the network with <strong>scp<\/strong>, and unzipped my image.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, many guides on rPi backups invoke partition tools I&#8217;m still too scared to touch, especially on a timeframe. That&#8217;s why I downloaded and used PiShrink, a shell script available on GitHub that downsizes your Pi images so you&#8217;re not saving empty space in storage &#8212; or even worse: transmitting it to a friend. Apparently it&#8217;s popular for use with RetroPi, a Pi distro for emulating old games.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My MicroSD cards are 32 GB each. My final image is down to 9. If I had more time, I may try again without the default desktop background, since I&#8217;m planning on never using it, and I think my custom desktop image is a good chunk of the added size.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Final Question:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">What useful finds have you made when looking for something similar?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am going over the new official Raspberry Pi operating system and producing a custom image I can deploy in case I ever need a clean install. Let&#8217;s get started! Raspberry OS Review BlinkyPie is my Raspberry Pi 3B+ with a Pacman ghost case &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/2020\/10\/19\/raspberry-pi-os-review-and-clean-install-image\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Raspberry Pi OS: Review and Clean Install Image&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[2,26],"tags":[],"class_list":["post-755","post","type-post","status-publish","format-standard","hentry","category-linux","category-raspberry-pi"],"_links":{"self":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/comments?post=755"}],"version-history":[{"count":2,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/755\/revisions"}],"predecessor-version":[{"id":757,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/posts\/755\/revisions\/757"}],"wp:attachment":[{"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/media?parent=755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/categories?post=755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/letsbuildroboticswithshadow8472.com\/index.php\/wp-json\/wp\/v2\/tags?post=755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}