Results 1 to 5 of 5
  1. sur4die's Avatar
    Posts
    4 Posts
    Global Posts
    6 Global Posts
       #1  
    script it!

    this is an old TiVo series 1 trick

    as root... so
    Code:
    su -
    first make the file system writable
    Code:
    mount -o remount,rw /
    make a rw shell script
    Code:
    echo 'echo "Mounting the root file system in READ-WRITE mode"
    mount -o remount,rw /' > /usr/local/bin/rw
    change it to be executable
    Code:
    chmod 700 /usr/local/bin/rw
    make a ro shell script
    Code:
    echo 'echo "Mounting the root file system in READ-ONLY mode"                          
    mount -o remount,ro /' > /usr/local/bin/ro
    and now make it executable
    Code:
    chmod 700 /usr/local/bin/ro
    now to finish, use your new script to make the file system RO
    Code:
    ro


    simple, yet effective!
    Last edited by sur4die; 06/16/2009 at 04:12 PM.
  2. #2  
    Minor point but I would use chmod 700 instead of 777 for safety.
  3. #3  
    If all you want is R/W access to your USB partition, you could just change it to be mounted owned by UID=1001. That's what I did, now my non-root user can write to /media/internal at all times. Much easier than remounting, and doesn't give r/w access outside the USB partition.

    Link


    -n8
  4. xorg's Avatar
    Posts
    633 Posts
    Global Posts
    1,010 Global Posts
    #4  
    What happens if you leave rootfs in rw mode? I never have put it back in ro mode and all seems ok.
  5. sur4die's Avatar
    Posts
    4 Posts
    Global Posts
    6 Global Posts
       #5  
    Quote Originally Posted by pre_addict View Post
    Minor point but I would use chmod 700 instead of 777 for safety.
    you have to be root to execute the mount command embedded in the script. i suppose someone could surreptitiously modify your script to do something else though... point taken, i'll change it

Posting Permissions