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)

taixzo 2014-01-09 13:27

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

Originally Posted by juiceme (Post 1405113)
ADDITION: There's also a new beautiful ubiboot theme made by @FotixChiang called "Arctic"
  • The icons are better drawn than in my version :D
  • The menu screen has white background
  • It is compatible with ubiboot 0.3.5 and 0.3.6
  • Get it from swagman.org or from skeiron repositories

This is English localization but there is also a Chinese version available :)

Can we see pictures of it?

Shadwblade2652 2014-01-09 23:30

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

Originally Posted by juiceme (Post 1405049)
You need a new kernel, yes, but there's no flashing required :)

ubiboot is a boot loader, it loads your selected kernel from a file in userspace filesystem to memory and boots it.
That's the reason it can boot many OS'es, each with up to 6 selectable kernels. (there's the README document that tells you some things on how it works...)

Now, what you do, is you just copy the kernel image that's suitable for Nitdroid into /boot/ directory of your Harmattan installation, the same place that you now have your L2-fixed kernel, and then you write up a configuration entry for it in your ubiboot.conf file.

That's it. No flashing required, never again :)

Immediately after I posted my post I put the kernel in /boot and it worked after a couple tries. :)

juiceme 2014-01-10 12:54

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

Originally Posted by taixzo (Post 1405131)
Can we see pictures of it?

http://www.swagman.org/juice/Arctic_topmenu.png

Sunnyteki 2014-01-13 13:25

Re: Introducing ubiboot N9 (multiboot OS loader)
 
boot menu script not found...n9 got sailfish & harmattan working properly...until i rebooted in harmattan to switch over to sailfish......i faced this issue
"boot menu script not found"
plz run a maintenance boot"..help me guys

marmistrz 2014-01-13 19:40

Re: Introducing ubiboot N9 (multiboot OS loader)
 
I've edited ubiboot.conf and now I've got a "Trap! Booting in 2 seconds" message. How to cope with that without a full reflash?

juiceme 2014-01-13 21:13

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

Originally Posted by Sunnyteki (Post 1406098)
boot menu script not found...n9 got sailfish & harmattan working properly...until i rebooted in harmattan to switch over to sailfish......i faced this issue
"boot menu script not found"
plz run a maintenance boot"..help me guys

That message comes when init cannot find the menuscript "select_and_boot_os.sh" from your CPIO.
Usually that means that you have managed to put in incompatible CPIO or corrupted the one you are loading....

What is your ubiboot version number?

If you cannot boot any OS now, what you should do is connect the USB cable to a computer and go to the ubiboot maintanance mode.
Then you can telnet to the device and check what is the state of the FS, and why the menuscript is not found.

As a temporary measure you can just flash a normal Harmattan Open Mode kernel (like the L2-fixed kenel, for example...)

If you do so, and manage to boot up Harmattan, please could you post your ubiboot.log file so I can check what is the cause of the problem?
On versions older than 0.3.5 the loaction is /var/log/ubiboot.log and on newer versions /home/user/MyDocs/ubiboot.log

juiceme 2014-01-13 21:22

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

Originally Posted by marmistrz (Post 1406195)
I've edited ubiboot.conf and now I've got a "Trap! Booting in 2 seconds" message. How to cope with that without a full reflash?

Propably you managed to mess up some setting that causes init to trap on a command expected to always succeed.
Are you able to go to maintanance mode (connect USB cable to a computer) or does the trap occur before maintanance console activation?

If you cannot activate maintanance mode, then you are in a bit trickier situation, since you propably need to boot a different kernel (not ubiboot since it always tries to read ubiboot.conf)

However, full flash is not required, not at all :)
  • You could load up the MOSLO kernel and then telnet to the device, mount up the /dev/mmcblk0p1 and correct the problem in your ubiboot.conf
  • You could temporarily flash the L2-fixed kernel, for example so that the device boots up to Harmattan, and then fix the problem in your ubiboot.conf

juiceme 2014-01-14 06:04

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Now this problem that @marmistrz got had me thinking a bit of a design problem in ubiboot that need addressing.

If indeed it is possible to get init to trap with an ill-formatted ubiboot.conf file there needs to be a way to get out of this situation gracefully, for example by marking the ubiboot.conf file tainted and not use it on the subsequent boots.

Scenario could be something like this;
  • 1.) set up basic environment
  • 2.) load ubiboot.conf
  • 3.) check if init has trapped 2 times since a clean boot
  • 4.) if not, then use the loaded ubiboot.conf, else mark the ubiboot.conf file bad
  • 5.) continue in OK case, reboot in NOK case.
If init traps after that, a persistent counter is increased before the device is booted.

Basically what happens is if you soup up your ubiboot.conf badly, the device renames it to ubiboot.conf.bad for example and so on the 3rd attempt no configuration file is found and the device goes to maintanance mode.

Actually there is a possibility of using an automatic backup configuration with this kind of setup! :D
  • since ubiboot searches the partitions in order; 1, 2, 3, 4, ... when looking for a valid ubiboot.conf file, it is now enough to place another ubiboobt.conf and CPIO files to /boot/ of partition 2
  • if a valid file is not found on /boot/ of partition 1, then the system will continue to search from the next partitions :)
  • this way you can have a copy of the previous proven ubiboot configuration there if you want to experiment, or even a totally different menu layout...

peterleinchen 2014-01-14 07:24

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Nice idea.
But wouldn't it be easier to create a safe copy like 'ubiboot.conf.sav' in the same folder (which gets loaded after marking current conf as bad)? This way we could still have configs on mtd 4/5 and p1. If marked as bad and not found '*.sav' then jump to next partition.

juiceme 2014-01-14 08:59

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Excellent idea :)

There's just one minor thing, what if the .sav is also corrupt?

I suppose there needs to be logic to decide that, too and in case it proves to be so then proceed to the next partition and finally to drop to unfiltered maintanance mode if nothing starts up correctly :D

peterleinchen 2014-01-14 13:08

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Yes, Sir. :D
But having the sav on same partition also corrupt is very similar (same?) as having a corrupt conf on another (next) partition, or?
So I guess one of those approaches would be sufficient. (tending to mine ;))

--
Or I just misread and you are right.
To make it absolutely fool proof we would need that logic.
I thought if sav is also corrupt you are screwed. (on your own fault)
Only jumping to next partition when no conf is found at all.

coderus 2014-01-14 13:45

Re: Introducing ubiboot N9 (multiboot OS loader)
 
jumping jumpy jumping rabbit jumping jumpy over partitions.

just make fallback configuration automatically searching over partitions for harmattan kernel and load it.

juiceme 2014-01-14 16:45

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

Originally Posted by marmistrz (Post 1406195)
I've edited ubiboot.conf and now I've got a "Trap! Booting in 2 seconds" message. How to cope with that without a full reflash?

When you have managed to fix it, can you tell me what kind of modification did you make to your device to break it?

I'd need that as a test case for the next version of ubiboot which contains the fix to handle the init trap loop.

marmistrz 2014-01-14 17:15

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Should I load the moslo used for installing Sailfish (the one creatning Alt_OS) or will it want to create the partition once again

juiceme 2014-01-14 17:40

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

Originally Posted by marmistrz (Post 1406385)
Should I load the moslo used for installing Sailfish (the one creatning Alt_OS) or will it want to create the partition once again

It will not do anything like that, as it will only create it once.
(and if you want to remove the partition, you need to give a command to do that)

It will export your ALT_OS partition and let you telnet in the device.

marmistrz 2014-01-14 18:30

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Thanks.

Here you go: http://marmistrz.net63.net/public/ubiboot/

Please tell me, what wrong with this file :)

Lucazz990 2014-01-14 18:54

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Hi, playing with the flasher i noticed that there is this option:
Code:

--suppress-warranty-warning
So can this be used to remove the warranty warning while flashing firmware? Or while flashing open kernel?

coderus 2014-01-14 19:19

Re: Introducing ubiboot N9 (multiboot OS loader)
 
@Lucazz990 this is just fake option doing nothing, was added by nokia engineers for fun :)

Lucazz990 2014-01-14 19:44

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

Originally Posted by coderus (Post 1406425)
@Lucazz990 this is just fake option doing nothing, was added by nokia engineers for fun :)

I mean if this is for removing the warning while booting the n9 but nope, just found it was already answered some months ago, it's just for the flasher warning. Was it a so stupid question? :)

juiceme 2014-01-14 20:22

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

Originally Posted by marmistrz (Post 1406407)
Thanks.

Here you go: http://marmistrz.net63.net/public/ubiboot/

Please tell me, what wrong with this file :)

Heh, found it :D:D

In your config you have this part.... Check the line I printed in red...

# The second OS is usually Harmattan.
# This section lists the Harmattan specific switches and kernels
G_OS2_NUM=2
G_OS2_AUTOBOOT=0
G_OS2_PARTITION=2
G_OS2_NAME="Harmattan"
G_OS2_1_LABEL="Kernel Plus 2.6.32.61"
G_OS2_1_FILE="/boot/Harmattan/boot/zImage_2.6.32.61-plus_20131128"
G_OS2_2_LABEL=""
G_OS2_2_FILE=""
G_OS2_3_LABEL="
G_OS2_3_FILE=""
G_OS2_4_LABEL="Open Mode kernel + L2fix"
G_OS2_4_FILE="/boot/Harmattan/boot/zImage_2.6.32.54-openmode_l2fix"
G_OS2_5_LABEL=""
G_OS2_5_FILE=""
G_OS2_6_LABEL=""
G_OS2_6_FILE=""

Sunnyteki 2014-01-17 06:49

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

Originally Posted by juiceme (Post 1406223)
That message comes when init cannot find the menuscript "select_and_boot_os.sh" from your CPIO.
Usually that means that you have managed to put in incompatible CPIO or corrupted the one you are loading....

What is your ubiboot version number?

If you cannot boot any OS now, what you should do is connect the USB cable to a computer and go to the ubiboot maintanance mode.
Then you can telnet to the device and check what is the state of the FS, and why the menuscript is not found.

As a temporary measure you can just flash a normal Harmattan Open Mode kernel (like the L2-fixed kenel, for example...)

If you do so, and manage to boot up Harmattan, please could you post your ubiboot.log file so I can check what is the cause of the problem?
On versions older than 0.3.5 the loaction is /var/log/ubiboot.log and on newer versions /home/user/MyDocs/ubiboot.log

sir, i have flashed main.bin to recover.atleast my harmattan is up..dont know why suddenly all of sudden after a reboot.i got this error....i couldnot find ubiboot.log in MyDocs.i am using ubiboot specially for sailfishn harmattan.i can see a folder named "de" inn MyDocs..will that help?

juiceme 2014-01-17 13:00

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

Originally Posted by Sunnyteki (Post 1407004)
sir, i have flashed main.bin to recover.atleast my harmattan is up..dont know why suddenly all of sudden after a reboot.i got this error....i couldnot find ubiboot.log in MyDocs.i am using ubiboot specially for sailfishn harmattan.i can see a folder named "de" inn MyDocs..will that help?

Sorry, I had a typo there, the correct location is /home/user/MyDocs/boot/ubiboot.log
Can you find that file?

marmistrz 2014-01-21 16:04

Re: Introducing ubiboot N9 (multiboot OS loader)
 
After my last trouble with ubiboot I need to enter the passwords at each bootup, even if I remove the accounts. Any ideas why?

coderus 2014-01-21 16:53

Re: Introducing ubiboot N9 (multiboot OS loader)
 
I think it something related to openmode. i saw something in some guide about flashing or so.

juiceme 2014-01-21 16:58

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

Originally Posted by marmistrz (Post 1407957)
After my last trouble with ubiboot I need to enter the passwords at each bootup, even if I remove the accounts. Any ideas why?

You need to use back-to-back Closedmode-Openmode flashing, that way you will avoid all the ugly aegis-related problems in Open Mode.

coderus 2014-01-21 17:21

Re: Introducing ubiboot N9 (multiboot OS loader)
 
no need to flashing :)
just remove your accounts, /home/user/.accounts and /home/user/.aegis, reboot and create accounts again.

private keys changed when switched to openmode, and aegis no longer can encrypt own partitions to get passwords and etc :D

marmistrz 2014-01-21 17:47

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Well, I didn't use closed mode at all in the meantime, but I'll try coderus' method and report

Lucazz990 2014-01-27 18:41

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Hi, would it be a nice idea to add a kind of "main" password directly in Ubiboot instead of one for each OS? :)

marmistrz 2014-01-27 18:46

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

Originally Posted by marmistrz (Post 1407985)
Well, I didn't use closed mode at all in the meantime, but I'll try coderus' method and report

It did work.

juiceme 2014-01-28 20:32

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

Originally Posted by Lucazz990 (Post 1409317)
Hi, would it be a nice idea to add a kind of "main" password directly in Ubiboot instead of one for each OS? :)

Well yes, there are ways of doing that (encrypt all partitions, query for key in ubiboot, pass the authenticated token somehow neatly into the starting kernel's memory area...)

However, technically very difficult to achieve, unfortunately :p

mkpal 2014-01-30 10:39

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Dear Experts,

Iam happy to have been visiting this forum for a year and would like to make my first post (!) seeking your help. u guys are so nice and helpful..Big Thanks for all. I'd would like to appreciate all your excellent work.

I had installed ubiboot on my White N9 and couldnot boot into any OS. So I temporarily flashed the L2-fixed kernel and now Harmattan is working. I'd like to use ubiboot and fix related problems.
I backedup all my files and would like to full-flash if required but don't know how to do it. Iam afraid about the repartioning done by moslo during my first ubiboot install. Could someone kindly help, please?
Iam attaching my ubiboot.log file here:
https://www.dropbox.com/s/14u9bvfi0ztbfkc/ubiboot.log

Thanks.

juiceme 2014-01-30 11:35

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

Originally Posted by mkpal (Post 1409788)
Dear Experts,

Iam happy to have been visiting this forum for a year and would like to make my first post (!) seeking your help. u guys are so nice and helpful..Big Thanks for all. I'd would like to appreciate all your excellent work.

I had installed ubiboot on my White N9 and couldnot boot into any OS. So I temporarily flashed the L2-fixed kernel and now Harmattan is working. I'd like to use ubiboot and fix related problems.
I backedup all my files and would like to full-flash if required but don't know how to do it. Iam afraid about the repartioning done by moslo during my first ubiboot install. Could someone kindly help, please?
Iam attaching my ubiboot.log file here:
https://www.dropbox.com/s/14u9bvfi0ztbfkc/ubiboot.log

Thanks.

According tou your log, your kernel image file was found and loaded successifully, so what fails is one of the steps after that.
I am fairly sure you are missing your harmattan preinit file, as that is the most common failure after a misplaced kernel image.

To make sure, please check that you have /sbin/preinit_harmattan on your root partition.
If you are missing it, you can copy your existing preinit file and it should be OK.

To do that, enter the collowing command as root:
"cp /sbin/preinit /sbin/preinit_harmattan"

After that, just reflash your ubiboot kernel and you should be fine.

Hurrian 2014-01-30 12:42

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

Originally Posted by juiceme (Post 1409496)
Well yes, there are ways of doing that (encrypt all partitions, query for key in ubiboot, pass the authenticated token somehow neatly into the starting kernel's memory area...)

I've thought about this while on vacation :P
LVM and dm-crypt, accelerated by omap-aes would be quite nice to use!

You could set up an encrypted LUKS partition on the bare eMMC device, then straight up LVM on top of it.

The key to unlock the LUKS would be part of Ubiboot - you'd probably have the device IMEI XOR'd with the user's passcode, then run through PBKDF2.

Unfortunately, to minimize modifications needed to Harmattan and other OSes, the kernel would need to be modified to accept a LUKS key passed in the kernel cmdline.

The real challenge is ensuring the entire bootchain is trusted - the inability for us to codesign our kernels and block unsigned code is a challenge.

From what I know, the OMAP on the N9/50 requires a signed primary boot loader, secondary AKA NOLO is allowed to be unsigned, breaking the chain of trust :(

If we could load our own code signing certificates, end-users themselves could trust the software that runs on their devices, and warn if unsigned software runs.

(Yes, I just described the reverse of a jailbreak - security functions, when used to protect user data are a godsend!)

mkpal 2014-02-02 09:29

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

Originally Posted by juiceme (Post 1409794)
According tou your log, your kernel image file was found and loaded successifully, so what fails is one of the steps after that.
I am fairly sure you are missing your harmattan preinit file, as that is the most common failure after a misplaced kernel image.

To make sure, please check that you have /sbin/preinit_harmattan on your root partition.
If you are missing it, you can copy your existing preinit file and it should be OK.

To do that, enter the collowing command as root:
"cp /sbin/preinit /sbin/preinit_harmattan"

After that, just reflash your ubiboot kernel and you should be fine.

@juiceme Thankyou so much. I followed ur commands (copying file and flashing ubiboot 02 kernel) and now I have ubiboot menu booting up and harmattan loads fine when chosen.
However, when nitdroid is chosen (Eyes's L2Fix Nitdroid image under android menu), nothing happens even if waiting for a long time. So I switched off and switched on to get ubibbot menu. Sailfish boots but not nitdroidor firefox . Did I miss something ? or is that got to do with reflashing ubiboot after copying of preinit-harmattan. Kindly help, if possible.

Also, what if I want to uninstall ubiboot completely (excluding the moslo partitioning procedure) and reinstall ubiboot and all OS from scratch? Is there a uninstall tutorial? As Iam a windows user, I'm willing to compile the ubiboot install and reinstall procedure for (windows users), when i get familiar with the steps. May be, if each step is indexed well, that will make it simple for all.

I appreciate all your efforts and Thanks again.

juiceme 2014-02-02 22:05

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

Originally Posted by mkpal (Post 1410417)
@juiceme Thankyou so much. I followed ur commands (copying file and flashing ubiboot 02 kernel) and now I have ubiboot menu booting up and harmattan loads fine when chosen.
However, when nitdroid is chosen (Eyes's L2Fix Nitdroid image under android menu), nothing happens even if waiting for a long time. So I switched off and switched on to get ubibbot menu. Sailfish boots but not nitdroidor firefox . Did I miss something ? or is that got to do with reflashing ubiboot after copying of preinit-harmattan. Kindly help, if possible.

Well, for Nitdroid you need the preinit_nitdroid file, of course.
Did yo read through the readme file and wiki page, I am fairly certain that those things are mentioned there?

Sailfish boots because unlike Harmattan & Nitdroid it does not need a preinit file to start up, the init file of Sailfish is already included in the Sailfish filesystem image.


Quote:

Originally Posted by mkpal (Post 1410417)
Also, what if I want to uninstall ubiboot completely (excluding the moslo partitioning procedure) and reinstall ubiboot and all OS from scratch? Is there a uninstall tutorial? As Iam a windows user, I'm willing to compile the ubiboot install and reinstall procedure for (windows users), when i get familiar with the steps. May be, if each step is indexed well, that will make it simple for all.

Ubiboot is composed of 2 separate but interdependent parts; the ubiboot kernel and the cpio+config files.
Uninstalling ubiboot is very easy, all you have to do is to flash a "regular" kernel to your device, for example using the L2-fixed kernel:
sudo flasher -a firmware.bin -k zImage_2.6.32.54-openmode_l2fix --flash-only=kernel -f -R

After that your system does not use the cpio and config any longer, so ubiboot is effectively uninstalled.

yemko 2014-02-12 09:35

Re: Introducing ubiboot N9 (multiboot OS loader)
 
I already enabled developer mode, AFter disclaimer-cal remove View-openmode
rm -rf /home/user/.accounts/
rm -rf /home/user/.aegis/
rm -rf /home/user/.activesync/

do i still need back to back flashing?

juiceme 2014-02-13 06:39

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

Originally Posted by yemko (Post 1412365)
I already enabled developer mode, AFter disclaimer-cal remove View-openmode
rm -rf /home/user/.accounts/
rm -rf /home/user/.aegis/
rm -rf /home/user/.activesync/

do i still need back to back flashing?

It is highly likely that your device works correctly, as the things you have done fix the most visible problems.
There might still be something that causes hidden problems, but if you have now used your device for some time after this, and seen no adverse effects it probably is OK to continue without back-to-back flashing.

Ancelad 2014-02-13 06:51

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Any news about backupmenu?

yemko 2014-03-12 06:39

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Hmmm thank you modders. I encountered a great bug on Alpha 5 Headset not working. Music playing via loudspeaker only! Any solution to this?

coderus 2014-03-12 07:24

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Using Alpha4 is solution


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

vBulletin® Version 3.8.8