Notices


Reply
Thread Tools
Posts: 4,556 | Thanked: 1,624 times | Joined on Dec 2007
#11
Originally Posted by Corso85 View Post
I said, reading the files wouldn't be the major problem, since we have access to hte file system. it's restoring them while things are running. So we need some sort of extra "mode" like the one used to flash.
I wonder if it's possible to restore an image to the 256 MB flash chip, and the 2GB /opt partition while say booting the OS off of a micro-SD card?
__________________
Originally Posted by ysss View Post
They're maemo and MeeGo...

"Meamo!" sounds like what Zorro would say to catherine zeta jones... after she slaps him for looking at her dirtily...
 
Posts: 278 | Thanked: 209 times | Joined on Dec 2009
#12
Hi rambo.

Thanks again for your work on the Wifi Hotspot. Won't forget that one

Ok. About the kernel. where does that reside? the 256 mb flash?

when I browse /. do I see kernel files?

Lets say. I make the backup from firmware version xx. Obviously when I want to restore. I'll flash firmware xx not the new yy for instance. That should take care of the kernel issue.

My other question. When I restore from the tar. some things are probably running. so they wouldnt agree to get over-written.......that's troublsome.

It's like trying to copy windows folder back to a running system. all hell will break loose

Last edited by Corso85; 2010-03-28 at 16:09.
 
Posts: 278 | Thanked: 209 times | Joined on Dec 2009
#13
Originally Posted by Laughing Man View Post
I wonder if it's possible to restore an image to the 256 MB flash chip, and the 2GB /opt partition while say booting the OS off of a micro-SD card?
If we can boot from an SD-Card, mount the flash ship and /opt. find a way to restore with permissions. then theoritcally it should work.

eMMC doesnt matter i think.
 
Posts: 540 | Thanked: 288 times | Joined on Sep 2009
#14
Originally Posted by Corso85 View Post
when I browse /. do I see kernel files?
If you count modules as kernel files (quite essential, the device won't boot if you don't have correct modules in for the flashed kernel)

The kernel bzImage file is deleted by the OTA flasher after it flashed the kernel to the special place where to bootloader loads it from. Flashing with external flasher the bzImage never lands on device root filesystem.

Originally Posted by Corso85 View Post
Lets say. I make the back from firmware version xx. Obviously when I want to restore. I'll flash firmware xx not the new yy for instance. That should take care of the kernel issue.
Originally Posted by Corso85 View Post
My other question. When I restore from the tar. some things are probably running. so they wouldnt agree to get over-written.......that's troublsome.
You could kill almost everything just-in-case, but in general on Linux files do agree to be overwritten when the root tells them to, how the applications react to this is a completely different matter.

(it probably is a good idea for example to shutdown the phone module since that has pretty high priority over just about everything else, SMS incoming at inopportune moment will at least be lost [don't know what else happens if the database is replaced from under the messaging framework])

However you'll be rebooting as soon as the copy finishes so the applications don't have much time to misbehave.
 
Posts: 278 | Thanked: 209 times | Joined on Dec 2009
#15
Hmmmmm. All 3rd party methods seem to be quite unpredictable. I see why nobody is willing to tackle the task. It would require countless re-flashing while testing. Quite unfair for a community person to undergo this.

I believe this matter would be more easily tackled by official Maemo devs.

How can one communicate with them?

I tried to create a brainstorm. it needed a garage account. when i tried to create that. the link wouldnt open for some reason......I doubt this full backup functionality would be considered important to them though,
 
Posts: 540 | Thanked: 288 times | Joined on Sep 2009
#16
Originally Posted by Corso85 View Post
Hmmmmm. All 3rd party methods seem to be quite unpredictable. I see why nobody is willing to tackle the task. It would require countless re-flashing while testing. Quite unfair for a community person to undergo this.
Well, the community is full of people who are ready to test all kinds of weird crap in full knowledge that they will end up reflashing their devices a lot.

Originally Posted by Corso85 View Post
How can one communicate with them?

I tried to create a brainstorm. it needed a garage account. when i tried to create that. the link wouldnt open for some reason......
Contact the garage admins tomorrow when it's again office time in Finland. Brainstorm is a good way to communicate with Nokia.

Originally Posted by Corso85 View Post
I doubt this full backup functionality would be considered important to them though.
It's a feature that's mainly useful to the people who are reflashing their devices way too often (since they play with weird devel stuff), so I'd guess it's not a high-priority for Nokia (business-wise).

The easy (technical POV, business side might want to differ) way would be to make the tool for generating full fiasco-images available (In fact the already-available fiasco-gen might do it already, but no-one I know of uses it for anything but the kernel images). Then one could from the tarred files and a kernel bzImage (no need to read the kernel from device, stock kernels are easily extracted from fiasco-images) make a new fiasco-image that could be just flashed on the device.

/home (and thus /opt) is part of the eMMC so rootfs flash does not affect anything there (one would need to make a full eMMC flash image for that [practically only needed if the device dies totally and you need to restore on a new device])
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#17
Originally Posted by Corso85 View Post
If we can boot from an SD-Card, mount the flash ship and /opt. find a way to restore with permissions. then theoritcally it should work.

eMMC doesnt matter i think.
Ok.
First of all, it is possible to create a tar.gz while running, but you can't go straight "tar cz /" or you'll include /sys, /proc, devfs, initfs ....
Restoring the system while running is dangerous, you make a mistake, device may be bricked (you'll have to reflash).
So, to be on the safe side, boot from SD.
Yes, N900 can boot from SD: http://talk.maemo.org/showpost.php?p...0&postcount=45
Once you have solved this, mounting the flash and home partitions read-write is trivial. Then tar to backup or restore.
mkfs.jffs2 can be used to make a jffs2 image, which can be flashed, if you are so inclined.
 
Posts: 278 | Thanked: 209 times | Joined on Dec 2009
#18
Originally Posted by maacruz View Post
Ok.
First of all, it is possible to create a tar.gz while running, but you can't go straight "tar cz /" or you'll include /sys, /proc, devfs, initfs ....
Restoring the system while running is dangerous, you make a mistake, device may be bricked (you'll have to reflash).
So, to be on the safe side, boot from SD.
Yes, N900 can boot from SD: http://talk.maemo.org/showpost.php?p...0&postcount=45
Once you have solved this, mounting the flash and home partitions read-write is trivial. Then tar to backup or restore.
mkfs.jffs2 can be used to make a jffs2 image, which can be flashed, if you are so inclined.
I know you got somthing there. Just trying to decipher the lingo. (Windows background, my bad). but I did take a unix course a while ago. trying to recall things. bear with me?

Lets slow down and start with the basics.

Lets start with cloning the system on the SD Card, to boot.

In file system I see:
bin
boot
cdrom
dev
etc
floppy
home
initrd
lib
media
opt
proc
root
sbin
src
srv
sys
syspart
tmp
usr
var

1. What of these is on what? 256mb flash/32gb storage? home and opt on the 32gb and the rest is on 256mb flash? is there a swap partition like a regular linux?
2. Refering to my old question, kernel is hidden here? when one edits a kernel, what does one actually do? file wise?
3. In the SD boot script posted,
- /floppy and / is mounted. ok
- something else is mounted. wats that? initrd
- then 2 tars are made, but cant tell of what exaclty? contents of /floppy and /intrid?
- I don't get how that command clones the file system.

Sorry again.

Last edited by Corso85; 2010-03-28 at 21:03.
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#19
1. Just type "mount" and you'll see where is mounted everything.
While I don't have a N900 to check, documentation says that under /opt is mounted a 1GB ext3 partition, and under /user/home/MyDocs a 25 GB vfat partition. In the N8x0, /media/mmc1 and /media/mmc2 are the mountpoints for the first vfat partition on internal and external SD cards, so I guess the N900 will have a similar setup.
Some of the directories under / are mountpoints for kernel virtual filesystems: /proc (procfs), /sys (sysfs) or temporary filesystems in RAM: /dev, /tmp
As I already said, "mount" will tell you what's mounted where.

2. The kernel is stored in a separate flash partition, so you don't edit anything, filewise. When you install a new kernel, it is flashed in that partition. The bootloader (it is stored in the first flash partition) will read that partition into RAM and jump into the kernel, booting it. Then the kernel mounts the initfs partition and starts the initrc script, which load needed kernel modules, and then mounts the root filesystem, and goes to init 3.

3.
- /floppy is binded to /, that is, /floppy holds a view of the root filesystem, but under /floppy the /opt, /dev, /proc, etc have nothing mounted on them
- The ext2 partition (that you have previously created) in the SD card is mounted under /initrd
- First tar archives everything under /floppy (that is, the root filesystem) and sends it to standard output, which is piped to the standard input of second tar, which decompresses the archive stream under /initrd (where the root filesystem in SD card is mounted)
- You bind / in /floppy to avoid copying everything under /opt, /home/user/MyDocs, /proc, /sys, etc. Then you create a tar archive of the view of the root filesystem under /floppy, but instead of storing the tar archive in a file, you pipe it directly in the tar command to extract the archive in the ext2 partition in the SD card, so it is cloned.
 
Posts: 1 | Thanked: 3 times | Joined on Apr 2010
#20
With Linux, I don't see any problems doing a full backup/restore using rsync. I managed successfully to backup the entire file system of the N900 before sending my phone to service (a broken USB connector).

This is basically how I did the backup over the WLAN using rsync:
- Install rsync and openssh server on N900 and set up a root password
- On desktop Linux, create the following script (where 192.168.1.90 should be the IP address of your phone):
#! /bin/sh

# Please remove the -n switch after testing the script. With -n, no copying is actually done
rsync -avzn --delete \
--exclude /proc/'*' \
--exclude /sys/'*' \
--exclude /syspart/'*' \
--exclude /dev/'*' \
--exclude /tmp/'*' \
--exclude /var/tmp/'*' \
root@192.168.1.90:/ n900_backup/

Please be careful when using the --delete option. With that option, you can easily keep the backup copy up to date. Basically you must create an empty directory (here n900_backup) where to put your backup. (When using rsync, trailing / is meaningful).

And this is how i did restore everything to my new replacement N900:
- Install rsync and openssh server on N900 and set up a root password

Use the following script on desktop Linux to restore the entire backup (IMPORTANT: doing this, deletes everything from the phone, INCLUDING MEMORY CARD, not found from the backup!):
#! /bin/sh

# Again, remove the -n flag AFTER testing that everything works right
rsync -avzn --delete \
--exclude dev/ \
--exclude proc/ \
--exclude sys/ \
--exclude syspart/ \
n900_backup/ root@192.168.1.90:/

Please note: These scripts must be run as root on the desktop to get permissions right.

Last edited by Slasher; 2010-04-17 at 21:36.
 

The Following 3 Users Say Thank You to Slasher For This Useful Post:
Reply

Thread Tools

 
Forum Jump


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