Set system/root as read-write by default

hi, here’s what i did :

#1 su (password : music)
#2 mount / -o remount,rw
#3 nano /etc/fstab
#4 remove ,ro from the 3rd line (ext4 partition n°2 i think)
#5 ctrl+o to save, ctrl+x to exit
#6 reboot

it works… but how long before i break my OS (?) :sweat_smile:

:v:

you can then set the correct time and date this way :

date -s “21 DEC 2019 19:35:00”

it looks like it stays then even after removing the batteries :slight_smile:

this is generally not a good idea :wink:

the advantage of having a RO filesystem, is if its not shutdown correctly then it should not become corrupted…

you’ll see quite a few complaints on the rPI forum of people that have corrupted sdcards then have to rebuild the rPI image.

also, really if you set up applications correctly, then usually they do not need the root partition writeable … the reason this is not the default is because on desktop linux systems its a non issue - they they are using proper disks.

1 Like

thanks for these advices, i’ll try to configure softwares i added to run on a RO filesystem, but another reason was that i really often have to run the remount,rw command (for screenshots, for example) witch is annoying, also and most of all : the time and date of files… but i was thinking a RW filesystem would be the same as running a desktop linux…

(isn’t the SuperUser thing enough to “secure” the system…?)

it’s a hard choice, anyway thanks for the help again, it reminds me i have to make backups more often :wink:

Su has nothing to do with file system protection

There is a a script to remount filesytem (something like fwdir/scripts/remounted.sh , you could create an alias )

But… usually you should not need to be doing this that often if you setup things right in the first place.

It’s different on a desktop system since they have hardisks which are designed to be continually used.

Also the organelle-m primary use is an instrument not a general purpose computer - if your not careful with what you install and how you change the config you might start affecting its performance for this use - and it’ll be hard for C&G to support since you have ‘modded’ it so much.
Of course this is not an issue if you know what your doing - after all it’s yours to do as you please :wink:

1 Like

the script is named remount-rw.sh , i’m sorry but i tried a few times (and just retried right now) and it never works, the only way i know to do it is by switching to SU then run the command manually, witch is why it’s annoying actually…

EDIT : i made these scripts (remount-rw.sh and remount-ro.sh) to work just by adding sudo before the command, i feel stupid not to have discovered this before, i thought it would require to enter the password…) so i made an extra menu to switch easily :grimacing:

here it is : https://patchstorage.com/remount/

with this, finally i set my system back to RO by default but i have to check if the time and date stays correct over time… thanks again :wink:

exactly

it is always better to use sudo rather than using su…

the reason is, its easy to mistype a command when running as root , and destroy your system (*).
therefore the idea is we use sudo to prefix commands when (and only when!) they need root permissions.

the other good reason for doing this, is if you start assuming root privileges at the wrong time - what can happen is that you’ll run a process that creates a file as root, which then means later it cannot be run by a normal user… as that user cannot overwrite the file!


(*) I had a rookie at work that manage to destroy a production server doing this :angry:

2 Likes

this is a bad idea for general users to get into the habit of using…

yeah it may not be a safe thing to share, i removed it

This sage advice applies to all UNIX machines with either removable media or removable power, going back to 1970 :slight_smile:

In our modern world, that would mean “raspberry Pi” and the like specifically.

1 Like