Last active
July 17, 2024 01:31
-
-
Save yeokm1/8b0ffc03e622ce011010 to your computer and use it in GitHub Desktop.
Revisions
-
yeokm1 revised this gist
May 2, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ reboot #Update everything first, remove cache then reboot to detect problems pacman -Syu # Delete certs if you see a message like "/etc/ssl/certs/ca-certificates.crt exists in filesystem" then rerun pacman -Syu rm /etc/ssl/certs/ca-certificates.crt #May be needed if the pacman version has changed during the update pacman-db-upgrade -
yeokm1 revised this gist
May 2, 2017 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ## Read-only FS on Arch Linux ARM Unlike your typical computer where you usually shutdown properly, I cannot rely on this during the use of my Raspberry Pi. If the Raspberry Pi is improperly shutdown too many times, data corruption in the file system leading to unbootable SD card may result. So we should use a read-only file system. @@ -18,6 +18,8 @@ reboot #Update everything first, remove cache then reboot to detect problems pacman -Syu # Delete certs if you see a message like "/etc/ssl/certs/ca-certificates.crt exists in filesystem" rm /etc/ssl/certs/ca-certificates.crt #May be needed if the pacman version has changed during the update pacman-db-upgrade #Optional if you want to clear the cache -
yeokm1 revised this gist
Dec 21, 2016 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,6 +41,10 @@ tmpfs /var/log tmpfs nodev,nosuid 0 0 tmpfs /var/tmp tmpfs nodev,nosuid 0 0 #end #Adjust journald service to not log the system log to prevent flooding of the /var/log folder nano /etc/systemd/journald.conf #Uncomment and set "Storage=none" #To mount / partition as read-only nano /boot/cmdline.txt #Replace the "rw" flag with the "ro" flag right after the root= parameter. -
yeokm1 revised this gist
Mar 25, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,8 +51,8 @@ systemctl disable systemd-random-seed #systemctl disable ntpd #Not working now #Put shortcut shell scripts to re-enable read-write temporarily if needed printf "mount -o remount,rw /\nmount -o remount,rw /boot" > writeenable.sh printf "mount -o remount,ro /\nmount -o remount,ro /boot" > readonly.sh chmod 500 writeenable.sh chmod 500 readonly.sh -
yeokm1 revised this gist
Jan 28, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -57,7 +57,7 @@ chmod 500 writeenable.sh chmod 500 readonly.sh #Change your password if needed (Optional) "passwd root" or "passwd alarm" #Remove history history -c -w -
yeokm1 revised this gist
Jan 28, 2016 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,18 @@ Unlike your typical computer where you usually shutdown properly, I cannot rely Full instructions and explanations are obtained from this [link](http://ruiabreu.org/2013-06-02-booting-raspberry-pi-in-readonly.html) but you can run these commands directly. I modified some of the instructions for personal convenience. Login with default username: alarm, password: alarm ```bash #Optionally enable root over SSH. The rest of these instructions assume u are in root. su nano /etc/ssh/sshd_config #Add "PermitRootLogin yes" to the Authentication section after "#PermitRootLogin prohibit-password" then save reboot #Login as root #Update everything first, remove cache then reboot to detect problems pacman -Syu #May be needed if the pacman version has changed during the update -
yeokm1 revised this gist
Jan 28, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -35,9 +35,9 @@ nano /boot/cmdline.txt #Replace the "rw" flag with the "ro" flag right after the root= parameter. #Disable systemd services #systemctl disable systemd-readahead-collect #Not working now systemctl disable systemd-random-seed #systemctl disable ntpd #Not working now #Put shortcut shell scripts to re-enable read-write temporarily if needed printf "mount -o remount,rw /" > writeenable.sh -
Yeo Kheng Meng revised this gist
May 9, 2015 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,6 +45,9 @@ printf "mount -o remount,ro /" > readonly.sh chmod 500 writeenable.sh chmod 500 readonly.sh #Change your password if needed (Optional) passwd #Remove history history -c -w -
Yeo Kheng Meng revised this gist
Mar 7, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Full instructions and explanations are obtained from this [link](http://ruiabreu pacman -Syu #May be needed if the pacman version has changed during the update pacman-db-upgrade #Optional if you want to clear the cache pacman -Sc reboot -
Yeo Kheng Meng revised this gist
Feb 16, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ reboot rm /etc/localtime ln -s /usr/share/zoneinfo/Asia/Singapore /etc/localtime #Relocate DNS cache (This step causes DNS problems on the latest Arch Linux ARM kernels so skip this) #rm /etc/resolv.conf #ln -s /tmp/resolv.conf /etc/resolv.conf -
Yeo Kheng Meng revised this gist
Feb 16, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,9 +16,9 @@ reboot rm /etc/localtime ln -s /usr/share/zoneinfo/Asia/Singapore /etc/localtime #Relocate DNS cache (This step causes problems on latest Arch Linux ARM kernels so skip this) #rm /etc/resolv.conf #ln -s /tmp/resolv.conf /etc/resolv.conf #Adjust /etc/fstab, add/modify to the following hashed lines. Mount certain directories to RAM disk. nano /etc/fstab -
Yeo Kheng Meng revised this gist
Feb 9, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ tmpfs /var/tmp tmpfs nodev,nosuid 0 0 #To mount / partition as read-only nano /boot/cmdline.txt #Replace the "rw" flag with the "ro" flag right after the root= parameter. #Disable systemd services systemctl disable systemd-readahead-collect -
Yeo Kheng Meng revised this gist
Jan 8, 2015 . 1 changed file with 6 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,9 +22,12 @@ ln -s /tmp/resolv.conf /etc/resolv.conf #Adjust /etc/fstab, add/modify to the following hashed lines. Mount certain directories to RAM disk. nano /etc/fstab #Add the following lines up to the #end. Include the first commented line in case you have to set to write enabled next time. #/dev/mmcblk0p1 /boot vfat defaults 0 0 /dev/mmcblk0p1 /boot vfat defaults,ro,errors=remount-ro 0 0 tmpfs /var/log tmpfs nodev,nosuid 0 0 tmpfs /var/tmp tmpfs nodev,nosuid 0 0 #end #To mount / partition as read-only nano /boot/cmdline.txt -
Yeo Kheng Meng revised this gist
Jan 8, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,8 @@ Full instructions and explanations are obtained from this [link](http://ruiabreu ```bash #Update everything first, remove cache then reboot to detect problems pacman -Syu #May be needed if the pacman version has changed during the update pacman-db-upgrade pacman -Sc reboot -
Yeo Kheng Meng revised this gist
Jan 8, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,15 +5,15 @@ Unlike your typical computer where you usually shutdown properly, I cannot rely Full instructions and explanations are obtained from this [link](http://ruiabreu.org/2013-06-02-booting-raspberry-pi-in-readonly.html) but you can run these commands directly. I modified some of the instructions for personal convenience. ```bash #Update everything first, remove cache then reboot to detect problems pacman -Syu pacman -Sc reboot #Change timezone (optional) rm /etc/localtime ln -s /usr/share/zoneinfo/Asia/Singapore /etc/localtime #Relocate DNS cache rm /etc/resolv.conf ln -s /tmp/resolv.conf /etc/resolv.conf -
Yeo Kheng Meng revised this gist
Sep 9, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,9 +34,9 @@ systemctl disable systemd-random-seed systemctl disable ntpd #Put shortcut shell scripts to re-enable read-write temporarily if needed printf "mount -o remount,rw /" > writeenable.sh printf "mount -o remount,ro /" > readonly.sh chmod 500 writeenable.sh chmod 500 readonly.sh #Remove history @@ -45,7 +45,7 @@ history -c -w reboot ``` To enable read-write temporarily to do say an update, just run `./writeenable.sh`. ## References -
Yeo Kheng Meng revised this gist
Sep 9, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Unlike your typical computer where you usually shutdown properly, I cannot rely Full instructions and explanations are obtained from this [link](http://ruiabreu.org/2013-06-02-booting-raspberry-pi-in-readonly.html) but you can run these commands directly. I modified some of the instructions for personal convenience. ```bash #Change timezone (optional) rm /etc/localtime ln -s /usr/share/zoneinfo/Asia/Singapore /etc/localtime @@ -45,7 +45,7 @@ history -c -w reboot ``` To enable read-write temporarily to do say an update, just run `./readwrite.sh`. ## References -
Yeo Kheng Meng revised this gist
Sep 9, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ ##Read-only FS on Arch Linux ARM Unlike your typical computer where you usually shutdown properly, I cannot rely on this during the use of my Raspberry Pi. If the Raspberry Pi is improperly shutdown too many times, data corruption in the file system leading to unbootable SD card may result. So we should use a read-only file system. Full instructions and explanations are obtained from this [link](http://ruiabreu.org/2013-06-02-booting-raspberry-pi-in-readonly.html) but you can run these commands directly. I modified some of the instructions for personal convenience. -
Yeo Kheng Meng revised this gist
Sep 9, 2014 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,3 @@ Unlike your typical computer where you usually shutdown properly, I cannot rely on this during the use of my Raspberry Pi. If the Raspberry Pi is improperly shutdown too many times, data corruption in the file system leading to unbootable SD card may result. So we should use a read-only file system. Full instructions and explanations are obtained from this [link](http://ruiabreu.org/2013-06-02-booting-raspberry-pi-in-readonly.html) but you can run these commands directly. I modified some of the instructions for personal convenience. -
Yeo Kheng Meng renamed this gist
Sep 9, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Yeo Kheng Meng created this gist
Sep 9, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,53 @@ ## Convert to a read-only file system (Optional) Unlike your typical computer where you usually shutdown properly, I cannot rely on this during the use of my Raspberry Pi. If the Raspberry Pi is improperly shutdown too many times, data corruption in the file system leading to unbootable SD card may result. So we should use a read-only file system. Full instructions and explanations are obtained from this [link](http://ruiabreu.org/2013-06-02-booting-raspberry-pi-in-readonly.html) but you can run these commands directly. I modified some of the instructions for personal convenience. ```bash #Change timezone. rm /etc/localtime ln -s /usr/share/zoneinfo/Asia/Singapore /etc/localtime #Update everything first, remove cache then reboot to detect problems pacman -Syu pacman -Sc reboot #Relocate DNS cache rm /etc/resolv.conf ln -s /tmp/resolv.conf /etc/resolv.conf #Adjust /etc/fstab, add/modify to the following hashed lines. Mount certain directories to RAM disk. nano /etc/fstab #/dev/mmcblk0p1 /boot vfat defaults,ro,errors=remount-ro 0 0 #tmpfs /var/log tmpfs nodev,nosuid 0 0 #tmpfs /var/tmp tmpfs nodev,nosuid 0 0 #To mount / partition as read-only nano /boot/cmdline.txt #Add an ro flag right after the root= parameter. #Disable systemd services systemctl disable systemd-readahead-collect systemctl disable systemd-random-seed systemctl disable ntpd #Put shortcut shell scripts to re-enable read-write temporarily if needed printf "mount -o remount,rw /" > readwrite.sh printf "mount -o remount,ro /" > readonly.sh chmod 500 readwrite.sh chmod 500 readonly.sh #Remove history history -c -w reboot ``` To enable read-write temporarily to do say an update, just run `./readwrite.sh` . Volume changes do not persist if a read-only file system is used. To change volume permanently, set to read-write, change to desired volume then reboot. ## References 1. [Read-only file system](http://ruiabreu.org/2013-06-02-booting-raspberry-pi-in-readonly.html)