[Q] Multi-Booting

ofmb

Senior Member
Mar 3, 2011
561
169
0
Hi,

It just came into my mind. Since we can have custom recovery and android recovery also boots, can we have multi boot option in Defy as like in a PC's
some resources would have to be used by both ROMs..
with the current hacks it can't be done easily.
i guess some way of ramdisking the shared resources will have to be used.

basically, if you think about a hack for defy ask first:
can it be done in a completely open (=bootloader not locked) phone like nexus ?
if yes, ask:
is it WORKING?
if yes also, so maybe it can be done.

nevertheless, it's easy enough to create a script to backup & restore NANDROIDS.
but then every switch between roms will take like 25+ minutes, so it won't be a real multiboot.
 

K3n H1mur4

Senior Member
Apr 30, 2009
524
157
73
29
Fortaleza
Somebody at one point on the desire was working on something like this. Run rom from nand and other rom from sdcard.

Ephumuris.
I think there are two possibilities for this to happen: first of all, we should try NAND boot for the primary ROM, and try somehow to load the secondary ROM from the internal memory (it'll be faster than the SD Card, I think). The problem here would be allowing the bootloader to read from internal memory instead of NAND. I know this can be done based on the number of WinMo-Android and iOS-Android dual boot solutions, with a menu to choose which system to load, in the boot screen.
The second option is the method used by Wing Linux to run Android on old WinMo devices. In this method, you MUST boot in WinMo (or, in our case, in the primary ROM), then open the app that loads Android (the secondary ROM, for us). Android does NOT run emulated in this method, but, since the device can't dual boot directly, the app sends a signal for the device to restart running from the bootloader to the SD Card (for us, internal memory). This second option is, somehow, like the System Recovery app (not 2ndInit), that has an option that reboots directly into Recovery. So, if we can tell the phone to load from custom Recovery (which is, in fact, in internal memory, not in NAND), I think it's possible to make it load an entire ROM from the internal memory (without having to mount it everytime and waiting for the dalvik-cache to load).
However, it's surely a hard work to do.
 

m11kkaa

Recognized Developer / Inactive Recognized Contrib
Jan 20, 2011
1,259
2,145
0
it should really work if we use virtual images or sdcard-partitions instead of system, data and cache partitions.
This can be changed in the init.rc-file(of 2nd-init).
The creator of the 2nd-init-bootmenu should implement this feature.
 
Last edited:

m11kkaa

Recognized Developer / Inactive Recognized Contrib
Jan 20, 2011
1,259
2,145
0
I managed to boot from virtual system,data and cache partitions with the 2nd-boot-option of bootmenu like ep3 said.

It was a bit difficult because android-init remounts /dev so the changes will be lost but now I found a way.

And: I got recovery working for the virtual system so you don't need to prepare your images, BUT: only the wipe and restore are working. "install zip" will still affect your real system.

My scripts need some testing but after that I will release a first version.
 

m11kkaa

Recognized Developer / Inactive Recognized Contrib
Jan 20, 2011
1,259
2,145
0
So here is the first (very early) version of 2nd-boot:
http://www.multiupload.com/Z17M0WO3SU

Before continuing please make a backup of your phone!

Installation:
Just install it via CWM.
This will place the script in your 2nd-boot and replace the "CWM-Lastest"-script so it will install into the images. BUt can still use the "CWM-Stable" option for your normal system.

I've created 3 empty 300MB ext3-images for system,data and cache so you don't have todo that. Download them here:
http://www.multiupload.com/VY3U4IXRO1
Just copy the folder "fsimages" to your sdcard.


Usage:
After installing the update-zip and copying the files to the sdcard you can reboot into bootmenu, select "Lastest Recovery" and Restore an backup.
Please DO NOT install a ROM with a zip-file. Currently this will affect your real system.
After you restored your backup into the virtual file-system you can boot them with the 2nd-boot-option in bootmenu.


I successfully installed CM7.1 and MIUI-Pikachu-Edition in the virtual filesystem.
 
Last edited:

walter79

Recognized Developer
Dec 18, 2006
4,100
4,618
263
So here is the first (very early) version of 2nd-boot:
http://www.multiupload.com/Z17M0WO3SU

Before continuing please make a backup of your phone!

Installation:
Just install it via CWM.
This will place the script in your 2nd-boot and replace the "CWM-Lastest"-script so it will install into the images. BUt can still use the "CWM-Stable" option for your normal system.

I've created 3 empty 300MB ext3-images for system,data and cache so you don't have todo that. Download them here:
http://www.multiupload.com/VY3U4IXRO1
Just copy the folder "fsimages" to your sdcard.


Usage:
After installing the update-zip and copying the files to the sdcard you can reboot into bootmenu, select "Lastest Recovery" and Restore an backup.
Please DO NOT install a ROM with a zip-file. Currently this will affect your real system.
After you restored your backup into the virtual file-system you can boot them with the 2nd-boot-option in bootmenu.


I successfully installed CM7.1 and MIUI-Pikachu-Edition in the virtual filesystem.
Thanks for your work.

Did the 2nd android system boots from sdcard?
 

m11kkaa

Recognized Developer / Inactive Recognized Contrib
Jan 20, 2011
1,259
2,145
0
Yes, but it's very flexible. By changing 2 lines you can let it boot from whereever you want.
I prefer storing it at the data-partition because it's over 1gb in size and my apps are using 200mb only.

I'm looking forward to better bootmenu-integration and boot-image-selection but for that I have to figure out how to compile bootmenu.
 

walter79

Recognized Developer
Dec 18, 2006
4,100
4,618
263
Yes, but it's very flexible. By changing 2 lines you can let it boot from whereever you want.
I prefer storing it at the data-partition because it's over 1gb in size and my apps are using 200mb only.

I'm looking forward to better bootmenu-integration and boot-image-selection but for that I have to figure out how to compile bootmenu.
Ask pedrodh http://forum.xda-developers.com/member.php?u=2098689

He can help.
 

racca

Senior Member
Jun 4, 2009
247
85
0
Yes, but it's very flexible. By changing 2 lines you can let it boot from whereever you want.
I prefer storing it at the data-partition because it's over 1gb in size and my apps are using 200mb only.

I'm looking forward to better bootmenu-integration and boot-image-selection but for that I have to figure out how to compile bootmenu.
I released a dual boot version that uses 2nd-boot a few months back, hadn't have much time to improve it since.
I was using loop-back mount with /system and bind mount with /data since it's much more space efficient than just use an ext3 image.