maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   Introducing ubiboot N9 (multiboot OS loader) (https://talk.maemo.org/showthread.php?t=89345)

juiceme 2015-06-16 11:12

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Quote:

Originally Posted by death_ghost (Post 1473693)
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?

pasko 2015-08-12 21:14

Re: Backup/restore with ubiboot N9 (multiboot OS loader)
 
Quote:

Originally Posted by peterleinchen (Post 1383746)
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.

juiceme 2015-08-13 04:21

Re: Backup/restore with ubiboot N9 (multiboot OS loader)
 
Quote:

Originally Posted by pasko (Post 1479356)
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.

pasko 2015-08-13 08:08

Re: Backup/restore with ubiboot N9 (multiboot OS loader)
 
Quote:

Originally Posted by juiceme (Post 1479370)
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.

juiceme 2015-08-13 08:44

Re: Backup/restore with ubiboot N9 (multiboot OS loader)
 
Quote:

Originally Posted by pasko (Post 1479385)
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... :eek:
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...

pasko 2015-08-13 10:02

Re: Backup/restore with ubiboot N9 (multiboot OS loader)
 
Hi.

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

Boxeri 2015-09-04 08:12

Re: Introducing ubiboot N9 (multiboot OS loader)
 
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?

juiceme 2015-09-04 14:30

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Quote:

Originally Posted by Boxeri (Post 1481061)
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.

juiceme 2015-09-04 18:46

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Here it is: http://www.swagman.org/juice/zImage_nitdroid+l2fix
MD5sum is ad06d746727fb7c243ee8c845b181f30

marmistrz 2016-01-03 19:55

Re: Introducing ubiboot N9 (multiboot OS loader)
 
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.


All times are GMT. The time now is 04:06.

vBulletin® Version 3.8.8