Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an ARM system using buildroot-2011.05 - Linux The board uses a NAND flash and to get around a problem with squashfs not liking bad blocks I changed the root file system to use read-only UBIFS instead.

The system now boots Ok but I am concerned by and can't find the source of a kernel message about remounting the UBI volume R/W:

[    1.540000] UBIFS: read-only UBI device
[    1.630000] UBIFS: recovery needed
[    1.700000] UBIFS: recovery deferred
[    1.710000] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[    1.710000] UBIFS: mounted read-only
[    1.720000] UBIFS: file system size:   14321664 bytes (13986 KiB, 13 MiB, 111 LEBs)
[    1.720000] UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
[    1.730000] UBIFS: media format:       w4/r0 (latest is w4/r0)
[    1.740000] UBIFS: default compressor: lzo
[    1.740000] UBIFS: reserved for root:  0 bytes (0 KiB)
[    1.750000] VFS: Mounted root (ubifs filesystem) readonly on device 0:14.
[    1.760000] devtmpfs: mounted on dev
[    1.770000] Freeing init memory: 104K
**[    2.060000] UBIFS: cannot re-mount R/W - UBI volume is R/O**

It uses barebox init (no sysvinit) but I think the message is generated before it gets to this. There are posts on the net about the UBIFS bug when remounting R/W after an error but this isn't the case, it's mounted read only to begin with. All I can think of is there could be default kernel behaviour to mount the rootfs r/w.

Kernel bootargs:

 console=ttymxc0,115200 rootfstype=ubifs ro ubi.mtd=3 root=ubi0:rootfs otg_mode=host lpj=514048 mtdparts=mxc_nand:256k(barebox)ro,128k(bareboxenv),3M(kernel),16M(rootfs)ro,16M(flash),-(misc)

Relevant parts of inittab and fstab:

    ::sysinit:/bin/mount -t proc proc /proc
    ::sysinit:/bin/mkdir -p /dev/pts
    ::sysinit:/bin/mount -a

    proc            /proc           proc     defaults                                                       0                       0
    devpts          /dev/pts        devpts   defaults,gid=5,mode=620                0                       0
    tmpfs           /tmp            tmpfs    defaults                                                       0                       0
    tmpfs           /var            tmpfs    defaults                                                       0                       0
    sysfs           /sys            sysfs    defaults                                                       0                       0
    /dev/mtdblock4  /mnt/flash      jffs2    noatime  

Any help gratefully received!

share|improve this question

Do make menuconfig for buildroot.

Then in the 'System Configuration' menu, make sure that 'remount root filesystem read-write during boot' is not selected.

share|improve this answer

I was tracking a similar issue. I specified a read-only rootfs on the kernel cmdline and saw UBIFS mounting as read-only during startup, but / was mysteriously read-write by the time I got to a shell.

In my case, the /etc/init.d/mountall script turned out to contain the line

/bin/mount -o remount,noatime,nodiratime /dev/root /

In turn, the generation of that script was controlled by a file system configuration option in my board's SDK. The details may vary depending on your setup, but check your init scripts and check any configuration options that generate them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.