Welcome! Log In Create A New Profile

Advanced

Backup and Restore NAND mtds - Pogoplug V4 original MTD partitions

Posted by bodhi 
Re: Backup and Restore NAND mtds - Pogoplug V4 original MTD partitions
October 28, 2015 11:50PM
Ryan,

Your rootfs creation procedure was not done properly. This is what I always tried to tell users: the rootfs creation must be done exactly as instructed. Don't try to substitute a command in the instruction for another that you think will work.

You need to use a Linux box and log in as root. Use openwrt is great, try that again until you're successful. You need to install bzip2 if the tar -xjf command did not work (-j means using bzip2).

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
up up~!

hello bodhi,

my steps above need your confirmation.

thanks~!
Re: Backup and Restore NAND mtds - Pogoplug V4 original MTD partitions
November 04, 2015 02:08AM
Ryan,

Your steps will not work. See my post above.


Quote

Your rootfs creation procedure was not done properly. This is what I always tried to tell users: the rootfs creation must be done exactly as instructed. Don't try to substitute a command in the instruction for another that you think will work.

You need to use a Linux box and log in as root. Use openwrt is great, try that again until you're successful. You need to install bzip2 if the tar -xjf command did not work (-j means using bzip2).

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
hi bodhi

I am sorry for staying at page1, so I missed your reply in page2.

I will try again .

Thanks~!
Re: Backup and Restore NAND mtds - Pogoplug V4 original MTD partitions
January 26, 2016 10:22AM
Hello,

I can boot debian 3.16 rootfs and have serial and SSH working but I need stock files (full mtd0 or uboot and envs) for Pogoplug E02 (pink). I used archlinux tutorial and it didn't backup.
Re: Backup and Restore NAND mtds - Pogoplug V4 original MTD partitions
January 27, 2016 02:04AM
Re: Backup and Restore NAND mtds - Pogoplug V4 original MTD partitions
January 27, 2016 07:23AM
Re: Backup and Restore NAND mtds - Pogoplug V4 original MTD partitions
January 29, 2016 07:03PM
bodhi wrote:
>Don't do this if you have any bad block in these MTD partitions

In my DockStar dmesg shows:

Bad eraseblock 461 at 0x0000039a0000
Bad eraseblock 2553 at 0x000013f20000
Bad eraseblock 3186 at 0x000018e40000
Bad eraseblock 3322 at 0x000019f40000
Bad eraseblock 3905 at 0x00001e820000

Currently:

dev: size erasesize name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 02000000 00020000 "rootfs"
mtd3: 1db00000 00020000 "data"

When updating to the latest Uboot and kernel, all these mtds will be rewritten - correct? So the question is, when flashing the NAND, will the bad blocks be remapped automatically - for Uboot or kernel install, and by what program? If not, what will happen at update?

How often uImage and rootfs are written to NAND if booting from a USB Thumb - at each boot?

Do I need to remap or repair these bad blocks before the updates, and how?



Edited 2 time(s). Last edit at 01/29/2016 07:06PM by sambul14.
Re: Backup and Restore NAND mtds - Pogoplug V4 original MTD partitions
January 29, 2016 09:00PM
sambul14,

> How often uImage and rootfs are written to NAND if booting from a USB Thumb - at each boot?

> When updating to the latest Uboot and kernel, all
> these mtds will be rewritten - correct?

They are never written by booting. u-boot image in mtd is read at boot by the boot ROM, and executed in RAM. And if you boot my released kernel/rootfs, they are in external drive (USB or HDD), not in NAND.

Only mtd0 is erased and written by flashing u-boot.

> Do I need to remap or repair these bad blocks
> before the updates, and how?

You actually don't need to. They will be ignored by the flashing commands.

The warning in the instruction not to flash an MTD if there are bad blocks in it is because: they cause the block size in the commands to change, so it is no safe to flash without examining the situation closely.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 01/29/2016 09:08PM by bodhi.
Re: Backup and Restore NAND mtds - Pogoplug V4 original MTD partitions
July 05, 2017 03:18AM
Hi Bodhi,

I have a Pogoplug E02 (pink) that I'm attempting to restore to factory default. I have a copy of the original MTD0 images. Are your instructions for "How to restore NAND in Linux (any distro) applicable to the E02? Thanks in advance!
Re: Backup and Restore NAND mtds - Pogoplug V4 original MTD partitions
July 05, 2017 01:06PM
dumdedumda,

> I have a Pogoplug E02 (pink) that I'm attempting t
> o restore to factory default. I have a copy of the
> original MTD0 images. Are your instructions for "H
> ow to restore NAND in Linux (any distro) applicabl
> e to the E02? Thanks in advance!

The commands to restore are similar, but not exactly the same. The Pogo E02 has different mtd partition layout. It's very simple, but to be sure that you will not overwrite other partitions and it is the correct mtd0 backup, you should get these information:

System where you do the restore
uname -a
Commands syntax
flash_erase --help
nandwrite --help
Current partition layout
cat /proc/mtd
What the size of the Pogo E02 mtd0 backup file?
ls -lh mtd0

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
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: