PDA

View Full Version : Prepare for rescue Nokia N900: full backup


narcisgarcia
2010-06-29, 18:07
I've read the guides for updating/installing a downloaded Maemo firmware:
http://maemo.nokia.com/n900/tips/software-update/
http://wiki.maemo.org/Updating_the_tablet_firmware

but after searching a lot, I haven't found the way to make a backup of the firmware with all the data.
Of course I need a procedure to make it with a Linux PC.

ndi
2010-06-29, 23:37
If you mean a bit copy, then you can't, buy you don't need it, as only a few things get stored on the root and those are backed up.

You could try a SSH connection and use transport over to get files, but there's little point as the same files are inside the firmware flash image.

maxximuscool
2010-06-29, 23:41
You can't back up the installed apps data, but you can backup the list of apps installed on your device. There is no way to do a full backup and recovery on this device to be honest. Just partial entries of what can be backup.

narcisgarcia
2010-06-30, 07:59
- No way to backup the filesystem (as Partimage does)?

- Plugging the device to a Computer USB port, can be all the filesystems mounted?

- If I backup the directory tree with the files (via SFTP), can I restore them later?

clasificado
2010-06-30, 13:33
A Partition backup is possible, but its not designed for easy use. Isnt even an application, but a technique

Here is a how-could (like a how-to, but YMMV): http://metalab.at/wiki/Hack-A-N900/Dump_and_Restore_rootfs_Image

In the end, you will do backup with dd if=/dev/mtd5 | ssh root@yourlinuxpc "cat > rootfs.img"
and a restore with the flasher ./flasher-3.5 -r rootfs.img -f -R

But keep in mind that you are playing with bare data, so you must know what are you doing if something goes wrong

ndi
2010-06-30, 15:38
You have a much higher risk of something going wrong if you do it like that than using the stuff designed to back up the partition.

Why would you want to back up the root partition anyway? 99% of what's in there is in the flash image. The little there is left is probably configuration files you can just copy to the home partition in a backup structure.

narcisgarcia
2010-06-30, 15:45
I've found that YMMV = Your results may vary.

Well, I see that is needed to modify the firmware to backup it, but is a solution.

I hope that a next version of Flasher will be released with backup support (bi-directional functions).

narcisgarcia
2010-06-30, 15:50
ndi, what is "the stuff designed to back up the partition"? Is something better?

The reason of the full backup is to have option to restore the device exactly in the same state as the vendor released to me. Not with a new or developer version: with the originally provided by the vendor, without any different file.
This can make easier to make use of warranty and support.

ndi
2010-06-30, 15:59
The reason of the full backup is to have option to restore the device exactly in the same state as the vendor released to me.

If you mean at PR 1.0, you can't. Flashing up upgrades the internal flash of the radio modem, as a result reverting to any previous version (1.0 versus 1.1 versus 1.2) will render the GSM unworkable. The only way to keep 1.0 is to never upgrade, ever.

If you mean "clean" firmware, reflashing both the root and the EMMC restores exactly to clean, as it's what the darn thing does. (minus the lock code)

If you flash it to PR 1.2 (with MMC) over the old, modified PR 1.2 there's no telltale, you can replace your kernel in peace. However, should you fry your device with OS, it won't start and there's no reflashing a brick. Plus, heat damage to a CPU is recognizable, that's why it's not banned and companies still accept returns for components that still have water coolers on.

Plus, it's not illegal to modify your OS unless you use it to get out of a contract. It's your phone and you're free to do whatever you want with it. Should you fry with OC, they'll probable able to tell, regardless. Not that having a different kernel means you OCd it.

lemmyslender
2010-06-30, 16:31
I posted a thread (http://talk.maemo.org/showthread.php?t=53415) a while back with a script to backup /opt and /home/user to MyDocs as tar files. That should get you almost everything. Just copy the resulting files off onto your pc.

Yous should be able to copy files back to a freshly flashed device as desired (pay attention to permissions though).

One note, it check to make sure the device is charging before backing up.

narcisgarcia
2010-07-01, 09:52
Thanks ndi, your last message sounds very interesting. I'm not much expert in english language, and I've understood partially each one of your answers:

I don't know what is "PR"
I don't know about which "radio modem" are you talking, or why in this context, same as some GSM or why is related to the question (doesn't it work with a normal software driver as any other device?).
"reflashing both the root and the EMMC"... Doesn't the EMMC the internal place where the root is put?
The lock code? I've read the Nokia N900 hasn't a lock-in. Is it stored in some else place?
"modified PR 1.2 there's no telltale"... I don't understand the expression, sorry.
"should you fry your device with OS"... are you talking about when replacing a kernel? The Maemo Linux kernel or another kernel? Which are the flashing movements with more possibilities to definitely brick the device? What is "OC"?
The Nokia N900 has water coolers?


Please, could you explain your answer to make it easier?
Thanks.

ndi
2010-07-01, 12:13
Thanks ndi, your last message sounds very interesting. I'm not much expert in english language, and I've understood partially each one of your answers:

I don't know what is "PR"



Stands for Public Release. OS is version 5, so first version is 5.1.0 AKA PR 1.0. Then 1.1 is called PR1.1. Each one is a version of the firmware, released by Nokia.




I don't know about which "radio modem" are you talking, or why in this context, same as some GSM or why is related to the question (doesn't it work with a normal software driver as any other device?).



Yes and no. The GSM radio is its own chip, independent from the OS, running a firmware, much like a modem in a PC runs a firmware. The installation of 5.1.2 (PR 1.2) upgraded the chip's firmware. That firmware can't be downgraded, and the driver in 1.2 no longer works with the firmware in 1.1 and the other way around.

Once flashed to 1.2, if you revert to 1.1, 1.1 can't use GSM because the chip is from the future.

Short version, only flash in same version or higher, never backwards. Or GSM doesn't work.




"reflashing both the root and the EMMC"... Doesn't the EMMC the internal place where the root is put?



No. N900 has a 256M internal fast flash, where the OS resides. This is root. The EMMC has a 2G partition for "applications", called "home" and the rest of (30?) as "documents", that stuff that gets mounted when you plug in USB. Mainly, because it's FAT and it's easy to share a FAT over USB. The root and home are only visible to the device and via SSH or other services that do this on purpose (ftp, etc)

Home is also where apps install, configs are stored, etc. Not rewriting that could cause things like passwords, settings, etc to stick.




The lock code? I've read the Nokia N900 hasn't a lock-in. Is it stored in some else place?



Not that network lock, the lock code when you lock your device so it can't be accessed by others, you know, 12345. Power button> lock device.




"modified PR 1.2 there's no telltale"... I don't understand the expression, sorry.



A telltale sign is a sign that tells the whole tale (story) when observed. E.g., corner scratches are telltale signs of dropping the device.




"should you fry your device with OS"... are you talking about when replacing a kernel? The Maemo Linux kernel or another kernel? Which are the flashing movements with more possibilities to definitely brick the device? What is "OC"?



I assumed you want to overclock your device. If you don;t know what OC is at first glance, don't do it. And yes, I am talking about replacing the kernel. That is one of the few things you would try to ... er ... change when returning your N900.

Why else revert the thing? Contacts, images, messages can all be deleted from the UI.




The Nokia N900 has water coolers?



If you want to. No, I was referring to PC components that have been obviously overclocked. But, since you don't seem to want that, nevermind.


Please, could you explain your answer to make it easier?
Thanks.

Sure. Here you go.

narcisgarcia
2010-07-01, 15:32
Thanks ndi, you've been very comprehensive.

I like the possibility of overclocking my device, such as other things, but I prefer to learn everything about the device before doing this or any other.

Better than "Oh! Curiously this works!" I like better to know why some hack works, and what (and why) are the risks before customizing the system.

Nice to know the partition architecture: fast 256MiB flash memory for (read only?) root, and 32GiB for random write/access filesystems {2GiB for software and config + 30GiB in FAT for user documents}.

But now I discover that some versions of released firmware include independent firmwares for devices in the device (as GSM modem). Does it mean that GSM modem's firmware cannot be backup in the same way?

ndi
2010-07-01, 16:15
a) root is read-write, and software can be installed there, as in normal Linux. However, because space is limited, even though root is compressed, they install in the 2G partition, mounted in /opt. The process of moving off root and in the 2G partition is called "optification/optifying"

b) You can't back up the radio driver, correct. Why older versions don't downgrade the driver I don't know.

c) There's also the card, bringing the grand total to 50G ish, it's mounted in /media/mmc. 16 G max because that was the largest this far, but people report no problems with 32G microSD. Why would anyone use more I don't now. But, why not?

d) Also, there's a partition you can't see, for swap (754M).

e) Most of this info is in the wiki. It's a good read at your own pace, includes OC, custom kernels without OC, well, everything you want to know about N900. (Wiki.maemo.org)

narcisgarcia
2010-07-01, 16:56
Ok, "OC" = OverClocking.

Do other GNU installable systems (Debian, Ubuntu) have problems to use devices as GSM modem? People who install other OS, does it replacing Maemo or adding another root partition + boot selector?

ndi
2010-07-01, 17:06
GSM modem driver and interfaces are closed (and proprietary I think). Good luck with that.

narcisgarcia
2010-08-14, 12:19
Another utility for bi-directional flasher: backup user partitions before reflashing when bricked (http://talk.maemo.org/showthread.php?p=786248).