From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] ubifsmount reports "Error reading superblock", but linux can mount FS
Date: Wed, 7 Mar 2012 16:38:51 +0100 [thread overview]
Message-ID: <201203071638.51395.sr@denx.de> (raw)
In-Reply-To: <CANNiwJJb2y92v8W5u4gBtg8V=2P0NidBtTRdSboPVUBPsYYZWw@mail.gmail.com>
Hi Alex,
On Wednesday 07 March 2012 16:14:28 Alex Zeffertt wrote:
> On 7 March 2012 14:42, Alex Zeffertt <azeffertt@cambridgesys.com> wrote:
> > Hi u-booters,
> >
> > I have a short script in my u-boot environment which chooses which of
> > two ubifs partitions to boot
> > by attempting to read a release file in each one.
> >
> > Unfortunately, after an unclean shutdown sometimes the ubifsmount
> > fails. (By "unclean shutdown"
> > I mean that the board was power cycled while doing some low bandwidth
> > logging.)
> >
> > The strange thing is that Linux has no problem mounting the partition
> > as its root filesystem. This is
> > very confusing because it looks like the ubifs implementation in
> > u-boot is just a copy of the one in Linux.
Correct. The U-Boot version is mainly a copy of the Linux version. With minor
changes. But its based on an older Linux version. Many changes have gone into
the UBI Linux code.
> > Has anyone else seen this problem?
> >
> > Regards,
> >
> > Alex
> >
> > PS My kernel is linux-3.0.0/armv5tel and the full u-boot trace is below:
> >> U-Boot 2011.06 (Feb 10 2012 - 12:29:06)
> >> OpenRD-Base
> >> SoC: Kirkwood 88F6281_A1
> >> DRAM: 128 MiB
> >> NAND: 512 MiB
> >> *** Warning - bad CRC, using default environment
> >> In: serial
> >> Out: serial
> >> Err: serial
> >> Net: egiga0
> >> 88E6351 Initialized on egiga0
> >> Hit any key to stop autoboot: 0
> >> Creating 1 MTD partitions on "nand0":
> >> 0x000001000000-0x000010000000 : "mtd=2"
> >> UBI: attaching mtd1 to ubi0
> >> UBI: physical eraseblock size: 131072 bytes (128 KiB)
> >> UBI: logical eraseblock size: 126976 bytes
> >> UBI: smallest flash I/O unit: 2048
> >> UBI: sub-page size: 512
> >> UBI: VID header offset: 2048 (aligned 2048)
> >> UBI: data offset: 4096
> >> UBI: attached mtd1 to ubi0
> >> UBI: MTD device name: "mtd=2"
> >> UBI: MTD device size: 240 MiB
> >> UBI: number of good PEBs: 1913
> >> UBI: number of bad PEBs: 7
> >> UBI: max. allowed volumes: 128
> >> UBI: wear-leveling threshold: 4096
> >> UBI: number of internal volumes: 1
> >> UBI: number of user volumes: 1
> >> UBI: available PEBs: 0
> >> UBI: total number of reserved PEBs: 1913
> >> UBI: number of PEBs reserved for bad PEB handling: 19
> >> UBI: max/mean erase counter: 7/1
> >> UBIFS: recovery needed
> >> Error reading superblock on volume 'ubi:rootfs'!
> >> UBI: mtd1 is detached from ubi0
>
> I've been comparing the linux and u-boot implementations, and it looks
> like the following fix is in the kernel
> but not in u-boot. I don't really understand it, but it looks like a
> candidate. Might porting this change to
> u-boot fix the issue?
Hard to tell. Might be worth a try, if its not too complicated. It would be
great if you could report the outcome of this. And best to send this patch to
the list as well.
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
next prev parent reply other threads:[~2012-03-07 15:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 14:42 [U-Boot] ubifsmount reports "Error reading superblock", but linux can mount FS Alex Zeffertt
2012-03-07 15:14 ` Alex Zeffertt
2012-03-07 15:38 ` Stefan Roese [this message]
2012-03-08 9:49 ` Alex Zeffertt
2012-03-08 9:57 ` Stefan Roese
2012-03-08 16:36 ` Alex Zeffertt
2012-03-08 18:18 ` Wolfgang Denk
2012-03-09 9:39 ` Alex Zeffertt
2012-03-09 14:02 ` Wolfgang Denk
2012-03-09 18:10 ` Alex Zeffertt
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=201203071638.51395.sr@denx.de \
--to=sr@denx.de \
--cc=u-boot@lists.denx.de \
/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