View Single Post
Posts: 842 | Thanked: 1,197 times | Joined on May 2010
#1
NOTE:
This version has been depreciated due not restoring correctly in a number of N900s. If yours has been tested and worked, it will continue to work. If not, or you don't know, go with my (incompatible) new version, which is "safer" and should restore on all N900s.

The new topic is Here: http://talk.maemo.org/showthread.php?t=63975

---------------------
Since before I got my N900 a couple weeks ago, I've been trying to figure out a way to backup and restore a full OS image on the N900.
With a PC, you can use a program like Norton Ghost, or any number of free alternatives, and make a full image of everything you have. You screw the OS up, all you have to do is take your backup image, wait a couple hours for it to load, and you have everything back to how it was before.

With the N900, all you have is a "settings backup" tool(which also keeps a list of installed programs). If you have custom applications or settings -not- backed up... Good luck.

Until now.

I have created an application which allows you to make full backups of the RootFS(OS), and OptFS(extra programs), and then restore said backups. These backups(at least the RootFS ones) are also compatible with Nokia's Flasher utility, so you can restore directly, if you manage to make your N900 not even boot.
Do note that this is a bootloader-based application(backup not possible with the full OS running), so you have to reboot the N900 to use it.

Screenshots:

Main screen:


Backup menu - screen 1:


Backup menu - screen 2:


Backup menu - in progress:


Features:
-Runs at bootmenu-level; this allows RootFS to be unmounted and backed up.
-Backup full images of RootFS and OptFS
-RootFS Images compatible with Flasher
-Restore images, either or both
-Checksum of all images on backup and restore
-Save files to MyDocs or SD card
-No command knowledge needed

Extra features:
-Terminal access for fixing stuff(advanced)
-FSCK ability
-Extended USB Mass Storage mode that exposes OptFS.


How to install:
Install 'backupmenu' from 'extras-devel'
Or download it manually here:
http://maemo.org/packages/view/backupmenu/

Manual:
1. Install 'bootmenu-n900' from the extras-devel repository.
2. Download BackupMenu.item and copy it to "/etc/bootmenu.d/" on your N900(requires root).



How to use:
Reboot the N900 with the keyboard open.

So, to NOT use it, reboot with the keyboard closed(DrWilken) .

Multiboot:
As I have been asked about 4 times in this thread, when I already posted the answer on the second page...
Will Multiboot work with my script?
I just took a look at it - it probably -won't-, at least not by copying it into /etc/multiboot.d/.
You can -probably- get it to work the same by:
1. at the boot prompt, press C for console.
2. type "/path/to/BackupMenu.item"
If that doesn't work, make sure its marked as executable by running:
"chmod +x /path/to/BackupMenu.item".

Now, someone well versed in writing item files for MultiBoot -might- be able to convince it to drop to a shell and then excecute it, but I can't do it.

Either way, go ahead and experiment - Though the latter is fairly unlikely.
Let me know if you make it work, and how you did it.

Notes:
I have, occasionally, run into restore errors when restoring the RootFS. If things are majorly F'ed up(and I have done it a lot), sometimes it won't restore to a bootable condition.
In these cases, you need to:
1. Using the Flasher, flash the PR1.2 FIASCO image("flasher-3.5 -F *imagename*.img -f")
2. With the N900 still in flashing mode, flash your RootFS image with the flasher("flasher-3.5 -r rootfs-image.img -f")
This has solved the problem in all cases.

Bugs:
Sometimes the alt/ctrl/shift keys don't activate in terminal mode. I've found that selecting them all and then deselecting them all(press each button 3 times) seems to more or less fix the problem. - Perhaps fixed in 0.31 Build 2

Checksum issue - I didn't think about how I was piping the ID of the process. Fixed in 0.30.
Trying to read/write to mounted FS - Fixed in 0.26

Problems:
If you have problems, post on this topic. Do not email me!

Changelog: (Current version: 0.31)
0.31 - Added limited Terminal functionality.
0.30 - Complete fix of Checksum system, it works right now.
0.29 - Tried to fix (nonworking) USB Networking; still not quite right. May be on PC side though, but I doubt it.
0.28 - More tweaks to the checksum system - still not quite working right.
0.27 - Minor graphical/statistical glitches.
0.26 - Major patches/fixes, do not use anything older than this.
0.25 - First released version

Theory of operation:
-- Ignore this if you aren't planning on messing with my code for your own non-standard setup --
My program is an ASH/BusyBox script run by the Bootloader application in bootloader-n900.
As it is a shell script, it should be fairly immune to custom kernels and setups; so long as BusyBox and the various executables are still accessible, it ought to still work.
If you are attempting to use your own special or custom bootloader-script, you should be able to make it work with mine by:
1. making sure it gets run and not mine by default(change the name of it to something "earlier" than "BackupMenu.item").
2. calling my script when you want it using ". /etc/bootloader.d/BackupMenu.item"
This should allow you to setup a menu of your own that allows you to boot multiple OSes, or other stuff and still having my script usable for backups.



Alpha test:
Current post: http://talk.maemo.org/showpost.php?p...&postcount=207


Suggestions, Comments, CC welcome!

Last edited by RobbieThe1st; 2010-10-18 at 23:07.
 

The Following 95 Users Say Thank You to RobbieThe1st For This Useful Post:
2disbetter, alienhead, aligatro, AlMehdi, antoarts, arnest, asyik, atilla, azad1top, Bingley Joe, BLC, BluesLee, Bobbe, Bundyo, cardiff-blues, casper27, ceevee, cfh11, choubbi, Cobra, codeMonkey, coreyoconnor, Corwin, Crashdamage, crazy_agent, CutterSlade, Daniel_bboy, Dany-69, dashti, DaSilva, debernardis, Digicom, eiraku, Erazor, erniadeldesktop, ersanpermana, F2thaK, fabbro, fotis9, fw190, gordonshowers, gregc2009, hawaii, Helmuth, HtheB, humble, ioan, jd4200, joerg_rw, JorgeFX, Kabouik, kojacker, Laughing Man, lcuk, leighw, logicalsid, LTman, maemo.it, Maj3stic, maluka, manvik60, Marlon, Megaltariak, mobiledivide, moepda, MohammadAG, mveplus, ndi, Netweaver, nikigo, nikolajhendel, oldnetdog, osama, ossipena, OVK, PathFinder@9GS, peter2p, PUNK, pursueky, qwerty12, Rammi, Rob1n, sachin007, scribbles, sierrafoxtrot, skalogre, Stonik, tan, Tiboric, v13, vkv.raju, xman, YoDude, zoner, zvogt