From: Marcus Osdoba <marcus.osdoba@googlemail.com>
To: buildroot@busybox.net
Subject: [Buildroot] rootfs.ubifs not able to mount by kernel
Date: Sun, 30 Jan 2011 11:30:54 +0100 [thread overview]
Message-ID: <4D453DDE.7000007@googlemail.com> (raw)
In-Reply-To: <20110130014541.ed0f21fc085cea67a12906c6b8e6fb44.9d3b1440ba.wbe@email10.secureserver.net>
Am 30.01.2011 09:45, schrieb nataraj at vaaraahi.com:
> Hi Jacmet, Kos_tom & friends
>
> I am trying to boot from a ubifs file system from u-boot. I am able to
> write my "rootfs.ubifs" onto nand flash, and then, mount and list
> using 'ubimount' and 'ubifsls' commands, in u-boot. But getting kernel
> panic when kernel tries to mount the rootfs.I am using arm-linux
> kernel on at91sam9263 Soc gadget having 256M Nand flash.
Hi,
Writing a ubiFS on NAND (with RAW u-boot command) and mounting
afterwards is not possible. The produced ubiFS must be ubinized to a UBI
image.
I must admit, that I did not exactly understand the diffrence between
ubifs and ubi, but as explained on the mtd-utils page, the ubifs is the
FS layer to the kernel in a traditional sense (like ext2FS) and ubi is a
technical layer between RAW NAND and FS.
http://www.linux-mtd.infradead.org/doc/ubi.html
http://www.linux-mtd.infradead.org/doc/ubifs.html
I already used ubifs and ubiimages on my target device and can confirm,
that you have to create the ubifs image AND afterwards you have to
UBINIZE it BEFORE writing it on NAND.
Excerpt from
http://gitorious.org/dockstar/emdebian-multistrap/blobs/master/mkubi-img.sh
..
echo "Generating UBIFS out of target dir: $ROOTFS"
mkfs.ubifs -r $ROOTFS $UBIFS_OPTS -o $UBIFS_IMAGEFILE
echo "Generating UBI image out of file $UBIFS_IMAGEFILE"
ubinize $UBINIZE_OPTS ubinize.cfg -o $UBI_IMAGEFILE
..
I wrote the ubinized image on the NAND flash and the linux kernel could
be read via u-boot ubifsload from that nand partition without problems.
Furthermore the kernel accepted the ubifs on the ubi parition as rootfs.
>
> Specific errors being:-
> UBIFS error (pid 1): ubifs_get_sb: cannot open "ubi0:rootfs", error -19
> VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
I guess, the ubifs on the UBI(without fs) parition could not be loaded
(because you didn't create one ;-) ).
I think it is possible to write a ubifs image onto a formerly created
ubi parition with mtd-utils (this would preserve the write counters of
the ubi layer). But I never tried that (because I didn't bookmark the
site where I found that information...).
May be it is possible to "format" or better prepare the ubi parition
with some u-boot command and write the ubiFS image on it... But I was
happy with my ubi image and since it worked, I didn't have a deeper look
into u-boot commands...
Regards,
Marcus
next prev parent reply other threads:[~2011-01-30 10:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-30 8:45 [Buildroot] rootfs.ubifs not able to mount by kernel nataraj at vaaraahi.com
2011-01-30 10:30 ` Marcus Osdoba [this message]
2011-01-30 14:20 ` Thomas Petazzoni
2011-01-31 21:18 ` Marcus Osdoba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D453DDE.7000007@googlemail.com \
--to=marcus.osdoba@googlemail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox