maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2 (https://talk.maemo.org/showthread.php?t=29135)

bunanson 2009-05-23 19:26

Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
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

bunanson 2009-05-30 11:49

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
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

nhanquy 2009-06-11 18:00

Clone/Copy flash-to-SD SD-toSD
 
1 Attachment(s)
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!!!!

JayOnThaBeat 2009-06-11 18:26

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
I would definitely try this, but both my internal and external cards are full! :eek:

Awesome work guys!

KristianW 2009-06-12 11:38

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
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.)

bunanson 2009-06-13 20:18

One touch (Complete) backup
 
1 Attachment(s)
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

bunanson 2009-06-13 21:52

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
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

bunanson 2009-06-14 12:53

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
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

bunanson 2009-06-14 13:48

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
Quote:

Originally Posted by JayOnThaBeat (Post 295719)
I would definitely try this, but both my internal and external cards are full! :eek:

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

GeraldKo 2009-06-14 18:13

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
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.

bunanson 2009-06-14 18:52

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
Quote:

Originally Posted by GeraldKo (Post 296631)
... As far as creating copies of your system for several friends' NITs -- bunanson, you have several friends who have NITs? :) ...

Four friends and 6 NiTs are constantly look onto me as Nokia support for 1 and half years! These are all dedicated palm user, 100% useless in tablet environment!

In the past, 'they' can have uptoday fun stuff ONLY if they either physically shipped me the tablet or physically visit me in person, otherwise their tablet are as old as stone age! Teach them to install apps or upgrade or doing anything is like a bomberang. It always came back to haunt me and costed me more trouble than worth it. NOT ANYMORE, started from last week, I started to send them copies of SD, bootable clones, and all they have to do is to carefully insert into the SD slot, make a backup 1st, then they are running a tablet just as good as bunanson, BlueMaemo/rotation/MMapper/Tear/Digiatscene/gvm/OpenSSH(!)/WorldTV99 and, most of all, they all have the one button backup. In the past, I am frustrated, installed an app, messed things up, the tablet will have to redo from the ground up. NOT ANY MORE, we will exam any interesting apps, backup, install, not like it, re-clone from backup. Now, it is a new era for me, my tablet can only go FORWARD, no more ******ed start from ground zero. And of course, the 6 Nits plus myself are ALL running the same clone, maintanance and questions or problem solving is million times easier since we are ALL looking at the same screen under the same environment. This is modern age tablet! Long gone stone age!

Edit: Forget to brag a little bit, over the years, 2 more friends have bought the N810 and 1 bought N810WiMax, they never bother me, They are alright with the windoz, but .... I guess they just use it like a calculator? It is pretty fast for a calculator. Some of these people, they own a condo at washingtonDC, they are not at the same league as you and me, I guess.... in other words, 400-500$ electronic gadget does not work as it look, just put it aside and forget about it. Ummm.....I should call her up and ask whether I can 'borrow' that nokia wiMax thingie she got in October if she is not using it.....



bun

nhanquy 2009-06-14 19:06

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
Quote:

Originally Posted by bunanson (Post 296640)
I started to send them copies of SD, bootable clones, and all they have to do is to carefully insert into the SD slotmake a backup 1st, then they are running a tablet just as good as bunanson,

Could you send me one too. Remember don't delete your account on Pidgin so I can log into your account too.:D

I like your idea of one click clone too. I might have something like that to clone the flash to SD and back, SD to SD with clicking only (using dialog like PB's)

bunanson 2009-06-14 19:36

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
1 Attachment(s)
Quote:

Originally Posted by nhanquy (Post 296642)
Could you send me one too. Remember don't delete your account on Pidgin so I can log into your account too.:D
...

I really really hate to send off personal computer stuff, no matter how hard you try, there is always something slipped off. They ALL got my grandcentral number, I have politely asked them NOT to use it.

I never use Pidgin, what is that? Some kind of chatting? for banking stuff, I go right to the webpage. The tablet is almost a business tool for me, I use it in my profession, the gnumeric/skype/tear.

Edit: the floppy disc icon is the one touch backup, really should be from Nokia. the two p2 are the same, both are 634880 and are of different capacity. one is 8G and the other one is 16G.

bun

nhanquy 2009-06-15 00:31

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
Pidgin is for chatting and it stores passwords in the clear. For Grandcentral you always log out before clonnning for friends. Gmail, sip accounts are the same you should delete accounts before copying. :D

nhanquy 2009-06-15 12:57

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
1 Attachment(s)
Here is a script which does not try to partition the SD anymore. But it supports cloning the SD back to the internal flash. Because it needs ~ 256MB free space to create a temporary file, called rootfs.jffs2, on the mmc1 (external SD) you should be beware of that. You also make sure your source SD / directory less than ~500MB [do not put too much data on the SD after you have it cloned from your flash ( you can check with df command ). This SD should be a saved copy for you only]

Note that: A big partition may only contain a little data. The script at this moment doesn't really check for size of data, it only checks size of the partition..

bunanson 2009-06-16 12:55

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
It turns out the mmc1 and mmc2 DO NOT have to be the exact size, similar size works too, and the bigger size does NOT get bigger with every copy. I have tried with 730 MB copied to 650 MB (source is larger than target!), it went thru and the result copy stays the same after several back and forth copy, i.e., they stay as 650 MB and 730 MB. Same size is still the easiest to manage, a slight difference is also fine. I do know, if the size difference is too large (?), it will then copy to your tablet infFlash and mess things up. Bottom line, same size is easier to manage, a little difference, even the source is slightly larger then the target, it is alright.



bun

bunanson 2009-06-18 05:31

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
Quote:

Originally Posted by nhanquy (Post 296857)
Here is a script which does not try to partition the SD anymore. But it supports cloning the SD back to the internal flash. ...

Worked, thank you nhanquy!

Reverse cloning from SD to intFlash using clone.txt.

This example, A) make a fresh clone from intFlash to MMC1 from parent tablet
B) boot from mmc2, clone from mmc1 to intFlash of daughter tablet

Prerequisite:

1) Daughter tablet should already booting from intFlash, MMC1, MMC2.
2) Parent tablet should have at least 90 MB space on intFlash
3) SD clone: at least 600 MB Fat32 space on partition 1 of mmc1
partition SD clone ext2 to ~ 500MB for a Dana 4G SD,
sfdisk /dev/mmcblk1 -uM
0,3361,0C
,,,
return
return
ext2 = 489MB
reboot
format Fat32 partition
xterm
root
umount /media/mmc1
mkdosfs /dev/mmcblk1p1
no need to reboot
no need to format ext2, the clone.txt will take care of it.
4) dl clone.txt to default /home/user and make it executable
xterm
mv clone.txt clone.sh
chmod +x clone.sh
have e2fsprogs installed.
apt-get install wget
apt-get install e2fsprogs
A) Parent tablet boot up from intFlash, clone to MMC1. IntFlash has 94 MB free from 256MB space. This was cloned successfully on to SD with 489 MB ext2 partition.
B) This SD clone was then inserted into daughter tablet MMC1, external SD slot. And the daughter tablet booted from MMC2, and was successfully reverse cloning back to intFlash of the daughter tablet. Now parent and daughter tablets are running the exact copy. It took 9.5 min.
This compares favorably with reflash the tablet and install ALL the apps from ground zero!

For some reason, the daughter tablet was 30 MB space more on ext2 partition than the parent tablet, and the screen rotation does not get copied, I have to manually install it. Other than that, the two tablets are running exactly the same.

The SD clone that transfer the OS from parent to daughter tablet should have ext2 partitions ~500 MB in order for the reverse clone NOT to overflow.

This is both practical and fun.

bun

bunanson 2009-06-19 03:15

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
What do you do first once you got a fresh tablet?

If you never ever touch a tablet before, you should just play with it and fine tune to your likeness, manually. It is enjoyable and you got to know your tablet much more.

Well, if you already have a tablet, and now got another one (How is a tablet better than your wife/husband? A tablet would not jealous when you pick up another tablet!), what is the fastest way to make your tablet work the way you want them to? reverse CLONE!

This is a fresh tablet.
1) wifi: enable BT, copy wifi key from any BT source.
2) enable extras-devel
AppManager>menu>Tools>>App catalog...>
New>
Extra devel
http://repository.maemo.org/extras-devel/
(blank)
free non-free
3)install rootsh, emelfm2, bootmenu
This is the key step. Once you get to bootmenu and able to SDboot, you are back to ALL you favorite tools, repositories, bookmarks, essential apps.
4) move map from mmc2 to mmc1
5) insert mmcboot to boot to mmc1
6) reboot, clone from mmc1 to mmc2 to make mmc2 bootable

Edit: Cannot partition IntSD on the N810. xterm>root>umount>sfdisk crashed. Tried for 15 min with various combination, it kept on crashing...looked like it is going back to buy.com :(
Edit: on the way back tomorrow morning :(
Edit: Problem fixed, http://talk.maemo.org/showthread.php...ht=losing+data, thread #71

7) boot up from mmc2, reverse clone to intFlash. Done. Success! Took 9.5 min. Happy endings, just like any fairy tales :-)


bun

heavyt 2009-06-20 22:11

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
Quote:

Originally Posted by bunanson (Post 296640)
Four friends and 6 NiTs are constantly look onto me as Nokia support for 1 and half years! These are all dedicated palm user, 100% useless in tablet environment.........Some of these people, they own a condo at washingtonDC, they are not at the same league as you and me, I guess.... in other words, 400-500$ electronic gadget does not work as it look, just put it aside and forget about it. Ummm.....I should call her up and ask whether I can 'borrow' that nokia wiMax thingie she got in October if she is not using it.....
bun

Tell her there is a buyer up the road who will take it off her hands in a heartbeat, I am dead serious. :)

bunanson 2009-06-21 06:15

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
The reverse cloning procedure is successful. However, installed/reverse clone of an N800 to an N810 is problematic. It hiccuped a lot and crashed. Apparantly it is OK to stuck in a N800 clone to N810 for mmcSDboot. I have yet encounter any problem in doing that. But to reverse clone, that is like flashing your tablet, there are some subtle difference between the two units, that is why there are two different copies of the flash image from Nokia, the RX34 and RX44.

Bottom line: To do reverse clone, i.e, clone from mmc to intFlash, better to stick with the same model, i.e., N810 to N810. It is OK to interchange mmcSD boot between N800 and N810, no ill effect observed over several months.

bun

bunanson 2009-06-22 01:34

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
I made a copy of a good intFlash boot on an SD.

I like to have more apps installed when doing SDboot and would like to tailor/modified and reverse clone this particular SDboot to intFlash. I deleted a couple of apps to make the file about 550 Mb and reverse cloned back to intFlash. Unfortunately, even 550 Mb, after compression, was still a little bit too large for the tablet's 256 Mb space, the reverse clone 'overflowed' the intFlash, and the tablet would not boot. It dutifully showed the bootup menu, and if chose option to boot from intFlash, it crashed and went back to the bootmenu. If chose SDboot, mmc1boot or mmc2boot, it then booted up and worked without a glitch. Interesting. Interesting from a user's point of view. Even though the tablet is 'braindead', failed to bootup, if a bootmenu already installed and the bootmenu sector remained intact, it can rise from ash with SDboot.

Now, my tablet showed bootmenu and only bootup with SDboot, but the intFlash boot is hosted. Remember I made a good copy of the intFlash boot at the beginning, right? I did a reverse clone using this good backup, which has less apps installed and size 520MB, and cloned back to the intFlash and now all is well, it boots and works, no need to reflash or start from ground zero!

What is this all about?

Nothing.

Just to show, if you have a good backup, SDboot, and with installed bootmenu, even if you goof up the intFlash (mtdblock4), either installed wrong package, or wrote some bad codes, och, you still have a good chance of resurrect the tablet without resort to flashing.

bun

gogol 2009-08-15 20:58

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
There's a bit of confusion here on my end.

I used cfdisk to partition my internal SD on an N810. I created 3 partitions: a Fat16 partition of 200mb, a linux partition of 1680mb, and a swap partition of 131mb. Running the script (to copy external to internal, option 4) creates all sorts of errors because cfdisk titled the linux partition mmcblk0p3:eek:, not mmcblk0p2.

I suppose I will go in to the script and change the appropriate references by hand, which is easy enough, just change all references to mmcblk0p2 to mmcblk0p3 I just thought I'd let you all know.

gogol 2009-08-15 21:01

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
It appears this happens when you create your partitions in this order: FAT16, then swap, then the linux partition last. I have no idea why, since the linux swap space I place at the end of the disk, and calling it logical gives it the mmcblk0p5 partition. Such is the way of convoluted linux shell.

gogol 2009-08-15 21:12

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
...and, because I have a few mental problems, it is nearly IMPOSSIBLE for me to remember this naming scheme, so I'll post it for 'tards like me to refer to:

Internal SD =
mmc2
mmcblk0

External SD =
mmc1
mmcblk1

Now how does that make any sense? More convoluted linux maddddddnesssssss

(I feel a bit like Alice, slipping down the rabbit hole)

shin 2009-08-18 09:48

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
Some outstanding findings in this thread and a good guide for a newbie (both N810 & Linux) like me.. However I have a few queries before I take the plunge and i hope you friends would help me.. :D

I have a N810 thats running 'dual' boot.. I used Pb's Console tool for cloning. The stock OS (Diablo 2008.43-7) is running on the internal flash and I have cloned the same to a partition on the external MMC.

The external MMC is a 8GB card and I have partitioned it into 2 equal halves of 4GB each ( ext3 partitions). First partition has the cloned OS to which I have added all the extra apps I wanted . The internal MMC(2GB) and the 2nd partition(4 GB) of the external MMC are my data storage areas. With all the applications installed, I find myself booting straight into the cloned OS area more often and I have spent a lot of time customizing it

With this setup, I would like to have a back up of my customized OS ( external MMC - 1st Partition) on to another MMC, so that I can use the new MMC if my existing one fails for some reason. :)

So this is what I am trying to do:

A. Copy existing customized OS from external MMC partition( 4 GB size - 760 MB in use) >> Internal SD (2GB)
B. Back up the customized OS image from internal SD >> new external MMC ( for backup purposes)

I would like to know, if the following will work and simple indicators on how to achieve this:
  • Copying/Cloning from a bigger size partition ( 4 GB - 760 MB in use) to a 2GB internal SD
  • In Step B above, is there a way to use a 16GB MMC, with one more extra partition to have another version of customized OS for Japanese Input( With MaemoCJK I seem to loose the std.onscreen keyboard and I am forced to use the matchbox kb :mad:)

Also there are quite a few versions of the clone.txt from nhanquy/bun here and not sure which one to use in my case as narrated above...

Sorry this is lengthy post and I appreciate your time to read/respond..

TiA
- Shin

bunanson 2009-08-19 04:09

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
@gogol: You are 100% correct. I only use ext2. and ext3 and above will have to be customized manually as you have done. Thanks.

@shin: In your situation, you only interest in copy between mmc1 and mmc2, I would recommend cpxxwf.txt from thread #6. Once you get it working, I would make a button using personal menu,
(you already did, change cpxxwf.txt to cpxxwf.sh and chmod +x etc)

command to execute: ./cpxxwf.sh
and check run in terminal and run as root, and pick a symbol.

This script requires ext2 partition already available and will clone between mmc1 and mmc2 at will. As implied, this clones only the OS, will leave the data part, FAT16, intact.
From now on, you just have to the button, you get a fresh copy! I have used it more than 60 times in the last 2 weeks when I am testing progs. It works just like the restore program in MSwindow$.

Regarding the size of the partition, mmc1 and mmc2 does NOT have to be exact, and source smaller than target is also NOT necessary. I have successfully clones between 520 MB and 800 MB with very little programs. Just my guess, as long as the data is under 500 MB, even if you copy the 500 MB to the 800 MB partition initially, when later copy the 800MB OS back to 520 MB with no difficulty. Play with it and see what you think.

**** Be careful with mmc1 and mmc2. There is a bug in N810 to switch mmc1 vs mmc2. The patch to correct the bug is a little over my head. Good luck,

bun

Snoshrk 2010-05-29 14:27

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
Quote:

Originally Posted by bunanson (Post 312947)
)

command to execute: ./cpxxwf.sh
and check run in terminal and run as root, and pick a symbol.

Ok tried this....Personal Menu complains that it can't run as root (rootsh installed) and fails

thanks

bunanson 2010-07-04 14:57

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
1 Attachment(s)
Quote:

Originally Posted by Snoshrk (Post 688029)
Ok tried this....Personal Menu complains that it can't run as root (rootsh installed) and fails

thanks

Tried to make it run under xterm 1st, once you are sure then go personal menu to set it up.

My personal menu setting:

Name of the menu... blank
command to execute ./cp12wf.sh
DBUS service name blank
and check Run in terminal, Run as root
and select an icon

done.

I think your problem is not with personal menu setting, it is with ./cpxxwf.sh has not been set up correctly.

These scripts works, ONLY up to 5.2008.43-7, between mmc1 and mmc2 and reverse cloning, i.e., clone from sd to flash, I am using them at least weekly, if not daily. Everytime I see some app, install and try, dont like it, I would revert back by copying from my 'other' mmc/SD or from intFlash. If I like the app, I would then copy to my backup. This way, my N8x0 is keep improving as it is being used :)

Feel free to learn and use them, it is a good tool. It wont damage anything as it does NOT do partitions. You have to have partitions ready for it to run. And it only modify your OS partitions, and leave your fat partitions intact.

Again, it does NOT work with the community fix, 5.2010.16-1, ... yet :) .


bun

Snoshrk 2010-07-05 00:22

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
Quote:

Originally Posted by bunanson (Post 740417)
Again, it does NOT work with the community fix, 5.2010.16-1, ... yet :) .


bun


Thanks for checking into this :)

Any idea why it doesn't work with the CommunitySSU?

Sno

bunanson 2010-07-05 01:23

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
Quote:

Originally Posted by Snoshrk (Post 740745)
Thanks for checking into this :)

Any idea why it doesn't work with the CommunitySSU?

Sno

I have NOT looked at it yet, I suspect it is due to a file name change which the script would NOT be able to locate. I did upgrade to community SSU, on my N800, it works but the menu is all gone, ..., dont have time to play with it, I just recopy the old OS back, no sweat. That is the whole idea about full backup, right?

bun

Snoshrk 2010-07-05 01:39

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
Quote:

Originally Posted by bunanson (Post 740770)
I have NOT looked at it yet, I suspect it is due to a file name change which the script would NOT be able to locate. I did upgrade to community SSU, on my N800, it works but the menu is all gone, ..., dont have time to play with it, I just recopy the old OS back, no sweat. That is the whole idea about full backup, right?

bun

Yep Backup is a GOOD Thing!

I did finally get pb /pbeasy cloning between MMCs working...after I wrapped my brain around booting into flash(stock OS) and cloning from there.

Not as slick as this method, but it works. ;)

Sno

bunanson 2010-07-05 01:49

Re: Step by step: Clone/Copy/backup/SDBoot between MMC1 and MMC2
 
I have NOT tried pb /pbeasy. I heard all the good things about it. I may also use pb /pbeasy if I do not have this clone.sh. I always want to see things cranking..., it is fun.

A little bit aside, I felt more like a community in era N8x0; with the new N900, it somehow aliented alot old folks ... anyway, nothing to do with cloning, love to see you around,

bun


All times are GMT. The time now is 00:07.

vBulletin® Version 3.8.8