OpenWrt Forum Archive

Topic: Problem Read-only file system

The content of this topic has been archived on 15 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

i just upgraded from RC3 to RC4 and the first problem occured.
If i type "ipkg update" i get the following error:

root@OpenWrt:/# ipkg update
ipkg: Cannot create directory `/usr/lib/ipkg/lists': Read-only file system
ipkg: Cannot create directory `/usr/lib/ipkg/lists': Read-only file system
ipkg: Cannot create directory `/usr/lib/ipkg/lists': Read-only file system
An error ocurred, return value: 22.
Collected errors:
ipkg_update_cmd: ERROR: failed to make directory /usr/lib/ipkg/lists: Read-only
file system

I upgraded from/to SquashFS and i did the firstboot thingy.
Indeed the root is mounted as read only:

root@OpenWrt:/# mount
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
none on /proc type proc (rw)
none on /tmp type tmpfs (rw,nosuid,nodev)
none on /dev/pts type devpts (rw)

Is there anyone here who knows why this happens? I reflashed 2times. The search did return like 2 people who had the same problem but i couldnt really find a solution.

(Last edited by Kasei on 24 Nov 2005, 19:44)

Hello,

after around 10 flashes (RC3 SquashFS/JFFS2, RC4 SquashFS/JFFS2) it seems to work again.
Currently mounted partitions:

root@OpenWrt:/# mount
/dev/root on /rom type squashfs (ro)
none on /rom/dev type devfs (rw)
/dev/mtdblock/4 on / type jffs2 (rw)
none on /rom/dev/pts type devpts (rw)
none on /proc type proc (rw)
none on /dev type devfs (rw)
none on /tmp type ramfs (rw)

Is that how it should be? I messed around quite a lot so im absolutely not sure what the default settings should look alike. At least it works ... for now.

Is there noone with a working RC4 who will show me his output of this?

root@OpenWrt:/# mount

I had the same problem.  After flashing rc4, every reboot resulted in a read-only root file system.

    root@OpenWrt:/# mount
   /dev/root on / type squashfs (ro)
   none on /dev type devfs (rw)
   none on /proc type proc (rw)
   none on /tmp type tmpfs (rw,nosuid,nodev)
   none on /dev/pts type devpts (rw)

Turns out, I didn't follow the instructions in the README closely enough.  I had initially set no_root_swap=1 in the nvram, then, after running firstboot set it to no_root_swap=0.  That doesn't work!  I discovered that unsetting it did the trick:

   nvram unset no_root_swap

The README clearly says to unset no_root_swap.  no_root_swap=0 seems to be the same as no_root_swap=1.

After fixing the problem:

    root@OpenWrt:/# mount
   /dev/root on /rom type squashfs (ro)
   none on /rom/dev type devfs (rw)
   none on /rom/proc type proc (rw)
   none on /rom/dev/pts type devpts (rw)
   /dev/mtdblock/4 on / type jffs2 (rw)
   none on /proc type proc (rw)
   none on /dev type devfs (rw)
   none on /tmp type ramfs (rw)

Ah! I had this exact same problem and have been trying to figure it out for hours now... the magic "nvram unset no_root_swap" really does need to be made explicit on any documentation or wiki pages that suggest nvram set no_root_swap=1

Anyhow, thanks for figuring this out, and posting the solution.

Probably the same problem as described in ticket #97 in trac.

Hello,

indeed it works. I thought this line "After the system boots you can unset this variable and manually fix the jffs2 partition, or simply run firstboot." gave me the choice to run firstboot instead of unsetting (wich of course didnt work because i set the variable to 0 dooh ...). But that didnt work for me aswell.

Thank you semifor for posting the solution!

The discussion might have continued from here.