maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N800 (https://talk.maemo.org/forumdisplay.php?f=25)
-   -   *really* backing up an n800? (https://talk.maemo.org/showthread.php?t=17562)

fanoush 2008-03-06 06:44

Re: *really* backing up an n800?
 
Quote:

Originally Posted by Quartz (Post 151393)
I'll look into that. the thread you link to seems to imply I need to boot from an sd card first though

Well, it is better but not strictly needed. When backing up live system you may end with some additional runtime garbage in the image but it doesn't hurt, better keep the system quiet when backing up. Also even with live system you are supposed to mount it again somewhere (like /opt) before backing up, don't use '/' path directly.
Quote:

Originally Posted by Quartz (Post 151393)
which AFAIK requires installing init.fs, which is exactly what I'm trying to avoid.

Well, no, even the stock initfs can boot from mmc but you need usb flasher to set the choice, there is no menu and only first found ext2 partition is used. When I created bootmenu, initfs could boot only from mmcblk0p1 which was not very useful for running cloned system. Later they added search_root_onmmc() which scans all mmc partitions for executable /sbin/init and first one is booted.

fanoush 2008-03-06 08:10

Re: *really* backing up an n800?
 
Quote:

Originally Posted by Quartz (Post 151394)
... unless you mean there's a way to convert that rsync into a flashable image I can use with the flasher program.

Yes, you can use mkfs.jffs2 also on linux desktop to create the image later. Linux/Mac flasher can write such image of rootfs (or initfs or kernel) separately. Sadly it cannot read it from device. Usage here
http://maemo.org/development/documen...sher_tool.html

fanoush 2008-03-06 08:31

Re: *really* backing up an n800?
 
Quote:

Originally Posted by Quartz (Post 151389)
in any event, since I couldn't turn it on, I couldn't reflash it. and yes I tried leaving it out overnight with and without the battery.

Could be faulty hardware or you may be victim of this http://blog.homac.de/?p=58 a.k.a Power up Drama http://bugs.maemo.org/show_bug.cgi?id=2673

As for installing initfs with bootmenu
Quote:

You can still skip the final flashing part and download created initfs.bootmenu.jffs2 image (and initfs.orig.jffs2 backup) to PC and flash via official flasher if you want to be extra safe.
so there is a way even if you don't want to use mtd-utils on device. Still, even completely erasing initfs partition is not enough to cause symptoms you saw. See also
http://maemo.org/development/documen...e.html#OSLayer
http://maemo.org/development/documen...ure.html#Flash

Quartz 2008-03-06 18:31

Re: *really* backing up an n800?
 
Quote:

Originally Posted by fanoush (Post 151501)
When backing up live system you may end with some additional runtime garbage in the image but it doesn't hurt, better keep the system quiet when backing up.

fair enough

Quote:

Originally Posted by fanoush (Post 151501)
Well, no, even the stock initfs can boot from mmc but you need usb flasher to set the choice,

really? ::looks::
is that the "set default root device" option? what's the syntax for that?

Quote:

Originally Posted by fanoush (Post 151501)
there is no menu and only first found ext2 partition is used. When I created bootmenu, initfs could boot only from mmcblk0p1 which was not very useful for running cloned system.

ok, this is the first I've ever heard about this. so if I were able to put an OS on an sd card, I could use the flasher to tell it to boot off it as long as it's p1? (what's the limitation here, that I can't have a fat32 partition for vm on the same card?)

Quote:

Originally Posted by fanoush (Post 151501)
Later they added search_root_onmmc() which scans all mmc partitions for executable /sbin/init and first one is booted.

define "later", I'm using what I believe is the first and only non-beta release of OS2008... or do you mean 'later' as in later hardware?

Quartz 2008-03-06 18:41

Re: *really* backing up an n800?
 
Quote:

Originally Posted by fanoush (Post 151518)
Yes, you can use mkfs.jffs2 also on linux desktop to create the image later. Linux/Mac flasher can write such image of rootfs (or initfs or kernel) separately.

neat, that looks promising, thanks. anyone have a link to a guide or something on how to use mkfs.jffs2 to make an image out of a folder/rsync?


Quote:

Originally Posted by fanoush (Post 151518)
Sadly it cannot read it from device.

bah, figures. that would be too easy, eh? :)


Quote:

Originally Posted by fanoush (Post 151524)
Could be faulty hardware or you may be victim of this http://blog.homac.de/?p=58 a.k.a Power up Drama http://bugs.maemo.org/show_bug.cgi?id=2673

yeah, that sounds like it alright. never thought about putting it in the freezer.

mrklaw 2008-03-06 19:13

Re: *really* backing up an n800?
 
I'd love to see some sample scripts to accomplish this. I want to implement a similar backup system using rsync.

Quote:

Originally Posted by dogsbody (Post 151315)
If I do say so myself I am really good with backups and have one of my home computers backing up all my machines each night via rsync (much faster and only backs up the files that have changed).

When I got my N800 I added a script to back that up too. I set my home router to always issue the IT the same IP every time it connects via WiFi (also makes things easier to connect to for other things). Each night the script pings the IT and if it's online will SSH to it and backup securely via rsync, this backs up the entire tablet including any cards loaded.

I also added a few more things, using hard links on my backup box I can keep weeks of backups using a fraction of the space and if the IT is offline for more than 10 days then I get an e-mail each night until it gets backed up :p


dogsbody 2008-03-06 21:14

Re: *really* backing up an n800?
 
Quote:

Originally Posted by mrklaw (Post 151640)
I'd love to see some sample scripts to accomplish this. I want to implement a similar backup system using rsync.

The cleaver stuff is really just one very long rsync command, e.g.
Code:

/usr/bin/rsync --bwlimit=512 -az --log-format=%f --numeric-ids --delete --rsh=ssh --stats --exclude-from=/backup/scripts/libs/host.example.com.exclude --link-dest=/backup/backups/host.example.com/2008-03-05-01 host.example.com:/ /backup/backups/host.example.com/2008-03-06-01
I actually blogged about it a while back if your interested (I really must finish building my website! :o )

All the scripting is just the checking that commands executed correctly and building up the above command.

I hope that helps.

mrklaw 2008-03-06 22:10

Re: *really* backing up an n800?
 
Thanks for the info!

Quartz 2008-03-11 03:19

Re: *really* backing up an n800?
 
so, I think doing daily rsyncs and compiling them to a flashable image is probably the best overall backup solution. can anyone point me to a reference on how to do this?

also, does anyone have any further information on booting from SD using the stock init.fs as fanoush noted? I'm curious what the limitations are.

fanoush 2008-03-11 06:17

Re: *really* backing up an n800?
 
Quote:

Originally Posted by Quartz (Post 153302)
can anyone point me to a reference on how to do this?.

mkfs.jffs2 is the command, see the link in post #3 for usage. Also try to search for 'rootfs' on www.maemo.org
Quote:

Originally Posted by Quartz (Post 153302)
also, does anyone have any further information on booting from SD using the stock init.fs as fanoush noted? I'm curious what the limitations are.

Check README.txt inside initfs_flasher.tgz and then maybe re-read this thread.


All times are GMT. The time now is 14:31.

vBulletin® Version 3.8.8