Welcome! Log In Create A New Profile

Advanced

So is there a program to take the nanddump and load it back unto NAND? (restore nand program)

Posted by rgtaa 
So is there a program to take the nanddump and load it back unto NAND? (restore nand program)

I saved my Nand using these commands :
cd /tmp
mkdir usb
mount /dev/sda1 /tmp/usb
wget http://plugapps.com/os/pogoplug/uboot/nanddump
chmod +x nanddump
./nanddump -nf usb/mtd0 /dev/mtd0
./nanddump -nf usb/mtd1 /dev/mtd1
./nanddump -nf usb/mtd2 /dev/mtd2
umount /dev/sda1

Is there a way to now LOAD back on from usb stick back onto NAND (restore nand) ?



Edited 1 time(s). Last edit at 11/30/2010 12:09PM by rgtaa.
I think it is "flash_erase", followed by "nandwrite". For an example of how this is done, see Jeff's install_uboot_mtd0.sh script.

Please understand though, that if you write to the wrong parts of NAND, you can wind up with a bricked device, so make sure you are careful and fully understand what you are doing before playing with these commands.
Thanks for the tips.

I did look at jeff's script and it has a ton of stuff on it , far to many pages of commands for what I'm looking to do.

I'm thinking there should be a guide to do it.

We are asked to make backup of NAND, which I did, and was given clear cut method to do it, see my first post, ... so of course , there has to be a RESTORE method , for taking that backup and putting it back on NAND, where is it? Lots of folks could find that helpful.

I have a tonidoplug and a dockstar that I saved NAND and I would like to put those saved files back on these devices. Is there a link or something , so I can do it.

I would think this guide would be very useful to a lot of us, that have problems with these devices, as long as you can ssh in or can boot up from usb stick, why not have it available , why else would we make a backup of NAND , if not for in future to restore it. Right?



Edited 5 time(s). Last edit at 11/30/2010 02:42PM by rgtaa.
One way I know should work is to use a serial cable. So the backup is at least useful. To do restore without serial cable is much nicer. However, it will not be useful if you will need to have Pogoplug linux working. Because if one messed up the MTD's, the Pogoplug Linux will not work. This is probably the reason why you will need to restore in the first place. One useful case is Pugoplug is not working but you can still boot into the USB Debian using Jeff's boot loader and you can use the USB debian to reflash the memory. This is the situation I am in and I am waiting for the CA-42 cable. It will be nice I can do restore without the cable.
YES

We are in same position.

We both can boot into usb debian from stick, but I can't do anything with NAND.

I have the cable, but I figured we shouldn't need it to do this process.

If we can backup the NAND to usb stick, we should be able to reverse it, why is nothing on the web about this. We don't need cat 42 to do this, since we both can boot into stick.

Now there are 2 of us.

I want to do this with a tonidoplug and a dockstar . I saved both backup NANDS via usb stick.

But we need very accurate copy and paste so we don't screw stuff up.


Jeff
If you read this, you created a way to backup our NANDS , I see it on pogoplug page, but NO where I could find on the web do I see the other 1/2 of the equation. Restoring the NAND back onto the NAND.

Obviously there is a way to do it, without cat42 if you can boot into debian from stick.
I recommend putting that as sticky , because it would be good for people that have all the plugs/dockstars/tonidoplugs/ect. You have specialized way to do it, but only for dockstar but they are not using the NAND backups we made.
Someone please show us how to do this, I have been waiting for a few months on one of my dockstars. :)



Edited 2 time(s). Last edit at 11/30/2010 04:51PM by rgtaa.
rgtaa Wrote:
-------------------------------------------------------

> We are asked to make backup of NAND, which I did,
> and was given clear cut method to do it, see my
> first post, ... so of course , there has to be a
> RESTORE method , for taking that backup and
> putting it back on NAND, where is it? Lots of
> folks could find that helpful.

I agree. All the guides advise you to make a backup of the nand before making any changes, but for the life of me I can't find any instruction on how to restore the backups. I don't need a script, just the uboot prompt instructions using tftp
Jeff
Could you make a nandrestore file , so we can reverse the process?

You made a nanddump file.
wget http://plugapps.com/os/pogoplug/uboot/nanddump

Not sure how to restore the nand I saved back onto the tonidoplug and dockstar.



Edited 1 time(s). Last edit at 12/03/2010 10:48AM by rgtaa.
rgtaa Wrote:
-------------------------------------------------------
> Jeff
> Could you make a nandrestore file , so we can
> reverse the process?
>
> You made a nanddump file.
> wget
> http://plugapps.com/os/pogoplug/uboot/nanddump
>
> Not sure how to restore the nand I saved back onto
> the tonidoplug and dockstar.


+1
Nobody wants to answer that...

I did some trial and error and found a combination of parameters that doesn't throw errors

backup done with nanddump -nf file
seems to be restored correctly with:

nandwrite -oaf device imagefile

eg.
nandwrite -oaf /dev/mtd2 mtd2backup.img

I'm not sure if it works correctly yet.
Test at your own responsibility

The important thing is the -o attribute. f doesn't seem to be needed, I'm not sure.



Edited 2 time(s). Last edit at 01/12/2011 04:45PM by naugtur.
The reason others haven't responded is that we haven't really tried a restoral ourselves, so we cannot speak with authority. I would, however, try naugtur's method above if I needed to restore my NAND. Another possibility, using the uboot as the restoral vehicle, is outlined here:

http://plugcomputer.org/plugforum/index.php?topic=878.msg16414#msg16414

Of course, you'd have to modify this for the type of filesystem the backup is stored on, and perhaps do it in several chunks if the partition being restored is larger than your device's memory.
By analysis Jeff's install_uboot_mtd0.sh you need a flash_erase before you can nandwrite, also the input image to be used by nandwrite should be generated by "nanddupm -nof" but NOT "nanddupm -nf":

I have construct the following procedures to restore mtd1-2 (NOT TESTED USE IT AS YOUR OWN RISK!!!):

# Erase the full 4MBytes of mtd1
flash_erase /dev/mtd1 0 20
# Restore the "nanddupm -nof" image of mtd1 should be exactly 4194304 bytes in size
nandwrite /dev/mtd1 mtd1.img

# Erase the full 32MBytes of mtd2
flash_erase /dev/mtd2 0 100
# Restore the "nanddupm -nof" image of mtd2 should be exactly 33554432 bytes in size
nandwrite /dev/mtd2 mtd2.img
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: