maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9 (https://talk.maemo.org/showthread.php?t=91745)

Rusnak-COBRA 2013-11-07 18:23

Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Hey, I've got 2 N9 phones, one 16GB PR1.1 and second PR
1.3 64GB.
now my 16GB phone, fully customized with many private / exclusive bugs can not hold the SIM tray in, as it is simply broken (not tray, body itself, has really a lot of damage). that is what I want to dump the filesystem /mounting them to Linux PC and using "dd" utility/ and restoring them the same way to the PR1.3 phone. However, it has different kernel and I do not know if it will work.

did anyone try that? or do someone know if is even possible? Thanks.

nieldk 2013-11-07 20:21

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Best guess, No, it wont work.
I didnt try dd method you suggest, but, I did try using backupmenu on my 16G N9 (which I donated to David for working on injection drivers) in the hope I could use that backup on my second N9. Resulted in a needed reflash of that second phone.
Remind, you will probably end up changing parts like IMEI, HW revision etc.

juiceme 2013-11-07 21:56

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Using ubiboot it should work, even as the kernel is not the same. Of course both devices have to be in open mode before starting.
  • 1.) install ubiboot on both devices
  • 2.) boot to maintanance console on the source device. when partitions are exported, archive the content with tar (dd is not needed, as the filesystem image need not be byte-to-byte complement, and tar archive gives you a lot smaller file than dd dump)
  • 3.) boot to maintanance console on the target device. when partitions are exported, restore the archives taken from source device
  • 4.) copy the kernel you use on the source device to the mmcblk0p2:/boot/ directory, and copy the modules to mmcblk0p2:/lib/modules/kernelname/ directory
  • 5.) you should be done :)

Caveats:
I have not tried this myself, so even as it should work there might be some problems, like the firmware on the device. For example, I have no idea what happens if CMT is from a newer PR and runtime SW is from an older PR...?

Hurrian 2013-11-08 00:09

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Quote:

Originally Posted by juiceme (Post 1385021)
For example, I have no idea what happens if CMT is from a newer PR and runtime SW is from an older PR...?

CMT firmware differences don't really matter - e.g. China flashed CMTs more-or-less work just fine on say, PR_LEGACY 001.

Restoring partitions using BackupMenu and loading the kernel with ubiboot will work, though.

You might want to apply the L2 enable patch onto the PR1.1 sources, though!

NOTE: Flasher-3.5 will still recognize the device firmware as PR 1.3, software version is stored in CAL, IIRC.

nieldk 2013-11-08 05:09

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Quote:

Originally Posted by Hurrian (Post 1385035)
Restoring partitions using BackupMenu and loading the kernel with ubiboot will work, though.

Are you sure?
Restoting using backup menu did not work for me when trying to restore my (16G) backup on my new (64G) device.

juiceme 2013-11-08 05:50

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Quote:

Originally Posted by Hurrian (Post 1385035)
CMT firmware differences don't really matter - e.g. China flashed CMTs more-or-less work just fine on say, PR_LEGACY 001.

I kind of assumed this is so but have not got definite proof on it, as I have not tried this myself. (that's just because I do not have any devices other than PR1.3...)
Other than (possible) CMT incompability I do not see any real roadblocks in doing it.


Quote:

Originally Posted by Hurrian (Post 1385035)
Restoring partitions using BackupMenu and loading the kernel with ubiboot will work, though.

It is better to do both saving and restoring under ubiboot rather than BackupMenu, IMHO, as when you run the traditional BackupMenu you have rootfs mounted. It's good for backups of the home partition but as ubiboot runs orthogonally to all filesystems on mmcblk0 it is preferred when you want to grab everything from it.


Quote:

Originally Posted by Hurrian (Post 1385035)
You might want to apply the L2 enable patch onto the PR1.1 sources, though!

That's a good point! However at least I do not have sources for kernels of earlier PR's.


Quote:

Originally Posted by Hurrian (Post 1385035)
NOTE: Flasher-3.5 will still recognize the device firmware as PR 1.3, software version is stored in CAL, IIRC.

Yes, but that should not be visible for any userland software unless it really wants to dig the version out from the system basement. All OS SW will be on PR1.1.

One thing to note, the kernel command line given by NOLO when the device boots might be different between PR1.1 and PR1.3
If that is so, then you have to patch the differences in ubiboot loader where it handles the input and output command line.
(fortunately the newest ubiboot can also replace the whole command line, not just inject parameters into it like previous versions...)

juiceme 2013-11-08 05:51

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Quote:

Originally Posted by nieldk (Post 1385004)
Remind, you will probably end up changing parts like IMEI, HW revision etc.

All of that comes to kernel from NOLO, from the boot command line.
You do not really have to worry about those things :D

juiceme 2013-11-08 05:51

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Quote:

Originally Posted by nieldk (Post 1385060)
Are you sure?
Restoting using backup menu did not work for me when trying to restore my (16G) backup on my new (64G) device.

Well, did you do it under ubiboot?

nieldk 2013-11-08 07:51

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Quote:

Originally Posted by juiceme (Post 1385066)
Well, did you do it under ubiboot?

Nope, just using backupmenu

peterleinchen 2013-11-08 08:05

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Quote:

Originally Posted by nieldk (Post 1385087)
Nope, just using backupmenu

So you tried to boot PR1.1 SW with PR1.3 kernel?

I thinkg going the way juiceme described may work ...

nieldk 2013-11-08 08:15

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Quote:

Originally Posted by peterleinchen (Post 1385090)
So you tried to boot PR1.1 SW with PR1.3 kernel?

I thinkg going the way juiceme described may work ...

No. I flashed my second N9 (to restore on) completely stock->openmode full flash. backup was 1.3 FW, and I tried a restore to a completely similar kernel/rootfs.

peterleinchen 2013-11-08 08:42

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Cause maybe is the different HW revision? (also on N900 there are reports that a full backup cannot be restored on another device)

--
could be worked around with ubiboot.

Rusnak-COBRA 2013-11-11 17:25

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Hmm, my HW is also a different, as I plan to migrate from 16GB to 64GB...

anyway, 2 of 3 partitions are exactly the same.

Correct me if I am wrong, isn't kernel also stored on the phones memory, in one of system partitions?
Moreover, this is why I'd like to make a dd (bit to bit) copy a restore it in same way, so everything would be stored exactly the same way as was in old N9.

but reading your answers, i amf afraid more and more...

juiceme 2013-11-11 18:24

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Quote:

Originally Posted by Rusnak-COBRA (Post 1385648)
Hmm, my HW is also a different, as I plan to migrate from 16GB to 64GB...

anyway, 2 of 3 partitions are exactly the same.

Correct me if I am wrong, isn't kernel also stored on the phones memory, in one of system partitions?
Moreover, this is why I'd like to make a dd (bit to bit) copy a restore it in same way, so everything would be stored exactly the same way as was in old N9.

but reading your answers, i amf afraid more and more...

The booting kernel is normally stored on MTD chip partition, it is a different than the MMC device that your OS and runtime SW reside.
However, with ubiboot it is a bit different. Ubiboot kernel replaces the original kernel on MTD, and the actual runtime kernel is stored on your OS partition. (this way you can change kernels without reflashing the device)

To copy the device functionality from one to another (or to copy different PR level SW on the same device) you do not need to deal with MTD partition at all.
All that is required is that you back up and restore your mmcblk0p2 (rootfs partition) and mmcblk0p3 (home partition)
You do not need to do anything to mmcblk0p1 (MyDocs partition)

Because the filesystems on partitions 2 and 3 are normal ext4fs, you do not need a bit-to-bit-exact copy, for example a TAR archive is enough.

Rusnak-COBRA 2013-11-11 19:44

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Can I do any harm to my N9 if I only restore the saved partition and try how it runs? Thanks.

btw, can I do the "ubiboot magic" on devices as I have them now? with no flashing / changing / erasing data?

juiceme 2013-11-11 22:30

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Quote:

Originally Posted by Rusnak-COBRA (Post 1385674)
Can I do any harm to my N9 if I only restore the saved partition and try how it runs? Thanks.

I'd say you cannot very easily harm it permanently, if that's what you are asking.

Quote:

Originally Posted by Rusnak-COBRA (Post 1385674)
btw, can I do the "ubiboot magic" on devices as I have them now? with no flashing / changing / erasing data?

Yes, you can also run ubiboot in maintanance mode without flashing it to MTD, just turn the device off and restart it with flasher like this;

Code:

"sudo flasher -k zImage_2.6.32.54-ubiboot-02_301013 -l -b"
The flasher will push the ubiboot kernel to the device without flashing it, and if you do not disconnect the USB cable you will get straight to maintanance mode.

www.rzr.online.fr 2013-11-12 00:03

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
wondering what are the benefits of pr1.1 vs 1.3 ? I just upgraded mine to 1.3

Rusnak-COBRA 2013-11-13 19:15

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
the only benefit are some personal bugs, mods, half-working system...

Akkumaru 2013-11-14 01:00

Re: Can I? Dumping partitions of PR1.1, restoring them to PR1.3 N9
 
Also, the web browser url won't disappear if it fails to load :-)


All times are GMT. The time now is 03:30.

vBulletin® Version 3.8.8