Active Topics

 


Reply
Thread Tools
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#1311
Originally Posted by death_ghost View Post
you can see my partitions and my ubiboot.conf file
Looks OK to me.
And you really get no log files to your /home/user/MyDocs/boot/ after booting with ubiboot??

What exactly happens when you boot the device, you get the green-text screen OK, with the boot message and then finally end up with "boot menu script not found!" error?

Did you try to boot with USB cable connected, can you telnet to the device and check what's happening inside?

Last edited by juiceme; 2015-06-16 at 11:13. Reason: missing quote
 

The Following 2 Users Say Thank You to juiceme For This Useful Post:
Posts: 290 | Thanked: 385 times | Joined on Jan 2012 @ Madrid, Spain
#1312
Originally Posted by peterleinchen View Post
Short tutorial to backup full device with ubiboot (for console enthusiasts only ):

- power down device

- connect USB to device and PC (be it Linux or Windoze flavor)

- wait for maintenance mode screen
at this time you should notice also mounted drive(s) on PC,
on Windoze only p1, on Linux all partitions (according to your ubiboot.conf)
do NOT touch that drive under Windoze yet

- open a console on PC and telnet/ssh into N9

- create some mount points
mkdir /mnt/p1
mkdir /mnt/p2
mkdir /mnt/p3
mkdir /mnt/px #for other partitions you might have

- mount MyDocs read-write, rootfs (p2) and home (p3) read-only
mount -w -t vfat /dev/mmcblk0p1 /mnt/p1
mount -r -t ext4 /dev/mmcblk0p2 /mnt/p2
mount -r -t ext4 /dev/mmcblk0p3 /mnt/p3

- tar up rootfs and home on MyDocs
cd /mnt/p2
tar -cvf /mnt/p1/p2.tar *
cd /mnt/p3
tar -cvf /mnt/p1/p3.tar *

you may also use
tar -cvzf /mnt/p1/pX.tar.gz *
for compressed tar, but it will take ages...

- now unmount all
umount /mnt/p1
umount /mnt/p2
umount /mnt/p3

- if you like, grab the tar files on N9/MyDocs NOW via the mounted drive from PC (do this first at this stage/unmounting as MyDocs seems mountable twice from PC and from N9, read access should not get you into trouble, but concurrent write access may do so, to the extent of fully broken file system)

That's it. Full backup of device done under Windoze with the help of ubiboot maintenance mode.
For Linux you may do it the same way or just directly mount and tar from PC.

Thanks again to juiceme for providing such wonderful tool!


Just thought I write it down, even all above is obvious.
Maybe worth to add to wiki or Readme?



--
Restore:

- power down device

- connect USB to device and PC (be it Linux or Windoze flavor)

- wait for maintenance mode screen
at this time you should notice also mounted drive(s) on PC,
on Windoze only p1, on Linux all partitions (according to your ubiboot.conf)
do NOT touch that drive under Windoze yet

- open a console on PC and telnet/ssh into N9

- create some mount points
mkdir /mnt/p1
mkdir /mnt/p2
mkdir /mnt/p3
mkdir /mnt/px #for other partitions you might have

- mount MyDocs read-only, rootfs (p2) and home (p3) read-write
mount -r -t vfat /dev/mmcblk0p1 /mnt/p1
mount -w -t ext4 /dev/mmcblk0p2 /mnt/p2
mount -w -t ext4 /dev/mmcblk0p3 /mnt/p3

- untar rootfs and home from MyDocs
cd /mnt/p2
rm -fr *
tar -xvf /mnt/p1/p2.tar
cd /mnt/p3
rm -fr *
tar -xvf /mnt/p1/p3.tar

if you have compressed tar.gz, use
tar -xvzf /mnt/p1/pX.tar.gz

- now unmount all
umount /mnt/p1
umount /mnt/p2
umount /mnt/p3

If you need to copy the backup from PC back to N9 first, then do it as first step before mounting.

Disclaimer: verified the restore up to now only to copy Harmattan root from p2 to p5 and it worked. So I am convinced, this will work.

Hi.
Maybe a bit offtopic (and surely outdated) replay, but I just want to confirm this method just works.
I have tested it in my backup device (with openmode kernel) and so far it is working flawlessly.
However I have a pair of questions to ask:
1.- Can I do this procedure in a device without openmode kernel? My main device is not flashed with openmode .
2.- Given that only the ubiboot kernel is flashed to export the partitions: Can I skip the ubiboot installation process (i.e: will it work just flashing the ubiboot kernel, making the backup and then reflashing the stock kernel)?

Regards.
 

The Following 2 Users Say Thank You to pasko For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#1313
Originally Posted by pasko View Post
However I have a pair of questions to ask:
1.- Can I do this procedure in a device without openmode kernel? My main device is not flashed with openmode .
2.- Given that only the ubiboot kernel is flashed to export the partitions: Can I skip the ubiboot installation process (i.e: will it work just flashing the ubiboot kernel, making the backup and then reflashing the stock kernel)?
Hi!

I'll answer the second question first

Yes, if you use ubiboot kernel just to backup/restore your device, you do not need to install it, just flashing the kernel is enough. Even better, you do not need to flash the kernel at all, it is enough that you boot it with flasher, no permanent flashing required.
This way you do not need to reflash it again, just boot it after backup and it will use the original kernel.

Then the first question;
In theory the backup method works also with a device without open mode kernel, however note that when you boot it even once with something else than nokia-signed kernel the device will be set to open mode and remains so until you fully reflash it with nokia-signed package.
What this means is that your device will be in open mode without an open mode kernel; you lose ability to do some things, for example device lock will not work any more.
 

The Following 3 Users Say Thank You to juiceme For This Useful Post:
Posts: 290 | Thanked: 385 times | Joined on Jan 2012 @ Madrid, Spain
#1314
Originally Posted by juiceme View Post
Hi!
Then the first question;
In theory the backup method works also with a device without open mode kernel, however note that when you boot it even once with something else than nokia-signed kernel the device will be set to open mode and remains so until you fully reflash it with nokia-signed package.
What this means is that your device will be in open mode without an open mode kernel; you lose ability to do some things, for example device lock will not work any more.
Hi.
One more question
When you say "fully reflash it with nokia-signed package" you mean the whole vanilla package? Or is it enough to just reflash the stock kernel after the backup? (There's a "slight" difference, you know)

Regards.
 

The Following 2 Users Say Thank You to pasko For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#1315
Originally Posted by pasko View Post
Hi.
One more question
When you say "fully reflash it with nokia-signed package" you mean the whole vanilla package? Or is it enough to just reflash the stock kernel after the backup? (There's a "slight" difference, you know)

Regards.
No, reflashing the kernel is not enough. You need to reflash the whole firmware.

How it works; when you flash a non-signed kernel the flasher (or actually the APE algo) detects that and disables access to the protected parts of system in the boot phase. This change is pernamently one-way, and can be undone only if APE flashes the whole firmaware with signed packages, not just the kernel.

Rationale for that is easy to understand, yet it remains predominantly evil...
If it was allowed to run unsigned kernel and then return back to stock kernel with device still in protected mode, then it would be possible to make any kind of modifications to the system and retain them when in protected mode.... (something that device manufacturers do not like to see done)

SO there is easy rule-of-thumb; if, for whatever reason, your device for a split second enters open mode it stays in open mode until you fully reflash it with original sibned packages

[*] there are ways to get around this, but they are not easy and require either special tools or utilize some lesser known weaknesses of the system. Hence I will not discuss them here...
 

The Following 2 Users Say Thank You to juiceme For This Useful Post:
Posts: 290 | Thanked: 385 times | Joined on Jan 2012 @ Madrid, Spain
#1316
Hi.

Thank you for the information, Juiceme.
I think i'll refrain myself for a while.....
Regards.
 

The Following 2 Users Say Thank You to pasko For This Useful Post:
Posts: 498 | Thanked: 836 times | Joined on Jun 2012 @ Finland
#1317
Decided to flash my spare N9 with ubiboot for harmattan and nitroid. Can't find the zImage_e-yes_nitdroid+l2fi kernel that is to be used with Ubiboot anywhere from the web. Anyone have it?
__________________
- "Only two things are infinite, the universe and human stupidity, and I'm not sure about the universe."
- Albert Einstein
 

The Following 2 Users Say Thank You to Boxeri For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#1318
Originally Posted by Boxeri View Post
Decided to flash my spare N9 with ubiboot for harmattan and nitroid. Can't find the zImage_e-yes_nitdroid+l2fi kernel that is to be used with Ubiboot anywhere from the web. Anyone have it?
I probably have it, tucked somewhere.
I'll check when I get home later today.
 

The Following 3 Users Say Thank You to juiceme For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#1319
Here it is: http://www.swagman.org/juice/zImage_nitdroid+l2fix
MD5sum is ad06d746727fb7c243ee8c845b181f30
 

The Following 3 Users Say Thank You to juiceme For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#1320
Juiceme,

can you please properly document all the steps needed to boot another OS which is not any of the built-in ones? It's basically trial and error with the current documentation.
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 

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


 
Forum Jump


All times are GMT. The time now is 02:02.