{"id":527,"date":"2023-10-23T09:23:00","date_gmt":"2023-10-23T08:23:00","guid":{"rendered":"http:\/\/robert.vanyi.org\/en\/?p=527"},"modified":"2023-10-23T09:23:00","modified_gmt":"2023-10-23T08:23:00","slug":"raspberry-reinstall","status":"publish","type":"post","link":"https:\/\/robert.vanyi.org\/en\/archives\/527","title":{"rendered":"Raspberry reinstall"},"content":{"rendered":"\n<p>Exactly two months ago, on 23 August I posted about munin not creating html pages and that I had to reinstall libxrender1, because the file <code>libXrender.so.1.3.0<\/code> was corrupt, but I have not checked the root cause. Well, I should have gone deeper into it, because it turned out that the flash drive was about to break down. So at the end I had to reinstall the whole system. It was not a big deal, but here is how I did it for future reference:<\/p>\n\n\n\n<p>I did a normal install on an SD Card. Then I took a new flash drive, created a single ext4 partition, and read out the DOS disklabel (it has a DOS disklabel, not a GPT) with <code>fdisk -l<\/code>. The installation creates two partitions on the SD Card, a <code>boot<\/code> and a <code>root<\/code>, so I just copied the content of <code>root<\/code> over to the flashdrive. One last thing to make the system use the flashdrive as root partition is to update <code>\/cmdline.txt<\/code> on the <code>boot<\/code> partition:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ DOS Disklabel of the flash drive: 0xabcd1234\n\/\/ Partition number of the root partion on the flash drive: 01\n\/\/ this needs to be added to the root= parameter\nconsole=serial0,115200 console=tty1 root=PARTUUID=abcd1234-01 rootfstype=ext4 fsck.repair=yes rootwait<\/code><\/pre>\n\n\n\n<p>During the installation I chose minimal, I also enabled ssh, set the password, and the IP address is assigned via DHCP, so after these steps, I had the basic working setup. I just needed a few more things to have my monitoring stuff with munin. Luckily the old flash drive was not completely broken, so I could save munin configuration (<code>\/etc\/munin<\/code>) my custom scripts and plugins (<code>\/usr\/local\/bin<\/code> and <code>\/usr\/local\/lib\/munin<\/code>) as well as the RRDtool database files (<code>\/var\/lib\/munin<\/code>), so I copied them onto the new root filesystem before installing munin.<\/p>\n\n\n\n<p>To get munin up and running, I just needed to install lighttpd and munin, and as I read the heating system data via the ModBus protocol, also a small tool called mbpoll. Furthermore, lighttpd needed two lines in the config:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>alias.url += (\"\/munin-static\" => \"\/etc\/munin\/static\" )\nalias.url += (\"\/munin\"        => \"\/var\/cache\/munin\/www\/\" )<\/code><\/pre>\n\n\n\n<p>Also for convenience I also installed vim and mc. That&#8217;s it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exactly two months ago, on 23 August I posted about munin not creating html pages and that I had to reinstall libxrender1, because the file libXrender.so.1.3.0 was corrupt, but I have not checked the root cause. Well, I should have gone deeper into it, because it turned out that the flash drive was about to &hellip; <a href=\"https:\/\/robert.vanyi.org\/en\/archives\/527\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Raspberry reinstall<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[75],"class_list":["post-527","post","type-post","status-publish","format-standard","hentry","category-nincs-kategorizalva","tag-rpi"],"_links":{"self":[{"href":"https:\/\/robert.vanyi.org\/en\/wp-json\/wp\/v2\/posts\/527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robert.vanyi.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robert.vanyi.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robert.vanyi.org\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/robert.vanyi.org\/en\/wp-json\/wp\/v2\/comments?post=527"}],"version-history":[{"count":0,"href":"https:\/\/robert.vanyi.org\/en\/wp-json\/wp\/v2\/posts\/527\/revisions"}],"wp:attachment":[{"href":"https:\/\/robert.vanyi.org\/en\/wp-json\/wp\/v2\/media?parent=527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robert.vanyi.org\/en\/wp-json\/wp\/v2\/categories?post=527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robert.vanyi.org\/en\/wp-json\/wp\/v2\/tags?post=527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}