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 2013-03-21 09:02

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

Originally Posted by TMavica (Post 1330314)
I think the problem is here...should be change to

G_HARMATTAN_INITSCRIPT="/sbin/preinit_harmattan"
G_NITDROID_INITSCRIPT="/sbin/preinit_nitdroid"
G_NEMO_INITSCRIPT="/sbin/init"

The _INITSCRIPT variables hold strings that are used as replacements in a sed script in the bootmenu.
Trust me, you have to escape backslashes in sedscripts :D

Harmattan boot is alwayst the trickiest. Booting Nitdroid or Nemo is piece of cake, but getting Harmattan to boot correctly when kexec'ed is difficult.

However, you tell me that you have managed to boot it with the zImage-2.6.32.54-dfl61-20121301 kernel... Is that the standard version or is it some openmode version? (the same designation is used by all versions based on vanilla 2.6.32 source by nokia, available in kernel_2.6.32-20121301+0m8.tar file)

Booting with either Nitdroid zImage.pr13 or zImage_2.6.32.54-openmode_l2fix will succeed if booting with vanilla 2.6.32 kernel boot succeeds.
Hence I belive you have an error in your paths somewhere.

If the boot hangs with the "NOKIA" text displayed on the screen after kernel selection&boot something is not correct in the preinit scripts, either device does not find the script or the script does not do as it should.

One thing you could try; copy your original "/sbin/preinit" as the harmattan script "/sbin/preinit_harmattan".
At least thedead1440 had problems using my provided preinit script.

However problematic it seems to get Harmattan boot up correctly, after you have tweaked it so that it boots it is VERY stable and will thereafter boot correctly without additional tickling :D

juiceme 2013-03-21 09:10

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

Originally Posted by rainisto (Post 1330369)
Just tested this with one of my N950's. but unfortunately that one had ecc memory errors even on mtd5, so no way to make a volume for it.

Would be great to see initramfs or mmcblk version someday.

The integrated version is in the works :)

Currently the implementation plan is as follows:
  • The kernel contains as small as possible set to have the launcher and repar mode tools, to keep the size in check. This will be run as ramfs root
  • In the boot phase, the kernel searches for rest of the stuff, it looks for menuset first in mtd4, then in mtd5, and if not found on either, from mmcblk02p:/boot
  • If the menu&config is found, it's loaded into the ramfs and executed.
  • If not found, repair mode is entered.

The reason why it does it like this is that now I can mount the ubi devices in ro-mode. This lessens the wear of the flash device :)

juiceme 2013-03-21 09:17

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

Originally Posted by explit (Post 1330387)
Cool Thing. After a mtd-5 update I'm able to boot NITDROID with zImage.pr13 and Harmattan with zImage.pr13 and standard openmode Kernel.
I copied both kernels inside /mnt/boot (Without Harmattan or Nemo Folders). and modiefied /etc/boot.conf to point to my kernels inside /boot. Is it a bad idea ?

Well, it's not a bad idea otherwice, except now your kernels are on the ubifs, instead of on the mmcblk0.

What's the problem with that: nothing really, except that your mtd5 partition is so small; you will use it up if you put lots of stuff there. Also, as it DOES wear down somewhat quickly when used extensively, you can/will run out of eraseblocks if you do lots of deletes/rewrites on it... That's why I prefer to keep the kernels outside ubifs. :D

Quote:

Originally Posted by explit (Post 1330387)
Maybe anybody can give me a tip for Tripleboot (Harmattan, Nitdroid, Nemo) ?

Has anybody of you have a running tripleboot with the UBIBoot ?

THX guys...

Yes, have had it for months :)

The scripts to do it are already in the menu script.
Just install your android on /home/ as usual, install Nemo on mmcblkp04 as usual and you are done :D

TMavica 2013-03-21 09:31

I using mtd5, i put all kernel into /boot/, harmattan is not success to boot, show nokia logo then reboot self, but android is ok.

I have used your l2fix to boot, but still unsuccessful, all kernel cant be bootup. Maybe the preinit got problem, let me try again later and report. Thanks your help.

rainisto 2013-03-21 10:00

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

Originally Posted by juiceme (Post 1330446)
The integrated version is in the works :)

Currently the implementation plan is as follows:
  • The kernel contains as small as possible set to have the launcher and repar mode tools, to keep the size in check. This will be run as ramfs root
  • In the boot phase, the kernel searches for rest of the stuff, it looks for menuset first in mtd4, then in mtd5, and if not found on either, from mmcblk02p:/boot
  • If the menu&config is found, it's loaded into the ramfs and executed.
  • If not found, repair mode is entered.

The reason why it does it like this is that now I can mount the ubi devices in ro-mode. This lessens the wear of the flash device :)

Perfect :) cant wait to be able to test it.

I just tested on another N950, but even that one had ecc errors on mtd4&5. I still have a third one in mint unopened box, but I'll keep that one still unopened, since I want to have one perfect N950 in my shelves as a memory :)

coderus 2013-03-21 11:02

Re: Introducing ubiboot N9 (multiboot OS loader)
 
off:
@rainisto ehhh, sad to read when dev have N950 and not using it, and other devs havent device for testing and buying N9 by own money...

TMavica 2013-03-21 15:11

Re: Introducing ubiboot N9 (multiboot OS loader)
 
@juiceme

Finally I can boot to Harmattan by using default preinit file, but there is some problem I found.
1. l2fix kernel, when bootup, it said "recharge battery", then it reboot self
2. Nitdroid zImage, sometimes can boot , sometimes cant...
3. zImage-2.6.32.54-dfl61-20121301, it said "recharge battery", or sometimes cant boot...

The path shouldnt wrong, because android can bootup everytime, then kernel is same directory with Harmattan /boot/, I GUESS something in Harmattan, maybe some tunning or mod, make my Harmattan cant bootup. I dont want to reflash to try:D

coderus 2013-03-21 15:22

Re: Introducing ubiboot N9 (multiboot OS loader)
 
+1

my friend can't ubiboot to Harmattan with "Recharge battery" notification too.

TMavica 2013-03-21 15:30

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

Originally Posted by coderus (Post 1330530)
+1

my friend can't ubiboot to Harmattan with "Recharge battery" notification too.

!!
When circle the nokia logo, it said recharge battery, I tried plug to charger, nil help

Burlone 2013-03-21 16:12

Re: Introducing ubiboot N9 (multiboot OS loader)
 
i have the same proble

theyosh 2013-03-21 19:14

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Yup, I had this about a few weeks also. I stopped testing for now. The l2 fix will reboot with an empty battery message.

zImage3 is working. And I got three OSes running. So for now I am ok. But I was wondering that when we can have more partitions, can we have more OSes? Now we are limited to three. There is also an Easy Debian package that starts a Debian OS using chroot (http://talk.maemo.org/showthread.php?t=85878)

Would it not be cool to have that as a fourth OS?

Regards
TheYOSH

peterleinchen 2013-03-21 21:10

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

Originally Posted by theyosh (Post 1330593)
Yup, I had this about a few weeks also. I stopped testing for now. The l2 fix will reboot with an empty battery message.

Seems like every N9 is also a bit unique in its behaviour (like the N900).

Quote:

Originally Posted by theyosh (Post 1330593)
There is also an Easy Debian package that starts a Debian OS using chroot (http://talk.maemo.org/showthread.php?t=85878)

Would it not be cool to have that as a fourth OS?

Exactly why I set up my mmcblk with more (even more ;) partitions! Did not yet have time to play with...

explit 2013-03-22 06:57

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

Originally Posted by juiceme (Post 1330448)
The scripts to do it are already in the menu script.
Just install your android on /home/ as usual, install Nemo on mmcblkp04 as usual and you are done :D

Is that also possible, if i have a bigger Swap on mtd-4 ?

THX

coderus 2013-03-22 07:34

Re: Introducing ubiboot N9 (multiboot OS loader)
 
@explit mmcblk0p4 not equal mtd4 ;)

juiceme 2013-03-22 08:35

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

Originally Posted by TMavica (Post 1330526)
@juiceme

Finally I can boot to Harmattan by using default preinit file, but there is some problem I found.
1. l2fix kernel, when bootup, it said "recharge battery", then it reboot self
2. Nitdroid zImage, sometimes can boot , sometimes cant...
3. zImage-2.6.32.54-dfl61-20121301, it said "recharge battery", or sometimes cant boot...

The path shouldnt wrong, because android can bootup everytime, then kernel is same directory with Harmattan /boot/, I GUESS something in Harmattan, maybe some tunning or mod, make my Harmattan cant bootup. I dont want to reflash to try:D

This "recharge battery problem" seems to affect some users, I wonder if the N9's are so individual really??

The problem propably is that when the kexec() to the 2nd stage kernel is done the BME is left in some uninitialized state. This again could confuse the charging logic of Harmattan which performs an emergency shutdown...
It seems to require some debugging to find out why this affects only some devices.

Could it have something to do with N9 HW revision?
For example, my device is 64G rev.1501

juiceme 2013-03-22 08:36

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

Originally Posted by explit (Post 1330671)
Is that also possible, if i have a bigger Swap on mtd-4 ?
THX

If your swap is on mtd4, just use the ubiboot version that installs on mtd5.

TMavica 2013-03-22 09:11

Mine is 16GB rev 1603 using europe firmware 001

peterleinchen 2013-03-22 09:11

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

Originally Posted by juiceme (Post 1330687)
Could it have something to do with N9 HW revision?
For example, my device is 64G rev.1501

So let us collect the infos:
mine is a 64GB rev. 1601 with (almost) zero problems.
Swiss firmware, highest PR of all :( or :)
Sometimes I do need a few boots, until Harmattan comes up. Maybe due to this bug, also? But I have never seen such message. I guess on wrong bootreason passed to second kernel?

TMavica 2013-03-22 09:29

How chk rev version?

thedead1440 2013-03-22 09:32

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

~# cat /proc/cpuinfo | grep Revision
Revision        : 1501

No issues other than the first time booting into all OSes which has to be done via telnet. Subsequent attempts pass without any issues.

Using mtd4 swap and mtd5 ubiboot...

Black 64GB...

peterleinchen 2013-03-22 09:44

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

Originally Posted by thedead1440 (Post 1330705)
Black 64GB...

Oh :o Did not know that color is also important. Mine is black, too ;)

Quote:

Originally Posted by thedead1440 (Post 1330705)
Using mtd4 swap and mtd5 ubiboot...

A real question: juiceme always warned against wear of flash device, and not using mtd4/5 "too extensively". But this mtd4 swap tweak is a flash killer tweak. So how does this match?
And btw I do not see the need/gain for more swap.

thedead1440 2013-03-22 10:08

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

Originally Posted by peterleinchen (Post 1330711)
A real question: juiceme always warned against wear of flash device, and not using mtd4/5 "too extensively". But this mtd4 swap tweak is a flash killer tweak. So how does this match?
And btw I do not see the need/gain for more swap.

I think you are aware right that of the 1GB RAM on-device, only 768MB is allocated as RAM and the rest is allocated as swap.

Mtd4 allows the full 1GB to be allocated as RAM with ~420MB for swap. Even if you don't feel you need more swap I'm sure you would prefer more RAM right? In that case of course you can disable the creation of swap on ramzswap :p However I prefer having the full gig for RAM and swap active too hence I personally prefer the mtd4 approach for swap ;)

As for being a flash-killer well its been proven that both the mtd4 and mtd5 are unreliable partitions and are faulty on many devices hence why they have been left unused so if they currently work might as well use them for something meaningful and frankly i don't think they would wear off that quick (maybe a year or two?) :D

theyosh 2013-03-22 21:39

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Black 16G rev 1603 (Poland version... used in Holland ;) )
'act dead' issue with the l2 cache fix kernel.

explit 2013-03-23 20:30

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

Originally Posted by coderus (Post 1330675)
@explit mmcblk0p4 not equal mtd4 ;)

Thanks, CodeRUS, now, I understand...

juiceme 2013-03-23 20:34

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

Originally Posted by theyosh (Post 1330941)
Black 16G rev 1603 (Poland version... used in Holland ;) )
'act dead' issue with the l2 cache fix kernel.

There seems to be a pattern emerging but I think I need still more data to say anything for sure.

Now there are at least 2 people with 16G/rev.1603 devices that will complain about charging when booting to Harmattan.

juiceme 2013-03-23 22:29

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Created channel #ubiboot for support & info.

jmsarriat 2013-03-24 14:43

Help with Step 4.
 
Hi,

I followed the step by step directions on the README file and everything has worked as it should. But i have a question regarding the step 4. My N9 has Nitdroid installed as described in their own tutorial, it works without a problem, so i assume i have a plain open mode and everything else is stock/default. I didn't quite understand what should be configured in the boot.conf file, where should i copy new modules nor what "depmod -a <name>" would do. My question is, given my actual configuration should i modify this file in any way? or can i just leave the default values and go on?

Thanks for your help,

Me

coderus 2013-03-24 14:59

Re: Introducing ubiboot N9 (multiboot OS loader)
 
@jmsarriat just stay with nitdroid sillyboot, it works good. and ubiboot dont't give anything useful for you :)

jmsarriat 2013-03-24 16:38

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

Originally Posted by coderus (Post 1331371)
@jmsarriat just stay with nitdroid sillyboot, it works good. and ubiboot dont't give anything useful for you :)

Sensible advice, i'll keep sillyboot then. However, i guess i should clear the partition where ubiboot is now copied. How do i do that? it is not included in the uninstallation procedure.

peterleinchen 2013-03-24 17:58

Re: Introducing ubiboot N9 (multiboot OS loader)
 
It is!
Just look for ubimkvol. This will clear your mtd4, but it is not needed at all (you could also go for ubirmvol, but this is not tested/advised).

coderus 2013-03-24 18:12

Re: Introducing ubiboot N9 (multiboot OS loader)
 
@jmsarriat mtd partitions unused by system and you can not care about them :)

lpt2007 2013-03-24 20:53

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Can someone give me more detailed instruction about this part?

Where can I download kernel & os files for Nitdroid,Harmattan,Nemo and where I must put them if I use default boot.conf.

thx in advance



Quote:

4.) Next, you must configure your 2nd level boot kernels, or at leat one OS and kernel.
If you do not do this correctly you will be stuck on the boot selector with nothing
to boot up to.

Bootable OS & kernel configuration is done in the file "/etc/boot.conf" on the ubifs.
There are 6 entries for Nitdroid, 6 entries for Harmattan and 6 entries for Nemo.
You do not need to fill up everything, of course. Just the bits you have on your N9.

The "G_<os>_<n>_LABEL" identifier is the line shown on the menu.
The corresponding "G_<os>_<n>_FILE" is the path to the bootable kernel.
Note the "G_<os>_NUM" variable, this tells the menu how many lines to show, starting
from the line 1.
The filesystem is pre-set to that "/boot/Harmattan" is a link to "/mnt/2" which is
mounted as /dev/mmcblk0p2 and "/boot/Nemo" is a link to "/mnt/4" which is mounted
as /dev/mmcblk0p4.

If, for example your Nemo partition is something else than 4, then you need to update
symlinks in /boot/ to point to correct loactions and make sure that you mount the
partitions before kernel selection is done (kexec_load needs to see the kernels...)

In my own setup Harmattan and Nemo kernels are stored in "/boot/Harmattan/boot/"
and Nemo kernels in "/boot/Nemo/boot/"

You need to copy your kernels to the correct location!

The modules for the kernels are located in each OS's hierarchy, normally in the
"/lib/modules" directory.
Do not forget to have the correct modules there, and remember to do "depmod -a <name>"
if you are copying new modules to the directory!

juiceme 2013-03-25 06:23

Re: Help with Step 4.
 
Quote:

Originally Posted by jmsarriat (Post 1331360)
Hi,

I followed the step by step directions on the README file and everything has worked as it should. But i have a question regarding the step 4. My N9 has Nitdroid installed as described in their own tutorial, it works without a problem, so i assume i have a plain open mode and everything else is stock/default. I didn't quite understand what should be configured in the boot.conf file, where should i copy new modules nor what "depmod -a <name>" would do. My question is, given my actual configuration should i modify this file in any way? or can i just leave the default values and go on?

Thanks for your help,

Me

Hi!

Configuring how your kernels appear in the menu is done in the boot.conf file. The defaults in there are how my own system appeared at that moment, but something like this is very basic configuration:

Code:

# Nitdroid kernels
G_NITDROID_NUM=1
G_NITDROID_1_LABEL="Eyes zImage.pr13 kernel"
G_NITDROID_1_FILE="/boot/Harmattan/boot/zImage.pr13"

# Harmattan kernels
G_HARMATTAN_NUM=3
G_HARMATTAN_1_LABEL="Plain openmode kernel"
G_HARMATTAN_1_FILE="/boot/Harmattan/boot/zImage-2.6.32.54-dfl61-20121301"
G_HARMATTAN_2_LABEL="Openmode + L2fix"
G_HARMATTAN_2_FILE="/boot/Harmattan/boot/zImage_2.6.32.54-openmode_l2fix"
G_HARMATTAN_3_LABEL="Nitdroid pr13 kernel"
G_HARMATTAN_3_FILE="/boot/Harmattan/boot/zImage.pr13"

With this you have just the one kernel for Nitdroid, and three alternate kernels you can use for Harmattan: plain open mode, l2-fixed and Nitdroid-pr13.

Now, in addition to setting up your boot.conf, you need to put these kernels somewhere. A good place (and this is what is shown in the boot.conf file) is to put the kernels in the "/boot" directory on your Harmattan rootfs (mmcblk0p2).
So just copy the kernel files there.

That part about the modules and depmod is only useful to you when you want to compile and test your own kernels (which might have modules that have different dependencies & naming conventions than the default set of modules)

If you are just using the vanilla kernel, vanilla open mode, l2-fixed openmode or Nitdroid-pr13 kernels, then you do not have to do anything to your modules as all of those use the already installed /lib/modules/2.6.32.54-dfl61-20121301 path.

And, like Coderus says, unless you have more OS'es than just Harmattan and Nitdroid, this might not really give you any extra advances, except perhaps the integrated repair mode which I find quite useful myself.

juiceme 2013-03-25 06:28

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

Originally Posted by lpt2007 (Post 1331451)
Can someone give me more detailed instruction about this part?

Where can I download kernel & os files for Nitdroid,Harmattan,Nemo and where I must put them if I use default boot.conf.

thx in advance

The Nitdroid kernel you can download from E-yes's repositories, same place where you downloaded your android FS tarfile.

For the vanilla open mode kernel, you can look at this thread for information: http://talk.maemo.org/showthread.php?t=81579

The l2-fixed kernel you can get from the ubiboot home page http://www.swagman.org/juice/ubiboot/

See my previous posting for the items in boot.conf...

TMavica 2013-03-25 06:44

Seem there only problem with hw1603 16GB

juiceme 2013-03-25 10:11

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

Originally Posted by TMavica (Post 1331526)
Seem there only problem with hw1603 16GB

Currently, that is true.
I would need to see what happens in the boot phase of rev.1603 devices that's different from the other revisions to fix it :(

juiceme 2013-03-25 10:17

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

Originally Posted by coderus (Post 1331420)
@jmsarriat mtd partitions unused by system and you can not care about them :)

That's true. If you have an non-ubiboot aware kernel flashed to your device, it acts like there is no ubi partitions whatsoever.

In fact I find it useful to have it there even if you do not use it for boot selection; the repair mode can be then activated by just booting an ubiboot-aware kernel with the "-l -b" options without flashing anything... :D

TMavica 2013-03-25 11:06

I have 2 of my friends in 16GB 1603, same situation, cant boot harmattan, recharge battery something like that

juiceme 2013-03-26 10:15

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

Originally Posted by peterleinchen (Post 1328949)
Hey juiceme,
OK, got a dead battery. And put it to charger. Checked again and now return value is "0", so everything okay!
This time bootreason=usb. When I got the 255 the bootreason was sw_rst. Maybe this caused the 255? IDK.
- I still have sometimes weird restart behavior, i.e. after decoupling battery (nemo did not start) it needed a few attempts. It seems bootreason=pwr_off? Maybe change the bootreason in command_line also?
- Charging does not take place when connected charger to powered off phone. it goes to ubi console and does not charge.
Maybe wait for 60s and when there was no telnet connection established (do not know how to detect) then boot to Harmattan (bootreason=act_dead) and let it charge?

OK, finally had time to tweak init a bit, checking the powerup reason. I added the following check before the check for existing USB connection:

Code:

# if boot reason is USB or RTC, boot up directly to default Harmattan
bootreason=$(cat /proc/original_cmdline | cut -d' ' -f12 |  cut -d'=' -f2)
if [ "$bootreason" != "pwr_key" ]; then
  if [ -r /boot/menu/select_default_os.sh ]; then
    mount /mnt/2
    /boot/menu/select_default_os.sh
    if [ $? -eq 0 ]; then
      /usr/bin/disable_pm
      # restart to the default Harmattan OS
      kexec -e ; echo $? ; sleep 10
    fi
  fi
fi

Also added a short script "/boot/menu/select_default_os.sh" which basically does the same thing as "/boot/menu/select_os_animated.sh" when booting to default Harmattan OS & kernel.

Now, what this is supposed to do; When the boot reason is not "pwr_key", meaning the device has woken up either from pugging in USB or RTC event (alarm clock triggering) then instead of normal menu the device should boot to Harmattan directly.

For RTC events this works as it should; device boots up to the alarm handling state and then powers off, just as it would do without ubiboot installed.

Unfortunately it still does not do that when USB is plugged in, at least with computer connected USB (did not try it yet with just dummy charger), instead it tries to boot into Harmattan but goes to boot loop instead.

explit 2013-03-26 21:55

Re: Introducing ubiboot N9 (multiboot OS loader)
 
Hello guys...
My Ubiboot is working ok.
Harmattan booting with OpenMode / Open Mode L2fix / Nitdroid PR13 kernels
NITDorid booting with PR13 / PR13 USB fixed Kernel

What about Nemo?
Maybe someone can give me a short advice how i should install Nemo on /dev/mmcbll0p4 ?

fdisk -l /mmcblk0 show me:

/home/user # fdisk -l /dev/mmcblk0

Disk /dev/mmcblk0: 64.1 GB, 64130908160 bytes
4 heads, 16 sectors/track, 1957120 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 17 1760512 56335872 c Win95 FAT32 (LBA)
/dev/mmcblk0p2 1760513 1891584 4194304 83 Linux
/dev/mmcblk0p3 1891585 1957120 2097152 83 Linux

So i think i must create /dev/mmcblk0p4 ?

Can anybody assist me?
In the Nemo installation manual this part isn't well discribed IMHO....

THX


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

vBulletin® Version 3.8.8