[Multiboot] [Update 1/7/11] Create, manage and boot your ROM options via CWM!

Search This thread

nobodyAtall

Recognized Developer
Jan 16, 2008
1,552
19,547
Introduction

This thread describes an experimental mod that allows you to boot into other boot images stored in your sdcard.
The N1 does not have enough internal memory to store more than one android image, thus we have to use the sdcard for this.


NOTE:

This mod is experimental, and for advanced users only



Requirements (READ THEM CAREFULLY):

- A rooted and unlocked phone
- A FAST enough sdcard. This mod will work with any sdcard but I'd suggest at least a Class 4 card for performance reasons
- Your sdcard should have enough free space. Each 'boot option' that you create reserves 400MB of space in your sdcard
- In order to create a new boot option, you need a flashable zip over CWM of the ROM you wish to boot to. The flashable zip of the ROM is the same that is used for usual ROM installation. Also the zip should be using the latest update-binary format as is scripted in updater-script (e.g. the mount command takes 4 args, etc.)


Advanced Information regarding the process

- The mod requires a boot.img that is flashed by the zip. This is used for extracting the ramdisk, commenting out the mount mtd commands and using this ramdisk for chrooting into the ROM environment
- If no boot.img is existing, the ramdisk is picked up from /sdcard/ramdisk/
- The kernel used for booting all boot options is the one installed in the phone's boot mtd. This means that you need the respective kernel modules (e.g. WiFi) for this kernel, not the one that is bundled in the ROM that is multibooted. For example, if your main ROM is CM, pick the kernel modules from this one and push them to the multibooted ROM's /system/lib/modules/


Multiboot mod Installation

Download: N1_CWM-4.0.0.5-nobodyAtall-r2.img

Install via fastboot
Code:
Copy N1_CWM-4.0.0.5-nobodyAtall-r1.img to a location where fastboot can find it.
Boot your phone into fastboot mode (power on while holding the trackball)
Connect your phone via usb
fastboot devices (to make sure that fastboot "sees" your phone)
fastboot flash N1_CWM-4.0.0.5-nobodyAtall-r1.img
Install via adb
Code:
adb push N1_CWM-4.0.0.5-nobodyAtall-r1.img /sdcard/ 
adb shell 'flash_image recovery /sdcard/N1_CWM-4.0.0.5-nobodyAtall-r1.img'
adb reboot recovery


Multiboot ROM Installation

- Boot into the recovery and navigate to the new 'multiboot' menu. There you'll see the following options:
  • Boot into selected option!
  • Select default boot option
  • Unset default boot option
  • Create boot option from zip
  • Delete existing boot option
  • Flash zip to boot option

- Select multiboot->Create boot option from zip and then pick the flashable ROM zip. Be patient, this step reserves the space and flashes the selected zip to the system.img in the sdcard
- If you need to flash additional zips for this ROM, Select multiboot->Flash zip to boot option, pick your newly created boot option and then pick the zip you need to flash.
- Select multiboot->Select default boot option and pick your newly created boot option
- Select multiboot-> Boot into selected option! (first boot will take some time depending on your sdcard speed).
To verify you have booted to your newly created boot option, check 'adb shell mount', it should say that /system /data and /cache is mounted from /loop* devices and not from mtd*

attachment.php
attachment.php



ROMS verified to multiboot

Well, any ROM should be able to multiboot provided the requirements stated above are covered. The following ones have been verified to work:

[ROM] CyanogenMod-7.1 for Nexus One

[ROM] NEXUS N1 Passion MIUI.us Presents MIUI Pure English [AOSP]

CM 7 ExtremeMod ROM by Ken Mood


Uninstall

- Normal reboots will boot from the phone's mtd partitions.
- This mod makes no changes to your phone's mtd partitions. Flashing a new recovery will uninstall the old one obviously.
- To remove installed boot options, navigate to multiboot->Delete existing boot option and pick you choice. Alternatively remove the boot option you want from /sdcard/clockworkmod/multiboot/


Disclaimer:
I can't be held responsible if this mod bricks your device / trashes your sdcard or makes it explode in your hands! Use it at your own risk!
 

Attachments

  • device1.jpg
    device1.jpg
    19.5 KB · Views: 9,702
  • device2.jpg
    device2.jpg
    17.8 KB · Views: 10,394
Last edited:

nobodyAtall

Recognized Developer
Jan 16, 2008
1,552
19,547
Changelog:

(1/7/11) N1_CWM-4.0.0.5-nobodyAtall-r2.img
Fixed bug that flashed the multiboot ROM kernel in the phones kernel partition
Improved error reporting

(30/6/11) N1_CWM-4.0.0.5-nobodyAtall-r1.img
First version of CWM recovery providing the multiboot options
 
Last edited:

shorza

Senior Member
Feb 21, 2010
170
16
Melbourne
I am interested in this, i'm surprised that it hasn't created more of a stir.
I have installed the recovery, but don't want to do anything else without Nandroiding first. Only Nandroid seems to get stuck on "Backing up system..."

Any i doing something wrong?
 

nobodyAtall

Recognized Developer
Jan 16, 2008
1,552
19,547
Hello shorza,

To be honest, I've only been testing the multiboot part.
However, I think that backup works fine here:

attachment.php


Also the backup folder is created correctly:

~ # ls -la /sdcard/clockworkmod/backup/2011-07-01.06.49.58
drwxrwxrwx 2 root root 4096 Jul 1 06:52 .
drwxrwxrwx 5 root root 4096 Jul 1 06:49 ..
-rwxrwxrwx 1 root root 93489792 Jul 1 06:52 .android_secure.img
-rwxrwxrwx 1 root root 3670016 Jul 1 06:50 boot.img
-rwxrwxrwx 1 root root 37359168 Jul 1 06:52 cache.img
-rwxrwxrwx 1 root root 184136832 Jul 1 06:51 data.img
-rwxrwxrwx 1 root root 222 Jul 1 06:53 nandroid.md5
-rwxrwxrwx 1 root root 4194304 Jul 1 06:50 recovery.img
-rwxrwxrwx 1 root root 146908608 Jul 1 06:50 system.img

On another note, I'll be doing an update today to fix some bugs related to multiboot.
 

Attachments

  • device.jpg
    device.jpg
    30.1 KB · Views: 7,959

jbbandos

Senior Member
May 26, 2010
1,365
321
Brussels
CWM 4.x has problems backing sd-ext, so that might be the reason why you don't see it (your pic shows you don't have an sd-ext partition to backup) and shorza does. It is also the reason why I haven't tried this yet - if it was based on AmonRa's I'd have jumped immediately, but since it is based on CWM I wanted first to see some feedback here... :)
 

shorza

Senior Member
Feb 21, 2010
170
16
Melbourne
Thanks for the help. Backup eventually worked, it just took a long time.
The problem is after zipping a new rom in multiboot, selecting it, then trying to boot into it, it took too long and I lost patience. It looked like it froze.
I'll try again tomorrow.
 

nobodyAtall

Recognized Developer
Jan 16, 2008
1,552
19,547
Posted -r2.

This fixes a bug that would flash the multiboot ROM's kernel to the phone's kernel partition. Also improves logging in case of errors.
 

Ellises

Senior Member
Sep 19, 2008
228
42
twitter.com
Testing this out right now ... just got latest cyanogenmod nightly and latest miui (as of today) going on it and just switched back and forth. sucks about having to go into recovery to switch, needs to have a boot option when starting the phone haha.
 
  • Like
Reactions: nekobus

Ellises

Senior Member
Sep 19, 2008
228
42
twitter.com
So wifi doesn't work in the latest version of miui.us when using it as a multiboot option. such says in logcat "Failed to load Wi-Fi driver." it works when the rom is installed as normally so it must be the kernel from this application. but wifi on cyanogenmod works so that is good.
 

Bxrxyxaxn

Senior Member
Apr 1, 2010
108
11
Will this work like a nandroid backup where it saves everythn from my last boot? Or will it save everythn on that same img. when i switch roms
 

Ellises

Senior Member
Sep 19, 2008
228
42
twitter.com
looking at the directory structure, per multiboot rom it saves the boot.img, cache.img, data.img, and system.img .... I don't know how it uses them, but linux is magical in mounting images as a partition, doesn't have to be physical
 

nobodyAtall

Recognized Developer
Jan 16, 2008
1,552
19,547
This is because the ROM is run using the device's kernel and not the one that comes with the ROM as stated in the first post.
To make wifi work, simply copy your wifi kernel module from /system/lib/modules to this same did within the multibooted ROM.
So wifi doesn't work in the latest version of miui.us when using it as a multiboot option. such says in logcat "Failed to load Wi-Fi driver." it works when the rom is installed as normally so it must be the kernel from this application. but wifi on cyanogenmod works so that is good.



Sent from my Nexus One using XDA App
 

jojooj

Member
Feb 24, 2010
26
1
Gwang ju
[Q]Bug fixed??

I succeed multibooting
I got miui(main)&CM7(sub)
but subrom,cm7 can't use wifi
so I changed kernel but failed
and display
[mount expects 4 3args]
[error /sdcard/xxx... ]
[ status7 ]<<maybe


If you know what's the problem, plz teach me the way

thx and pardon my English
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Introduction

    This thread describes an experimental mod that allows you to boot into other boot images stored in your sdcard.
    The N1 does not have enough internal memory to store more than one android image, thus we have to use the sdcard for this.


    NOTE:

    This mod is experimental, and for advanced users only



    Requirements (READ THEM CAREFULLY):

    - A rooted and unlocked phone
    - A FAST enough sdcard. This mod will work with any sdcard but I'd suggest at least a Class 4 card for performance reasons
    - Your sdcard should have enough free space. Each 'boot option' that you create reserves 400MB of space in your sdcard
    - In order to create a new boot option, you need a flashable zip over CWM of the ROM you wish to boot to. The flashable zip of the ROM is the same that is used for usual ROM installation. Also the zip should be using the latest update-binary format as is scripted in updater-script (e.g. the mount command takes 4 args, etc.)


    Advanced Information regarding the process

    - The mod requires a boot.img that is flashed by the zip. This is used for extracting the ramdisk, commenting out the mount mtd commands and using this ramdisk for chrooting into the ROM environment
    - If no boot.img is existing, the ramdisk is picked up from /sdcard/ramdisk/
    - The kernel used for booting all boot options is the one installed in the phone's boot mtd. This means that you need the respective kernel modules (e.g. WiFi) for this kernel, not the one that is bundled in the ROM that is multibooted. For example, if your main ROM is CM, pick the kernel modules from this one and push them to the multibooted ROM's /system/lib/modules/


    Multiboot mod Installation

    Download: N1_CWM-4.0.0.5-nobodyAtall-r2.img

    Install via fastboot
    Code:
    Copy N1_CWM-4.0.0.5-nobodyAtall-r1.img to a location where fastboot can find it.
    Boot your phone into fastboot mode (power on while holding the trackball)
    Connect your phone via usb
    fastboot devices (to make sure that fastboot "sees" your phone)
    fastboot flash N1_CWM-4.0.0.5-nobodyAtall-r1.img
    Install via adb
    Code:
    adb push N1_CWM-4.0.0.5-nobodyAtall-r1.img /sdcard/ 
    adb shell 'flash_image recovery /sdcard/N1_CWM-4.0.0.5-nobodyAtall-r1.img'
    adb reboot recovery


    Multiboot ROM Installation

    - Boot into the recovery and navigate to the new 'multiboot' menu. There you'll see the following options:
    • Boot into selected option!
    • Select default boot option
    • Unset default boot option
    • Create boot option from zip
    • Delete existing boot option
    • Flash zip to boot option

    - Select multiboot->Create boot option from zip and then pick the flashable ROM zip. Be patient, this step reserves the space and flashes the selected zip to the system.img in the sdcard
    - If you need to flash additional zips for this ROM, Select multiboot->Flash zip to boot option, pick your newly created boot option and then pick the zip you need to flash.
    - Select multiboot->Select default boot option and pick your newly created boot option
    - Select multiboot-> Boot into selected option! (first boot will take some time depending on your sdcard speed).
    To verify you have booted to your newly created boot option, check 'adb shell mount', it should say that /system /data and /cache is mounted from /loop* devices and not from mtd*

    attachment.php
    attachment.php



    ROMS verified to multiboot

    Well, any ROM should be able to multiboot provided the requirements stated above are covered. The following ones have been verified to work:

    [ROM] CyanogenMod-7.1 for Nexus One

    [ROM] NEXUS N1 Passion MIUI.us Presents MIUI Pure English [AOSP]

    CM 7 ExtremeMod ROM by Ken Mood


    Uninstall

    - Normal reboots will boot from the phone's mtd partitions.
    - This mod makes no changes to your phone's mtd partitions. Flashing a new recovery will uninstall the old one obviously.
    - To remove installed boot options, navigate to multiboot->Delete existing boot option and pick you choice. Alternatively remove the boot option you want from /sdcard/clockworkmod/multiboot/


    Disclaimer:
    I can't be held responsible if this mod bricks your device / trashes your sdcard or makes it explode in your hands! Use it at your own risk!
    3
    Changelog:

    (1/7/11) N1_CWM-4.0.0.5-nobodyAtall-r2.img
    Fixed bug that flashed the multiboot ROM kernel in the phones kernel partition
    Improved error reporting

    (30/6/11) N1_CWM-4.0.0.5-nobodyAtall-r1.img
    First version of CWM recovery providing the multiboot options
    1
    Testing this out right now ... just got latest cyanogenmod nightly and latest miui (as of today) going on it and just switched back and forth. sucks about having to go into recovery to switch, needs to have a boot option when starting the phone haha.
    1
    Amazing mod man !!!
    I've installed in multiboot miui 1.7.1, Xtreme mod (cg7 based) and cgm 6.1.1, all works like a charm but wifi !

    Any idea for rename multiboot entries? I've tried rename the folder but don't work, it don't recognize the boot entry if I rename the folder :(
    What can I do for?
    For the wifi, the solution is stated in the first post.

    Regarding the multiboot entries, you can navigate to /sdcard/clockworkmod/multiboot/ and rename the folders inside there to whatever you want. After that, you'll need to reset the default multiboot option via the CWM multiboot menu.
    1
    Oh thanks!!! Now works!
    For thw wifi, I had not the default cg7 kernel, that was the problem!:(

    Thanks again :)