Reply
Thread Tools
Posts: 4,030 | Thanked: 1,633 times | Joined on Jul 2007 @ nd usa
#1
Fanoush has tried hard to show me how to do it for years....well, to teach how to dance...gracefully is NOT easy . I read nhanquy finally posted a script and I played with it, and I like it and here it is.

To freely clone/copy/backup between SD1 and SD2, now include reverse clone back to internal Flash
Prerequisite (only have to do it once):
partition (8 G SD in external slot, behind the kick stand, not the one with the battery compartment)
xterm
gainroot
umount /media/mmc1
sfdisk /dev/mmcblk1 -uM
0,6900,0C
,,,
(Return)
(Return)
This will give you 6.7G FAT2 for your storage and 0.9 G for your OS
reboot

format (SD in external slot, behind the kick stand, not the one with the battery compartment); will need to do it eveytime to clone)
xterm
gainroot
umount /media/mmc1
mkdosfs /dev/mmcblk1p1
mke2fs /dev/mmcblk1p2
reboot

Either copy the commands here, line by line, http://talk.maemo.org/showthread.php...407#post289407, thread #46
or better to avoid typo, download nhanquy's script cpxx.txt to default folder /home/user/, http://talk.maemo.org/showthread.php...273#post288273, thread #3
boot up from internal flash
xterm
gainroot
cd /root
cp /home/user/cpxx.txt /root/cpxx.sh
chmod +x cpxx.sh

Prerequisite: the target SD ext2 is similarl or larger than the source, and already formatted and partitioned
this one is for mmc2 to copy to mmc1. 2 is the source and 1 is the target. If you cannot follow this, you need to stop here . Of course you can do vice versa after "carefully" changing all the 1s and 2s.

./cpxx.sh
and option 3

If you have 2 SDs of the same partition/capacity, you can clone/copy at will, back and forth, and keep refining the OS to your likeness. Of course, you cannot do this with cloning from the internal flash as it is limited by the 256 MB capacity.

When we first started, we cloned from internal flash to SD and made SD boot...However, after awhile, internal flash no longer able to hold our appetites, 256MB is really too small, I found out I rarely boot to internal flash nowaday, I permanently boot to SD, as a result, clones between the disk is becoming a necessity. Plus the fact, with modifying things on the SD boot, my actual work horse, backup/cloning between SDs comes real handy.

Would this work on N810? It should, as long as the preformatted ext2 partition, again, is target equal or larger than the source. Would I recommend it? Some reservation, as MMC2 in the N810 is not removable.

Finally, linux guru may he-ha about this little app script, basically it is just several lines of command put together... well, for the linux-challenged bunanson, this is god-send.

Enjoy, and thank nhanquy,

Edit: This is a work in progress, please see latest thread for most recent changes

bun

Last edited by bunanson; 2009-08-26 at 21:26.
 

The Following 7 Users Say Thank You to bunanson For This Useful Post:
Posts: 4,030 | Thanked: 1,633 times | Joined on Jul 2007 @ nd usa
#2
Gvm beta4 still unstable, and crashed my MerckManual. Before, I would have to re-sync several times and to hit it once, to get it up again. Today, I dont, I just reclone from my other copy,

xterm
gainroot
mke2fs /dev/mmcblkXp2 (X=0 for internal, X=1 for external)
,/cpxx.sh

I got to put it down, just in case I dont remember, thanks nhanquy,


bun

Last edited by bunanson; 2009-06-13 at 07:01.
 
Posts: 678 | Thanked: 197 times | Joined on Jul 2007 @ San Jose CA
#3
If you like the idea of copying/cloning (internal flash to SD cards or between the SDs) ; here is the script to do that.
This script actually copies source to destination.
Just make sure what we agree on
  • Destination SD (dst SD) for cloning:
    This would be either the external SD (behind the kick stand) or the internal SD (in case of the N810 this is the 2G somewhere inside)
  • Source (src) for cloning:
    This would be the 256MB internal flash, the internal SD, or the external SD.
So we can clone (more precisely copy) :
  • internal flash -> internal SD
  • internal flash -> external SD
  • internal SD -> external SD
  • external SD -> internal SD
  • Partition/Format the destination SD:
    The script will do that for you but you have to run the script three times because it has to shutdown the N8x0 every time it makes a file system on a partition. If you select to partition/format the destination SD; you must shut down the N8x0 every time the script asks.
    It will create the first partition as FAT32 and the second as ext2 file systems.

    If you try to bypass partition/format the destination card; then the script will assume you already has done that with the 2nd partition on the card as a linux partition, ext2 or ext3 partition (you should have more room on the destination than on the source, right ?)
  • What will it do or not do?
    It will only run under root ( rootsh is here)
    It will try to get e2fsprogs package but you should do that prior running this script.
    It will not set up bootmenu. You should install bootmenu before cloning.
    It will assume that the second partition is for installing linux (in case you don't want the script partitioning/formatting your destination card)
    It will be able to partition/format the SD without cloning. Just run the script, select the dst SD and src then ignore the cloning part (only the dst SD is important and when it asks to shutdown please say yes! and run it again next time until it says Jobs done! ) So the script can be used as a simple sfdisk!
  • How to run it?
    • boot from internal flash
    • download the script (to /home/user/)
    • chmod +x it
    • run it

    Code:
    xterm
    gainroot
    mv clone.txt clone.sh
    chmod +x clone.sh
    ./clone.sh
If someone likes to improve it; please do so and post it back here so we can use it!!!!
Attached Files
File Type: txt clone.txt (6.6 KB, 720 views)

Last edited by nhanquy; 2009-06-12 at 00:06. Reason: insmod ext3
 

The Following 7 Users Say Thank You to nhanquy For This Useful Post:
JayOnThaBeat's Avatar
Posts: 1,028 | Thanked: 578 times | Joined on Mar 2009 @ Chicago
#4
I would definitely try this, but both my internal and external cards are full!

Awesome work guys!
__________________
maemo.org search
I AM NOT A ROLE-MODEL.
 

The Following User Says Thank You to JayOnThaBeat For This Useful Post:
Posts: 263 | Thanked: 77 times | Joined on Jan 2009 @ Sigtuna, Sweden
#5
Great to have a recipy !

Maybe it will help me Linux beginner to understand a bit better how cloning works . . .

Other beginners :
Do not forget

Penguinbait's Console Tools !

They simplify the process by hiding details and reducing the consequences of typos.

( I hope for a wiki with the guides above.)
 

The Following User Says Thank You to KristianW For This Useful Post:
Posts: 4,030 | Thanked: 1,633 times | Joined on Jul 2007 @ nd usa
#6
Preliminary version of a work-in-progress back-up script, one touch (complete) back up. The complete is the work-in-progress.....


The script will format target ext2 partiton, where OS lives, and will leave your FAT32 untouch.
Prerequisite 1) must be adhere to, otherwise, be prepare to reflash your tablet
You may want to backup your tablet on 1st run, just in case; I have used it more than a dozen times, works fine.
WARNING WARNING WARNING...
This is a prelim version, and there is absolutely no error trapping, so you make mistake between intFlash/MMC1/MMC2, you would wipe out your working OS and be prepare to reflash.
Otherwise, this is a very useful one touch backup tool. It has been tested and works alright. Do NOT get the Warning statement discourage you, you really have to intentionally do something wrong to make it happen, I have used the script more than 20 X in the last 24 hrs, and it is really totally checked. Just follow instruction carefully for the first couple of time, then it will be a safe one touch backup

1) Prerequisite
SD boot installed
partitions ext2 MMC1 = MMC2; FAT32 partition can be anything, so a 4G and an 8 G will work together, as long as their ext2 partition is similar or same in size.
I am NOT touching your Fat32. the FAT32 can be any size.
e2fsprogs installed

2) dl script cpxxwf.txt and change it to cpxxwf.sh
xterm
gainroot
mv cpxxwf.txt to cpxxwf.sh
chmod +x cpxxwf.sh

3) Install Personal Menu

4) Personal Menu>+>Command>
Name of the menu entry - call anything you want, I like to leave it blank to save screen real estate
Command to execute - ./cpxxwf.sh
DBUS Service name - leave blank
check Run in terminal
check Run as root
Select icon - I use the floppy disk icon
click OK

From now on, you have a one touch back up between mmc1 and mmc2 which Nokia suppose to have it built-in....somehow it slipped off the crack
Clone takes about 7 min or less.

If boot from intFlash, you can freely clone between MMC1 and MMC2. However, if you are doing MMCboot, you would NOT allow to write over the active OS, i.e. the booting OS cannot be the target SD. If you build up a habbit boot from MMC1 and clone to MMC2 then you do not have to worry about anything. Or, if in doubt, just reboot from intFlash whenever you would like to backup.

Edit: Sure, this will work for N810 or N800. Just be sure to understand there N810 intSD is non-removable. As long as one partitions the ext2 external SD the same size as the internalSD on the N810, it will work.

Steal from nhanquy....with permission

@munky261: I think this answers your questions. If NOT, please do not hesitate to post or PM me.


enjoy,

bun
Attached Files
File Type: txt cpxxwf.txt (2.1 KB, 448 views)

Last edited by bunanson; 2009-06-16 at 17:20.
 

The Following 3 Users Say Thank You to bunanson For This Useful Post:
Posts: 4,030 | Thanked: 1,633 times | Joined on Jul 2007 @ nd usa
#7
I used this one touch backup several times and is very happy with it. It is really fun to see it works, like a 4 yrs old keep climbing on the sofa as if that is about conquering the world!

Anyway, so far, I know how to clone from intFlash to MMC1, to MMC2, and clones between MMC1 and MMC2. Obviously there is still one missing link, clone from MMC to intFlash.
I know there is a differency of the memory capacity between intFlash and MMC clones, besides that, is it possible to put a clone back to intFlash?

The major applications is for someone that has finetuned a N800, installed all the necessary progs, the OssoTerminal shortcut, repetitive shortcuts, Personal Menu commands etc, and now several friends want the same setup in their intFlashboot. It would be neat, if one can just put the clone on the intFlash if there is such thing.

That brought back to the way I use my tablet. I have rarely boot up the intFlashboot, my active bootup is always the MMC2, the internal boot, I then install/uninstall everything on the MMC2boot and finetune to my likeness, I then clone/backup to the MMC1. This way, I only have to maintain the MMC2, rather than put on copies on intFlash and MMC1 and triplicate the progs. Any thoughts?


bun
 

The Following User Says Thank You to bunanson For This Useful Post:
Posts: 4,030 | Thanked: 1,633 times | Joined on Jul 2007 @ nd usa
#8
The difficulty in using this script is to make sure the ext2 partitions of SD target is always equal or similar to the source. So, if one starts out with 2 SD and partition them the same ext2 partition, there is no problem. If you already have one running and now try to make a 2nd SD to match the source, it takes some time, but can be done. I did it in 4 trials
I put in ext SD slot

xterm
root
umount /media/mmc1
sfdisk /dev/mmcblk1 -uM
0, match, 0C (match is where one adjust the size to make a match)
,,,
Return
return
reboot

after reboot, check
xterm
cat /proc/partitions

To be able to freely clone between MMC1 and MMC2, they should be of similar size. Once I made a pair SD with the exact ext2 partitions, now, I can truely backup, the whole 9 yards, without having to worry about 'what if' when installing new apps. This is really the app Nokia should have include to begin with. Hope to see it on Rover?

If you have NOT flash/clone/backup your tablet lately........you have been neglecting your tablet :-) . It is now 12 oclock in the morning, does anybody know where your tablet is? Just a joke, dont get too serious.


bun

Last edited by bunanson; 2009-06-16 at 17:21.
 

The Following User Says Thank You to bunanson For This Useful Post:
Posts: 4,030 | Thanked: 1,633 times | Joined on Jul 2007 @ nd usa
#9
Originally Posted by JayOnThaBeat View Post
I would definitely try this, but both my internal and external cards are full!

Awesome work guys!
The script leaves your FAT32 alone! It is perfect to try to backup. Just like condoms, you never know when you need one...............Cant help when I see nhanquy's advertisement for the USB dog ?! The comments below the video are also hilarious.

bun
 
Posts: 1,950 | Thanked: 1,174 times | Joined on Jan 2008 @ Seattle, USA
#10
I've also wondered how you clone your mmc into your system (or "internal" or "intFlash") memory. As far as creating copies of your system for several friends' NITs -- bunanson, you have several friends who have NITs? I've still never seen a NIT that I didn't personally buy.

I wonder how much comes along from the standard backup. Do files in the system get changed in a restore (like what you listed or, say, a replacement for the boot-up image) or just Document files? Anyway, the closest I've thought of is to do a Nokia-backup of your SD card, flash the intFlash, then do a Restore onto the intFlash of the backup made from the SD.
 

The Following User Says Thank You to GeraldKo For This Useful Post:
Reply

Tags
clone, sd-to-sd


 
Forum Jump


All times are GMT. The time now is 13:58.