Welcome! Log In Create A New Profile

Advanced

[NSA325V2] Bad blocks on mtd0?

Posted by Odradek 
[NSA325V2] Bad blocks on mtd0?
October 02, 2018 11:01AM
Hello everyone! I was going to update uboot, kernel and debian on my NSA325 v2, but it seems i have got some problems.
I am running Uboot
root@nsa325:/# strings /dev/mtd0 | grep U-Boot
U-Boot 1.1.4 (Jul 18 2013 - 10:47:29) Marvell version: 3.5.9
If U-Boot Endiannes is going to change (LE->BE or BE->LE), Then Env parameters should be overriden..
U-Boot
** Invalid partition type "%.32s" (expect "U-Boot")
U-Boot code: %08lX -> %08lX  BSS: -> %08lX
Addresses %dM - 0M are saved for the U-Boot usage.
U-Boot BUG at %s:%d!
, kernel
Linux nsa325 3.18.5-kirkwood-tld-1 #1 PREEMPT Thu Feb 5 17:58:07 PST 2015 armv5tel GNU/Linux
on Debian 7.11 / OMV 2.2.14.
Before updating uboot, I checked for badblocks, and this happens:
root@nsa325:/# nanddump -f /dev/disk/by-label/down /dev/mtd0
ECC failed: 360
ECC corrected: 0
Number of bad blocks: 2
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x08000000...
Otherwise with grep -i 'bad blocks' i got no errors. So, what should i do now? :) Thank you

//adding mtdinfo
root@nsa325:/# mtdinfo /dev/mtd0
mtd0
Name:                           orion_nand
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          1024 (134217728 bytes, 128.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  512 bytes
OOB size:                       64 bytes
Character device major/minor:   90:0
Bad blocks are allowed:         true
Device is writable:             true



Edited 1 time(s). Last edit at 10/02/2018 11:12AM by Odradek.
Re: [NSA325V2] Bad blocks on mtd0?
October 02, 2018 12:57PM
Odradek,

Check for bad block in dmesg

dmesg | grep -i bad


Quote
Step 4 in instruction
4. Be sure there is no bad block in the first 1M of your NAND (check dmesg). This is very important, if there is bad block in the first 1M (8 blocks), don't flash u-boot, because you will almost certainly brick your box. Please post your question here (there is a work around for it).

Example of bad block in mtd0:
dmesg | grep -i 'bad'

[ 2.413231] Scanning device for bad blocks
[ 2.417731] Bad eraseblock 3 at 0x000000060000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 10/02/2018 12:58PM by bodhi.
Re: [NSA325V2] Bad blocks on mtd0?
October 02, 2018 01:00PM
And use this format for nanddump

nanddump --noecc --omitoob  -f mtd0 /dev/mtd0

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [NSA325V2] Bad blocks on mtd0?
October 02, 2018 03:37PM
bodhi Wrote:
-------------------------------------------------------

> Check for bad block in dmesg
>
>
> dmesg | grep -i bad
>

> [/quote]

Hello bodhi, yes i did that and apparently no bad block with that.
Anyhow I decided for a reboot before checking again.. and it did not boot up again, so i checked with the serial connection and saw this:
Dependency failed. Aborted start of /media/dbf7595e-...e7-495e6b54d001 [ ABORT]
Dependency failed. Aborted start of /export/test                       [ ABORT]
Dependency failed. Aborted start of /media/d9805a15-...19-0c3dc6d0810a [ ABORT]
Dependency failed. Aborted start of File System Chec...19-0c3dc6d0810a [ ABORT]
Welcome to emergGive root password for maintenance
(or type Control-D to continue):
so i typed Control-D but then..
[  466.507664] udevd[414]: starting version 175
keyboard-setup[419]: Setting preliminary keymap...done.
[  467.322707] ata1.00: configured for UDMA/133
[  467.327014] ata1: EH complete
hdparm[418]: Setting parameters of disc:  /dev/sda failed!
[  468.402628] ata1.00: configured for UDMA/133
[  468.406930] ata1: EH complete
[  476.262797] ata2.00: configured for UDMA/133
[  476.267094] ata2: EH complete
hdparm[418]: /dev/sdc.
mdadm-raid[417]: Assembling MD arrays...done (no arrays found in config file or                                                automatically).
lvm2[606]: Setting up LVM Volume Groups...  No volume groups found
[  476.602806] ata2.00: configured for UDMA/133
[  476.607107] ata2: EH complete
lvm2[606]: No volume groups found
lvm2[606]: done.
Tried with contrl-d a couple of times but nothing change, what i have to do now?
Thanks!!
Re: [NSA325V2] Bad blocks on mtd0?
October 03, 2018 03:04AM
Odradek,

This problem is in stock OS. So look like your stock rootfs was corrupted.

You could try to reflash stock FW.

Or you could just go ahead and install new Debian rootfs and u-boot by using UART booting with kwboot. Basically go all the way and forget stock FW.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [NSA325V2] Bad blocks on mtd0?
October 03, 2018 04:13AM
bodhi Wrote:
-------------------------------------------------------
> Odradek,
>
> This problem is in stock OS. So look like your
> stock rootfs was corrupted.
>
> You could try to reflash stock FW.
>
> Or you could just go ahead and install new Debian
> rootfs and u-boot by using UART booting with
> kwboot. Basically go all the way and forget stock
> FW.

One or both the hard drives were corrupted in a forced shutdown, so for now i commented them out in /etc/fstab and i am "back in business."

So, nandump with the format you suggested:
root@nsa325:~# nanddump --noecc --omitoob  -f mtd0 /dev/mtd0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x08000000...

and
root@nsa325:~# dmesg | grep -i bad
[    1.579729] Scanning device for bad blocks
[    1.589051] Bad eraseblock 100 at 0x000000c80000
[    1.598840] Bad eraseblock 200 at 0x000001900000
So this, seems bad.. i haven't got these before
Re: [NSA325V2] Bad blocks on mtd0?
October 03, 2018 06:39PM
Odradek,

> So, nandump with the format you suggested:
>
> root@nsa325:~# nanddump --noecc --omitoob  -f mtd0
> /dev/mtd0
> Block size 131072, page size 2048, OOB size 64
> Dumping data starting at 0x00000000 and ending at
> 0x08000000...
>

Looks good.


>
> and
>
> root@nsa325:~# dmesg | grep -i bad
> [    1.579729] Scanning device for bad blocks
> [    1.589051] Bad eraseblock 100 at
> 0x000000c80000
> [    1.598840] Bad eraseblock 200 at
> 0x000001900000
>
> So this, seems bad.. i haven't got these before

This is also OK, as far as u-boot is concerned. These bad blocks are away from mtd0. Looks like they are in the stock rootfs.

So you can install new u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [NSA325V2] Bad blocks on mtd0?
October 05, 2018 05:50PM
Yes, uBoot successfully updated, now time to do a fresh debian installation, thank you
Andybar
Re: [NSA325V2] Bad blocks on mtd0?
October 24, 2018 08:31AM
Hi Odradek,

I‘m searching for the original uboot from a NSA325v2. Can you provide me your dump of mtd0 please?

Kind Regards
Andreas
Re: [NSA325V2] Bad blocks on mtd0?
October 24, 2018 09:30AM
How can i help you? I have already updated to the last version, is it ok?
Andybar
Re: [NSA325V2] Bad blocks on mtd0?
October 24, 2018 09:52AM
Hi, did you have a dump of the Original Stock uboot before you Update the uboot?
Re: [NSA325V2] Bad blocks on mtd0?
October 24, 2018 10:20AM
Yes I did a dump of it, I have to check if I still have it, but it was not the original stock uboot, I already had this one :U-Boot 1.1.4 (Jul 18 2013 - 10:47:29) Marvell version: 3.5.9 . Is it ok for you?
osa
Re: [NSA325V2] Bad blocks on mtd0?
July 13, 2019 08:57AM
Hi, do you still have this dump? Can you put it somewhere in the cloud and provide link?
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: