State of read-only filesystems in NAND / MTD bad blocks handling when reading

Ricard Wanderlof ricard.wanderlof at axis.com
Fri May 4 04:34:11 EDT 2012


On Fri, 4 May 2012, Thilo Fromm wrote:

>> With a root file system in ubifs, you can boot directly with a root
>> filesystem in UBI, with a kernel command line such as
>>
>> ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
>>
>> I don't know how far back that was possible, you were using 2.6.27 were you
>> not (in my case I'm using 2.6.35)?
>
> This would work for me (since I'm on 2.6.37) but I deeply eschew the
> complexity this approach would bring to our system. Don't get me wrong
> - I really like UBIFS; we use it for application partitions. I just
> don't think it's the right thing to use for a RO rootfs. I want
> simple.

If you are using ubifs already on your system then you have all the 
required parts at hand. From a use point of view ubifs as a rootfs is 
simple; create a volume for your rootfs, write your data, specify 
appropriate parameters on the command line. So in that sense it is simple, 
even if a lot goes on 'under the hood'.

In a comparison I did a while ago, switching from jffs2 to ubifs cut about 
9 seconds off the boot time for our system (which was in the range of one 
minute to start with) and gave us 3 MB more of free RAM after boot. It did 
consume a couple of MB more of flash (the jffs2 file system was 18 MB, the 
ubifs one 22 MB).

So yes, it may be overly complex, but in practice I feel there are 
significant advantages: faster boot and consistent use of UBI/ubifs 
throughout the whole system in this case.

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30



More information about the linux-mtd mailing list