Why is ubifs mounted read-only by default ?

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

Posts: 11
Joined: Tue Jul 14, 2015 5:18 pm

Why is ubifs mounted read-only by default ?

Thu Mar 31, 2016 12:49 pm

Hello All,

I am using a Sama5d3-Xplained board and found something that puzzles me. I am using the kernel from the Linux4SAM demo, version 4.7, and then creating my own rootfs.

I found that by default, the UBI rootfs image is mounted as read-only, unless the "rw" parameter is specified in the kernel command line.

These are the default bootargs in u-boot (from the Linux4SAM demo):

Code: Select all

console=ttyS0,115200 mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw video=LVDS-1:480x272-16
If the "rw" parameter is passed, then the UBI rootfs image is mounted in read/write mode. However if this parameter is missing, the image is mounted read-only:

Code: Select all

UBIFS: mounted UBI device 0, volume 0, name "rootfs", R/O mode
Why is this happening? My understanding (and also what I have seen in other cases) was that if neither "ro" nor "rw" are specified, then the default is read/write. Perhaps this is a configurable kernel setting?

Thank you for any hints.


Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 4 guests