Omega2 how to remount / (root) with write access?



  • Hello! my omega2 mounted / as read only

    /dev/root on /rom type squashfs (ro,relatime)
    proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
    tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
    /dev/mtdblock6 on /overlay type jffs2 (rw,noatime)
    overlayfs:/overlay on / type overlay (ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
    tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
    devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
    debugfs on /sys/kernel/debug type debugfs (rw,noatime)
    mountd(pid1808) on /tmp/run/mountd type autofs (rw,relatime,fd=5,pgrp=1806,timeout=60,minproto=5,maxproto=5,indirect)

    I need to remount it with write access but the mount command does not give me that option:

    root@Omega-D297:~# mount --help
    BusyBox v1.26.2 () multi-call binary.

    Usage: mount [OPTIONS] [-o OPT] DEVICE NODE

    Mount a filesystem. Filesystem autodetection requires /proc.

        -a              Mount all filesystems in fstab                                                                   
        -i              Don't run mount helper                                                                           
        -r              Read-only mount                                                                                  
        -t FSTYPE[,...] Filesystem type(s)                                                                               
        -O OPT          Mount only filesystems with option OPT (-a only)                                                 
    

    -o OPT:
    loop Ignored (loop devices are autodetected)
    [a]sync Writes are [a]synchronous
    [no]atime Disable/enable updates to inode access times
    [no]diratime Disable/enable atime updates to directories
    [no]relatime Disable/enable atime updates relative to modification time
    [no]dev (Dis)allow use of special device files
    [no]exec (Dis)allow use of executable files
    [no]suid (Dis)allow set-user-id-root programs
    [r]shared Convert [recursively] to a shared subtree
    [r]slave Convert [recursively] to a slave subtree
    [r]private Convert [recursively] to a private subtree
    [un]bindable Make mount point [un]able to be bind mounted
    [r]bind Bind a file or directory [recursively] to another location
    move Relocate an existing mount point
    remount Remount a mounted filesystem, changing flags
    ro Same as -r

    There are filesystem-specific -o flags.
    root@Omega-D297:~#

    Has anyone seen this issue before? How do you mount / with write access?

    Thank you.



  • could try remount can't remember exact command but in android it was mount remount google search which flags and proper command



  • The squashfs can't be made writeable, what you need to do is figure out how to fix the overlay so that it combines the writeable jffs2 to capture changes against the read-only squashfs.

    Normally this just works in a stock configuration.

    Wiping your changes back to factory should do it, or you can look into understanding how it is configured and how to debug it, from any of the startup scripts, onion docs (?), LEDE docs, or even openwrt docs as this aspect is fully inherited.



  • @Douglas-Kryder
    I tried to mount -o rw,remount /
    The command did not returned error or any message, but the file system is still read only

    root@Omega-D297:~# mount -o rw,remount /
    root@Omega-D297:~# df
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/root 5632 5632 0 100% /rom
    tmpfs 30384 204 30180 1% /tmp
    /dev/mtdblock6 9280 9132 148 98% /overlay
    overlayfs:/overlay 9280 9132 148 98% /
    tmpfs 512 0 512 0% /dev
    root@Omega-D297:~# mount
    /dev/root on /rom type squashfs (ro,relatime)
    proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
    tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
    /dev/mtdblock6 on /overlay type jffs2 (rw,noatime)
    overlayfs:/overlay on / type overlay (ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
    tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
    devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
    debugfs on /sys/kernel/debug type debugfs (rw,noatime)
    mountd(pid1807) on /tmp/run/mountd type autofs (rw,relatime,fd=5,pgrp=1805,timeout=60,minproto=5,maxproto=5,indirect)
    root@Omega-D297:~# touch /
    touch: /: Read-only file system



  • @Jorge-Alvarado - as @Chris-Stratton said, the squashfs filesystem is technically a read-only filesystem, it cannot be made writable at all.

    However LEDE/OpenWrt uses a setup that combines the non-writable squashfs (containing the FW image as you get it from Onion, mounted at /rom) with a writable overlay which only stores the changes (differences) you make.

    From a user point of view, this makes the entire file system look and feel as if it was writable. But for example you cannot make more space by deleting files from the original firmware - the overlay mechanism can only hide them, but they continue to occupy space in the immutable squashfs.

    Now, looking at your mount output, the problem seems to be that your overlayfs is mounted read-only. That is a bit strange, because stock firmware definitely has this mounted rw from start. But still you can try to remount it:

    mount -o rw,remount /overlay
    

    Definitely, trying to re-mount / is not going to work.



  • Thanks for the explanation @luz, I could not remount the file system with rw. I did a factory reset and now it is writable. I was able to mount my usb card into the omega 2 and I expanded /overlay



  • Can anyone tell me what to do if the place is over and the system writes "read only file system"?

    Your JFFS2-partition seems full and overlayfs is mounted read-only.
    Please try to remove files from /overlay/upper/... and reboot!
    

  • administrators

    @Alexandr-Didenko Looks like you've used up all the storage space on your device.
    Try removing files from /overlay/upper/ and rebooting like the prompt says.



  • @Alexandr-Didenko @Lazar-Demin You may have to restart in safe mode, then mount the file system to remove files.



Looks like your connection to Community was lost, please wait while we try to reconnect.