From: Adrian Hunter <adrian.hunter@nokia.com>
To: Aras Vaichas <arasv@magellan-technology.com>
Cc: "Bityutskiy Artem \(Nokia-M/Helsinki\)"
<Artem.Bityutskiy@nokia.com>,
MTD-LIST <linux-mtd@lists.infradead.org>
Subject: Re: ubifs mount problem: UBIFS error (pid 1152): validate_sb: bad superblock, error 8
Date: Thu, 20 Aug 2009 14:10:08 +0300 [thread overview]
Message-ID: <4A8D2F10.1050902@nokia.com> (raw)
In-Reply-To: <ed62800908192059g57e85893ga352793e52c43a65@mail.gmail.com>
Aras Vaichas wrote:
> I've got UBI + UBIFS running as my root partition with 2.6.30, and I'm
> using mtd-utils from git downloaded just last week.
>
> I'm building my UBI image as per the instructions at:
> http://www.linux-mtd.infradead.org/faq/ubifs.html#L_mkfubifs
>
> I have successfully created UBI images, formatted, attached and
> mounted them. I'm not an expert, but I'm familiar with the procedure
> now.
>
> For some reason, I am now having problems mounting a known working
> image. The image contains 1 file with a "hello world" text string in
> it. I used to be able to mount it to my 8MB spare partition, but now
> it fails with:
>
> /root # mount -t ubifs ubi1:spareubi /mnt
> UBIFS error (pid 791): validate_sb: bad superblock, error 8
> mount: mounting ubi1:spareubi on /mnt failed: Invalid argument
>
> The strange thing is that I can format, attach and mount this *same*
> image to my other spare partition. It's like the NAND in this
> partition has some problem.
>
> Here are the details:
>
> # cat /proc/mtd
> dev: size erasesize name
> mtd0: 00a00000 00020000 "Bootloader Area"
> mtd1: 03600000 00020000 "Main root filing system partition"
> mtd2: 00800000 00020000 "Spare Partition 1"
> mtd3: 1b800000 00020000 "Spare Partition 2"
> mtd4: 03310800 0001f800 "rootubi"
>
> (*) Attempt to write to the first partition (this fails)
>
> /root # ubiformat /dev/mtd2 -f ubi.img
> ubiformat: mtd2 (nand), size 8388608 bytes (8.0 MiB), 64 eraseblocks
> of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
> libscan: scanning eraseblock 63 -- 100 % complete
> ubiformat: 64 eraseblocks have valid erase counter, mean value is 1
> ubiformat: flashing eraseblock 15 -- 100 % complete
> ubiformat: formatting eraseblock 63 -- 100 % complete
>
> /root # ubiattach /dev/ubi_ctrl -m 2
> UBI: attaching mtd2 to ubi1
> UBI: physical eraseblock size: 131072 bytes (128 KiB)
> UBI: logical eraseblock size: 129024 bytes
> UBI: smallest flash I/O unit: 2048
> UBI: sub-page size: 512
> UBI: VID header offset: 512 (aligned 512)
> UBI: data offset: 2048
> UBI: volume 0 ("spareubi") re-sized from 17 to 58 LEBs
> UBI: attached mtd2 to ubi1
> UBI: MTD device name: "Spare Partition 1"
> UBI: MTD device size: 8 MiB
> UBI: number of good PEBs: 64
> UBI: number of bad PEBs: 0
> 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: 64
> UBI: number of PEBs reserved for bad PEB handling: 2
> UBI: max/mean erase counter: 4/2
> UBI: background thread "ubi_bgt1d" started, PID 807
> UBI device number 1, total 64 LEBs (8257536 bytes, 7.9 MiB), available
> 0 LEBs (0 bytes), LEB size 129024 bytes (126.0 KiB)
>
> /root # mount -t ubifs ubi1:spareubi /mnt
> UBIFS error (pid 823): validate_sb: bad superblock, error 8
> mount: mounting ubi1:spareubi on /mnt failed: Invalid argument
The journal is too big for the partition - see below where it
says:
UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
You will need to force the journal smaller using mkfs.ubifs -j
option.
>
> /root # ubidetach /dev/ubi_ctrl -m 2
> UBI: mtd2 is detached from ubi1
>
> (*) Attempt to write to the second partition (this works)
>
> /root # ubiformat /dev/mtd3 -f ubi.img
> ubiformat: mtd3 (nand), size 461373440 bytes (440.0 MiB), 3520
> eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
> libscan: scanning eraseblock 3519 -- 100 % complete ock 2048 -- 58 % complete
> ubiformat: 3519 eraseblocks have valid erase counter, mean value is 1
> ubiformat: 1 bad eraseblocks found, numbers: 989
> ubiformat: flashing eraseblock 15 -- 100 % complete
> ubiformat: formatting eraseblock 3519 -- 100 % complete aseblock 3422
> -- 97 % complete
>
> /root # ubiattach /dev/ubi_ctrl -m 3
> UBI: attaching mtd3 to ubi1
> UBI: physical eraseblock size: 131072 bytes (128 KiB)
> UBI: logical eraseblock size: 129024 bytes
> UBI: smallest flash I/O unit: 2048
> UBI: sub-page size: 512
> UBI: VID header offset: 512 (aligned 512)
> UBI: data offset: 2048
> UBI: volume 0 ("spareubi") re-sized from 17 to 3410 LEBs
> UBI: attached mtd3 to ubi1
> UBI: MTD device name: "Spare Partition 2"
> UBI: MTD device size: 440 MiB
> UBI: number of good PEBs: 3519
> UBI: number of bad PEBs: 1
> 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: 3519
> UBI: number of PEBs reserved for bad PEB handling: 105
> UBI: max/mean erase counter: 3/2
> UBI: background thread "ubi_bgt1d" started, PID 835
> UBI device number 1, total 3519 LEBs (454035456 bytes, 433.0 MiB),
> available 0 LEBs (0 bytes), LEB size 129024 bytes (126.0 KiB)
>
> /root # mount -t ubifs ubi1:spareubi /mnt
> UBIFS: mounted UBI device 1, volume 0, name "spareubi"
> UBIFS: file system size: 262692864 bytes (256536 KiB, 250 MiB, 2036 LEBs)
> UBIFS: journal size: 9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
> UBIFS: media format: w4/r0 (latest is w4/r0)
> UBIFS: default compressor: lzo
> UBIFS: reserved for root: 0 bytes (0 KiB)
>
> # cat /mnt/README.txt
> Hello World!
next prev parent reply other threads:[~2009-08-20 11:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-20 3:59 ubifs mount problem: UBIFS error (pid 1152): validate_sb: bad superblock, error 8 Aras Vaichas
2009-08-20 11:10 ` Adrian Hunter [this message]
2009-08-21 2:05 ` Aras Vaichas
2009-08-21 5:41 ` Artem Bityutskiy
2009-08-21 4:59 ` Artem Bityutskiy
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=4A8D2F10.1050902@nokia.com \
--to=adrian.hunter@nokia.com \
--cc=Artem.Bityutskiy@nokia.com \
--cc=arasv@magellan-technology.com \
--cc=linux-mtd@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.