Read-only file system

Discussion in 'Tomato Firmware' started by Mikey242, Dec 13, 2009.

  1. Mikey242

    Mikey242 Addicted to LI Member

    I have recently been trying to make changes on my router (e.g copying custom.css file etc.). Anytime I try to do this I get an error that the file system is read-only. I have tried using both putty and winscp. If i try to chmod any folders I also get the same error. Im not really sure what's going on here, tried both official 1.27 tomato firmware and the latest victek mod firmware.

    Any ideas?

    Thanks in advance.
  2. karogyoker

    karogyoker Addicted to LI Member

    Maybe becouse those things are on the NVRAM and you cant modify them. But i really dont know.

    You can write to /tmp anything.
  3. Planiwa

    Planiwa Network Guru Member

    You can add web pages by putting *.htm files in /var/wwwext.

    NB: .htm (not .html!)


    # l /
    drwxr-xr-x    2 root     root          452 Jul  2 12:04 bin/
    drwxr-xr-x    2 root     root            3 Jul  2 12:04 cifs1/
    drwxr-xr-x    2 root     root            3 Jul  2 12:04 cifs2/
    drwxr-xr-x    1 root     root            0 Dec 31  1969 dev/
    lrwxrwxrwx    1 root     root            7 Jul  2 12:04 etc -> tmp/etc/
    lrwxrwxrwx    1 root     root            8 Jul  2 12:04 home -> tmp/home/
    drwxr-xr-x    1 root     root            0 Dec 13 19:00 jffs/
    drwxr-xr-x    3 root     root          137 Jul  2 12:04 lib/
    lrwxrwxrwx    1 root     root            7 Jul  2 12:04 mnt -> tmp/mnt/
    drwxr-xr-x    2 root     root            3 Jul  2 12:04 opt/
    dr-xr-xr-x   33 root     root            0 Dec 31  1999 proc/
    drwxrwxr-x    3 root     root           20 May 26  2009 rom/
    lrwxrwxrwx    1 root     root           13 Jul  2 12:04 root -> tmp/home/root/
    drwxr-xr-x    2 root     root          464 Jul  2 12:04 sbin/
    drwxrwxrwx    1 root     root            0 Dec 31  1999 tmp/
    drwxr-xr-x    5 root     root           45 Jul  2 12:04 usr/
    lrwxrwxrwx    1 root     root            7 Jul  2 12:04 var -> tmp/var/
    drwxr-xr-x    2 root     root         2045 Jul  2 12:04 www/
    # l /www/ext
    lrwxrwxrwx    1 root     root           11 Jul  2 12:04 /www/ext -> /var/wwwext/
    Note the symlinks to the writable volatile RAM FS.
  4. fyellin

    fyellin LI Guru Member

    As you've already discovered, most of the file system is read-only. You can't modify it, even if you wanted to. You can't chmod the directory, because the directory is also readonly!

    Everything on tomato that is read-write is under the /tmp directory. In his case, you are modifying a pseudo-file system that lives in RAM and is re-created every time the router reboots.
  5. JamminR

    JamminR Network Newbie Member

    Pardon my revival of this years old thread, but I wish to get a bit more information and it relates to the original question of the OP. I found this discussion using Google using similar phrasing.

    Quick background - installed Shibby Tomato 3 days ago.
    LOVING Tomato. Not only does it correct a bandwidth hog issue I was having with original router (SamKnows), it's helped me find some other "gotcha's" on my LAN with it's IP traffic filters.
    Unfortunately, after hours of config, found that it doesn't contain cifs due to size issues from a few build versions back. I don't wish to spend all the time/researching/finding another that does.

    If I place cifs.ko in a volatile area, say /tmp/var/lib/fs, does it come back next reboot, or, like the good old fashioned ramdisk (which it kind of is), does it disappear forever (until I copy it all over again)
    And, if gone next reboot, is there a way, without using USB, to get it stored for next time.
    I've seen mention of nvram command, but, would commit (or another command) store that information to?
    Or is commit just good for settings variables?

    Thank you for the patience of helping this new Tomato-head out.
  6. lancethepants

    lancethepants Network Guru Member

    Anything in /tmp will disappear upon reboot. If your build has jffs, you can enable that for permanent storage to store cifs.ko (if it is large enough). The cifs,ko in my firmware says it is 384K.
    It will be too big to save it to nvram, seeing that the largest available in some routers is 64K.
  7. JamminR

    JamminR Network Newbie Member

    Indeed. My flash is 32k with only 9.5k free.

    Though I see in the Samba File Sharing portion of my WebGUI that there is a /jffs there with non-hidden read/write attributes, I'm unable to write to it using windows or from SSH.

    It seems I have much research to do, and my next questions will likely be a bit outside the scope of this thread's original topic. Thank you for answering and adding to it.
  8. lancethepants

    lancethepants Network Guru Member

    Jffs would have its own menu to enable a writable file system within the tomato gui. Likely it may not be included either, if cifs is not.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice