• Announcements

    • Reminder - MoDaCo position on illegal content   07/30/15

      ILLEGAL CONTENT I'd like to just reaffirm MoDaCo's position regarding piracy and illegal content in the light of some recent questions / postings. Posts will be censored by myself or my moderation team if the contain or link to: Illegal / pirated / cracked software or sites that host such softwareNintendo emulators / ROMs or sites hosting them (in light of Nintendo's legal stance)CUSTOM ROMS You may discuss and post links to custom device ROMs on MoDaCo, provided the following rules are adhered to: ROMs must not contain any illegal 3rd party software (this includes trial versions included without permission)ROMs must give full credit to the original authorISSUES If you have any issues with this policy, please contact PaulOBrien directly via PM.
    • Reminder: Selling items on the forum directly is not allowed   07/30/15

      Please note that selling items on the forum directly is not allowed by the forum rules. There is a forum for eBay auctions whereby you can list the items on eBay and link to them there. This is the ONLY forum for this type of activity. You may also advertise links to the eBay forum in your signature. Please note that selling directly in contravention of these rules will result in a warning / suspension / ban.

[idea] two ROMs on one device (aka dualboot)

76 posts in this topic

Posted

So I've had this idea in my head for a few days: we could have one ROM on the /system partition and the other on the /recovery partition.

AFAIK we can change partition layouts via TPT with no problems at all, and AFAIR there was an old way of TPTing and flashing a ROM in which the recovery was flashed to the /system partition, the phone booted to it and from the recovery you were supposed to install another (same) recovery to the /recovery partition and from there (after rebooting) we had to flash the ROM; and so I assume we can also flash a ROM into the /recovery partition and it should boot just fine.

Two ROMs would require twice the space so it would be necessary to use sd-ext partition for /data (but we have already got working solutions like Apps2SD, Link2SD and others so it shouldn't be a problem).

The last problem would be an actual recovery - it just wouldn't be anywhere. So I thought of a few solutions:

1. Flash it onto the /oem or any other partition and find a way to boot it (eg. from the system with an app with root).

2. Integrate it with the ROM; if recoveries are open source it should be easy to do (and I believe they are, but I couldn't find recent source for CWM though)

3. Don't bother with it. ROMs can be swaped with TPT, and if someone would need a recovery they would need to flash it back to it's partition.

Do you think it's possible? If it was, it would be great! Being able to run ICS/JB on the /system and switching to GB [CM7] that is installed on /recovery (or any other ROMs) would be awesome.

1

Share this post


Link to post
Share on other sites

Posted

It would be easier to flash the second ROM to the sd ext. The problem is that there arent developers that would work on it because of the amount of work it would require. Ive seen it done to other devices but those have a larger developer community than blade. Even nexus s doesnt have that because of the amount of work required and it is a Google phone

1

Share this post


Link to post
Share on other sites

Posted

I've been aware that other devices do it with the second ROM on the sd ext, like with this app (Boot Manager), but I guess that NAND is faster and more wear-proof than an sd card.

And an another point is that we can boot into the /recovery partition easily, using a combination of buttons - whilst to boot to the sd-ext it requires work and knowledge. So although my idea seems to be more complicated I guess it could be easier to implement.

1

Share this post


Link to post
Share on other sites

Posted

I've been aware that other devices do it with the second ROM on the sd ext, like with this app (Boot Manager), but I guess that NAND is faster and more wear-proof than an sd card.

And an another point is that we can boot into the /recovery partition easily, using a combination of buttons - whilst to boot to the sd-ext it requires work and knowledge. So although my idea seems to be more complicated I guess it could be easier to implement.

The recovery partition is awfully small, it houses the recovery which is 3-4MB in size, you could fit the kernel in there but not much else.

The bootmanager you linked doesn't install to SD-ext partitions, it installs to loop filesystems on the SD cards Fat32 partition, kinda like how Ubuntu installs into a file when installing it via WUBI.

Installs to SD-ext partitions would be a lot faster but also more work, it's perfectly doable though, all you need is a way to install them where you want them and a bootloader to choose between them (such as grub).

1

Share this post


Link to post
Share on other sites

Posted

The recovery partition is awfully small, it houses the recovery which is 3-4MB in size, you could fit the kernel in there but not much else.

But you can resize it via TPT to any size you want, can't you? You would need to use the space that is taken by /data but you can move /data to /sd-ext ...

And writing a bootloader for our Blades (as in your idea) doesn't seem to be an easy task...

1

Share this post


Link to post
Share on other sites

Posted

The recovery partition is awfully small, it houses the recovery which is 3-4MB in size, you could fit the kernel in there but not much else.

The bootmanager you linked doesn't install to SD-ext partitions, it installs to loop filesystems on the SD cards Fat32 partition, kinda like how Ubuntu installs into a file when installing it via WUBI.

Installs to SD-ext partitions would be a lot faster but also more work, it's perfectly doable though, all you need is a way to install them where you want them and a bootloader to choose between them (such as grub).

I have already flashed boot.img to the recovery partition, and I can confirm that it can be booted up, although I wouldn't recommend using that, because on failure the recovery is probably the safest tool we have got.

Grub would be great to have, but as far as I know it requires either MBR or UEFI to be booted...

In my opinion the ideal solution would look to the user like 2ndInit on the Defy: during the boot, the green led lights up, and if the user presses a specific button, the secondary system would boot. It could be done with a specially crafted boot.img and kexec I think... But placing the second /system and /data on the sdcard could be problematic... The easiest solution would be an ext2 or yaffs2 partition on the card where both of them can be placed, but I'm not sure that a casual card can take that usage everyday for long... There would be a lot of unusable cards very soon.

Also on Milestone they never got RILs working with kexec... :(

0

Share this post


Link to post
Share on other sites

Posted

First of all we will have to compile a dual boot kernel which takes some weird reverse engineering.

0

Share this post


Link to post
Share on other sites

Posted (edited)

First of all we will have to compile a dual boot kernel which takes some weird reverse engineering.

Think that again... We need nothing to reverse engineer (If we had to, then we should reverse-engineer the armv7 ICS libstagefright instead, so we wouldn't need dualboot :)), just a script in initramfs which lights up the led, waits for a keycode for X seconds, if pressed then mounts the first partition of the sd for root and kexec-es a zImage on it, but if not it continues booting. Well, that's the theory... But we either need advanced users or we have to modify recovery to be able to 'flash' packages to that other partition, and... I have absolutely no experience with kexec, I just read about it, and thus it may not work in the way I think it works. :(

Edited by Sulthekk
0

Share this post


Link to post
Share on other sites

Posted

But you can resize it via TPT to any size you want, can't you? You would need to use the space that is taken by /data but you can move /data to /sd-ext ...

And writing a bootloader for our Blades (as in your idea) doesn't seem to be an easy task...

We have 512MB to work with so even if partition layout wasn't a deal breaker there simply isn't enough room, remember that you'd not only need 2 system partitions to house each rom, you'd need two data partitions to house all the apps and data too (If you want to dualboot ICS and GB). It's way easier to just use external memory where you can have up to 32GB per SD and as many SD's as you like.

0

Share this post


Link to post
Share on other sites

Posted

Think that again... We need nothing to reverse engineer (If we had to, then we should reverse-engineer the armv7 ICS libstagefright instead, so we wouldn't need dualboot :)), just a script in initramfs which lights up the led, waits for a keycode for X seconds, if pressed then mounts the first partition of the sd for root and kexec-es a zImage on it, but if not it continues booting. Well, that's the theory... But we either need advanced users or we have to modify recovery to be able to 'flash' packages to that other partition, and... I have absolutely no experience with kexec, I just read about it, and thus it may not work in the way I think it works. :(

Thanks for the knowledge.it means that the script needs to be edited for mounting different blocks at the boot.Thanks

0

Share this post


Link to post
Share on other sites

Posted

Thanks for the knowledge.it means that the script needs to be edited for mounting different blocks at the boot.Thanks

That's not that simple, ICS needs a hacked kernel which may not be compatible with the GB one, so we also need to place a zImage on the second partition, that way we can always load the one supplied with the rom. And until there is no util to install packages to that other partition, it needs the user some knowledge of the system...

If you want things to work well then you should first decide how do you want it to work, after that it can be implemented.

1

Share this post


Link to post
Share on other sites

Posted

Can you tell me where this initramfs is found in kernel source?

0

Share this post


Link to post
Share on other sites

Posted

Can you tell me where this initramfs is found in kernel source?

Well, on desktop PCs it's built for an already compiled kernel, I don't have the kernel source at hand but I would say it's the same on Android. I have no idea where is it, you may want to ask a kernel dev about it, but I know that one can extract a boot.img to edit it's initrd.

More info about the boot.img format can be found here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images

0

Share this post


Link to post
Share on other sites

Posted (edited)

Maybe i'm ignorant but... What's the interest ? Any Rom got the same apps (exept MIUI's and maybe some others...)

So why do you really want to overload your phone with a 2nd Rom ?

If it's for the challenge or anything else I can understand it but this kind of project will not be really usefull for the majority of users...

Is there someone who could explain me the advantages of dual boot on a phone ?

( I'm French so I count on you to excuse my bad (but not so terrible) English. :) )

Edited by breatherII
1

Share this post


Link to post
Share on other sites

Posted

The point is being able to have two ROMs at the same time, a stable one and a testing one; i.e. GB & ICS or CM7 & CM10, Swedish Snow & CM10 and so on. Some ROMs are believed to be better for gamers (eg. playing GTA3 is possible on most of our ROMs but it doesn't lag as much on some as on the others), other give you more customisation (CM), and some aren't stable enough or are missing some features you might consider as essential (personally I haven't installed any ICS ROM yet because I use YouTube a lot and no HQ is a deal breaker for me).

And it can be also an intresting project, not many devices can manage any kind of dualboot, and if it would be possible on our Blades - why not try it? :)

0

Share this post


Link to post
Share on other sites

Posted

Very nice idea :D ! I think that the bootloader (grub-like)and recovery could be the same and one .img file on the recovery partition. That means everytime you boot to recovery you should 1) choose witch rom to use 2) perform any tasks you perform in recovery, like flashing a new rom (it may be "a bit "different with two ROM's, huh?).

The problem is, what happens when not booting to recovery partition? Should the first ROM boot up or is it possible to always boot to recovery, even there still is something on the /system partition...

This feature would be great, because I had to switch back to GB because of some gps-problems on Tilals ColdFusion cm9 (ICS).

Of course, developing a recovery that is also a bootloader...propably VEERY hard thing. And maybe no developer thinks it's worth coding :P But I'm just thinking :)

0

Share this post


Link to post
Share on other sites

Posted

Ookay, there should be a decision made: How do we want it to work? It's pointless to work on different implementatitions at the same time.

0

Share this post


Link to post
Share on other sites

Posted

Yeah, but no-one is working with this, am I right? Now we are just thinking how would it be possible...I just said how I think it would work :D

So, as someone said, there aren't any developers to make multiboot for blade possible. So, if someone is interested, you are hired :)

BTW, is it possible to have more partitions or extended partitions? (I am not very familiar with blade's partitions or TPT-flashes, upgraded my blade with windows...)

0

Share this post


Link to post
Share on other sites

Posted

Yeah, but no-one is working with this, am I right? Now we are just thinking how would it be possible...I just said how I think it would work :D

So, as someone said, there aren't any developers to make multiboot for blade possible. So, if someone is interested, you are hired :)

BTW, is it possible to have more partitions or extended partitions? (I am not very familiar with blade's partitions or TPT-flashes, upgraded my blade with windows...)

With the two system partitions there would a be pointlessly small amount of space for even a single /data. At least one of the system should be on the sd-card. People are actually doing less IO on /system than on /data, aren't they?

0

Share this post


Link to post
Share on other sites

Posted

Yes, that's the problem of Blade... :(

Anyway, Blade has only 512 mb of storage (correct me if I'm wrong), so it is just enough for two roms (without any data). But that's not good if there is no space for data, at least other /system and/or /data must be on sdcard(Now I'm just repeating what Sulthekk said...). It may be bootable with bootloader?

So, do we have a opinion how should dualboot be done? Does someone know sombady who could start dualboot developing for Blade?

0

Share this post


Link to post
Share on other sites

Posted

Yeah, the only way for it to work is either having a second ROM or /data partition(s) on the SD card.

My opinion is to have the /data on the SD, because we already have some working solutions (link2sd and so on) and nobody really tried putting a blade rom on a SD; but it all depends on dev that would decide to try to do it.

0

Share this post


Link to post
Share on other sites

Posted

Yeah, the only way for it to work is either having a second ROM or /data partition(s) on the SD card.

My opinion is to have the /data on the SD, because we already have some working solutions (link2sd and so on) and nobody really tried putting a blade rom on a SD; but it all depends on dev that would decide to try to do it.

The internal should be left alone.

Use a file on external and mount it as a filesystem. This works and backups are as simple as copying a file.

The other alternative is to install it to separate partitions on the sd card, ext partitions. (Note that ext stands for the filesystem, not extended partition)

This gets rid of space limitations entiely.

0

Share this post


Link to post
Share on other sites

Posted (edited)

The internal should be left alone.

Use a file on external and mount it as a filesystem. This works and backups are as simple as copying a file.

The other alternative is to install it to separate partitions on the sd card, ext partitions. (Note that ext stands for the filesystem, not extended partition)

This gets rid of space limitations entiely.

Having the whole thing on SD would also make us to be able to boot more than two roms by either swapping the card or swapping files.

For me that looks like a good direction.

Edited by Sulthekk
0

Share this post


Link to post
Share on other sites

Posted

Having the whole thing on SD would also make us to be able to boot more than two roms by either swapping the card or swapping files.

For me that looks like a good direction.

I tried editing boot.img ram disk I think the initramfs files lies here.I put some some dual boot supported initramfs scripts but it didn't fit the boot partition.So we have to make small sized dual boot supported scripts.will try soon.

1

Share this post


Link to post
Share on other sites

Posted (edited)

I tried editing boot.img ram disk I think the initramfs files lies here.I put some some dual boot supported initramfs scripts but it didn't fit the boot partition.So we have to make small sized dual boot supported scripts.will try soon.

What did you exactly do?

Edited by Sulthekk
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

MoDaCo is part of the MoDaCo.network, © Paul O'Brien 2002-2015. MoDaCo uses IntelliTxt technology.