Active Topics

 



Notices


Reply
Thread Tools
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
Posts: 346 | Thanked: 271 times | Joined on Jan 2010
#2
Thanks, I waited an application like this since I have my N900.
I will try it soon
 
Posts: 1,751 | Thanked: 844 times | Joined on Feb 2010 @ Sweden
#3
Awesome Robbie!
 
Posts: 346 | Thanked: 271 times | Joined on Jan 2010
#4
Ok, I played with it a bit (only backup, not restore), some suggestions:
-Make the app easier to use with non-QWERTY keyboards (read the config from Maemo or don't use Q,W,A,Z,M,Y keys. )
-Fix the time from the backup file's name and attribute, this is important if you do multiple backups since the backups are named by the date
-Add an option to verify the backup file's integrity by compairing data with the real FS
 

The Following 2 Users Say Thank You to Megaltariak For This Useful Post:
Posts: 842 | Thanked: 1,197 times | Joined on May 2010
#5
Originally Posted by Megaltariak View Post
Ok, I played with it a bit (only backup, not restore), some suggestions:
-Make the app easier to use with non-QWERTY keyboards (read the config from Maemo or don't use Q,W,A,Z,M,Y keys. )
Fair enough; Would you mind linking me to that config(or a list of the separate keyboards)?

Originally Posted by Megaltariak View Post
-Fix the time from the backup file's name and attribute, this is important if you do multiple backups since the backups are named by the date
Fixed in version 0.26. I thought I had fixed it earlier; seems I needed to have "hwclock -s" later on in my script.

Originally Posted by Megaltariak View Post
-Add an option to verify the backup file's integrity by comparing data with the real FS
Thats actually a very good idea.
It takes some extra time(~30 seconds for rootFS backup, a few minutes for OptFS), but it should let you know that things are good(or not).

BTW, I think I fixed the backup/restore problem - It seems that the rootfs/optfs were already mounted by the time my script gets run.
So... copying/restoring onto mounted FS - not exactly a good idea.
Fixed in 0.26. (I ran umount for both, and checked to make sure they actually -were- unmounted).

New version uploaded to the same location as the old one.
 

The Following User Says Thank You to RobbieThe1st For This Useful Post:
Posts: 326 | Thanked: 335 times | Joined on Feb 2010
#6
I SAID THIS ! :P XD

And I WANTED THIS A LOT !

http://talk.maemo.org/showthread.php?t=52925
 
Posts: 842 | Thanked: 1,197 times | Joined on May 2010
#7
Originally Posted by Dany-69 View Post
I SAID THIS ! :P XD

And I WANTED THIS A LOT !

http://talk.maemo.org/showthread.php?t=52925
It was actually a different post that gave me the idea, but yea - it seems like this was definitely needed.

I'm actually surprised no one else made one first - I'm no expert at this stuff, and it wasn't all that hard for me...

Anyway, after reading the topic, yea, I can understand the problems you had(not working right after restore).

With my tool, worst case, restore RootFS via the Flasher, reboot into my tool, and restore the OptFS via that(no way to restore OptFS via Flasher).


BTW, can anyone(who preferably hasn't put much personal info on their N900):
1. Make a backup of RootFS and OptFS with my tool.
2. stick both files into a .tar.gz or .zip file.
3. Upload a copy to megaupload or another host
4. PM me the link.

I want to try restoring a unique and different backup; make sure it works fully and properly.

Thanks,

-Rob
 
Posts: 326 | Thanked: 335 times | Joined on Feb 2010
#8
Originally Posted by RobbieThe1st View Post
It was actually a different post that gave me the idea, but yea - it seems like this was definitely needed.

I'm actually surprised no one else made one first - I'm no expert at this stuff, and it wasn't all that hard for me...

Anyway, after reading the topic, yea, I can understand the problems you had(not working right after restore).

With my tool, worst case, restore RootFS via the Flasher, reboot into my tool, and restore the OptFS via that(no way to restore OptFS via Flasher).


BTW, can anyone(who preferably hasn't put much personal info on their N900):
1. Make a backup of RootFS and OptFS with my tool.
2. stick both files into a .tar.gz or .zip file.
3. Upload a copy to megaupload or another host
4. PM me the link.

I want to try restoring a unique and different backup; make sure it works fully and properly.

Thanks,

-Rob
Wherever you took the idea... you're GREAT !

But i had e doubt... are you sure that che folder where to put BackupMenu.item is /etc/bootloader.d/ ? o.O
I have only a bootmenu.d and i've always used that for the bootmenu program ..
 
Posts: 842 | Thanked: 1,197 times | Joined on May 2010
#9
<_< >_> Erm... Yea.
Fixed.
 
Posts: 326 | Thanked: 335 times | Joined on Feb 2010
#10
XD great XD

Another problem.... i've put the .item file in the folder... but when i boot with the keyboard opened .. it appears only the nokia logo... nothing else
It's very strange because, some minutes ago, with the file mer.item, the bootmenu appeared with no problem...

Then i've erased it and i've put backupmenu.item... and nothing happens

whyyy? T_T
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 09:59.