{"id":9113,"date":"2024-11-01T10:57:35","date_gmt":"2024-11-01T17:57:35","guid":{"rendered":"https:\/\/jasonsblog.ddns.net\/?p=9113"},"modified":"2024-11-01T16:31:08","modified_gmt":"2024-11-01T23:31:08","slug":"pi-star-how-to-make-file-system-read-write-rw","status":"publish","type":"post","link":"https:\/\/jasonsblog.ddns.net\/index.php\/2024\/11\/01\/pi-star-how-to-make-file-system-read-write-rw\/","title":{"rendered":"Pi-Star How To: Make File System Read\/Write (RW)"},"content":{"rendered":"\n<p>Good post on removing the read only normal mode of the file system in Pi-Star. Note, you may have to redo this on occasion as updates might put parts back. And he missed one (or it was added later) in \/etc\/rc.local you can change to rw from ro. I replace bash shell with fish shell, so I leave the bash indicator. If you get a drive write error later from an update, you can type bash &lt;enter> to go into the bash shell and still see the ro or rw indicator to troubleshoot what might have been added back in.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"967\" height=\"271\" src=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2024\/11\/image-2.png\" alt=\"\" class=\"wp-image-9116\" srcset=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2024\/11\/image-2.png 967w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2024\/11\/image-2-300x84.png 300w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2024\/11\/image-2-768x215.png 768w\" sizes=\"auto, (max-width: 967px) 100vw, 967px\" \/><\/figure>\n\n\n\n<p><a href=\"https:\/\/vk3erw.com\/pi-star\/pi-star-how-to-make-file-system-read-write-rw\">https:\/\/vk3erw.com\/pi-star\/pi-star-how-to-make-file-system-read-write-rw<\/a><\/p>\n\n\n<div class=\"wp-block-ub-divider ub_divider ub-divider-orientation-horizontal\" id=\"ub_divider_f0975927-0409-40e9-be73-fb4dc3cfb8bd\"><div class=\"ub_divider_wrapper\" style=\"position: relative; margin-bottom: 2px; width: 100%; height: 2px; \" data-divider-alignment=\"center\"><div class=\"ub_divider_line\" style=\"border-top: 2px solid #ccc; margin-top: 2px; \"><\/div><\/div><\/div>\n\n\n<p>The concept of a read only file system may not suit all users so here are the instructions how to change the pi-star configuration so the file system is always in RW mode.<\/p>\n\n\n\n<p><strong>Note:<\/strong> Some of the files modified in this procedure may be overwritten during future Pi-Star upgradates.<\/p>\n\n\n\n<p>Step 1 &#8211; mount file system as RW on boot:<\/p>\n\n\n\n<p>File: \/etc\/fstab<br>change ro to rw in line 3 + 4<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/dev\/mmcblk0p1     \/boot       vfat    defaults,rw         0   2\n\/dev\/mmcblk0p2      \/       ext4    defaults,noatime,rw     0   1<\/pre>\n\n\n\n<p>&nbsp;Step 2 &#8211; prevent remount on logout:<\/p>\n\n\n\n<p>File: \/etc\/bash.bash_logout<br>comment out line 9 + 10<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#sudo mount -o remount,ro \/\n#sudo mount -o remount,ro \/boot<\/pre>\n\n\n\n<p>Step 3 &#8211; To remove &#8220;<em>(rw)<\/em>&#8221; and &#8220;<em>(ro)<\/em>&#8221; from the command prompt. <strong>Note<\/strong>: this is only an indication, will not affect the file system<\/p>\n\n\n\n<p>File: \/etc\/bash.bashrc<br>near the end of the file, modify both &#8220;<em>PS1= &#8230;<\/em>&#8221; lines by removing &#8220;<em><strong>${fs_mode:+($fs_mode)}<\/strong><\/em>&#8220;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">    if [ $(id -u) -eq 0 ];\n      then\n#        PS1='\\[\\033[01;31m\\]\\u@\\h${fs_mode:+($fs_mode)}\\[\\033[00m\\]:\\[\\033[01;34m\\]\\W\\[\\033[00m\\]\\$ '\n        PS1='\\[\\033[01;31m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\] \\$ '\n      else\n#        PS1='\\[\\033[01;32m\\]\\u@\\h${fs_mode:+($fs_mode)}\\[\\033[00m\\]:\\[\\033[01;34m\\]\\W\\[\\033[00m\\]\\$ '\n        PS1='\\[\\033[01;32m\\]\\u@\\h\\[\\033[00m\\]:\\[\\033[01;34m\\]\\w\\[\\033[00m\\] \\$ '\n    fi<\/pre>\n\n\n\n<p><strong>Note:<\/strong> in this example the original lines are commented out to illustrate the changes.&nbsp;<\/p>\n\n\n\n<p>Step 4 &#8211; prevent hourly RO remount<\/p>\n\n\n\n<p>File: \/usr\/local\/sbin\/pistar-hourly.cron<br>comment out the last line of the file<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># Mount the disk RO<br># mount -o remount,ro \/<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Good post on removing the read only normal mode of the file system in Pi-Star. Note, you may have to redo this on occasion as updates might put parts back. And he missed one (or it was added later) in \/etc\/rc.local you can change to rw from ro. I replace bash shell with fish shell, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-9113","post","type-post","status-publish","format-standard","hentry","category-ham"],"blocksy_meta":[],"featured_image_src":null,"author_info":{"display_name":"Jason","author_link":"https:\/\/jasonsblog.ddns.net\/index.php\/author\/jturning\/"},"_links":{"self":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/9113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/comments?post=9113"}],"version-history":[{"count":5,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/9113\/revisions"}],"predecessor-version":[{"id":9125,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/9113\/revisions\/9125"}],"wp:attachment":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/media?parent=9113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/categories?post=9113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/tags?post=9113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}