Dual boot from SD and EMMC with Windows

Search This thread

hatefuel19

Senior Member
Sep 23, 2010
313
113
Lex
This is how I got dual booting from windows working and am now dual booting Nottachtrix4G from sdcard with stable

cam and WEBTOP along side AOKPCB

I was only able to achieve this after following sendust7 linux guide for dual boot and adapting to windows so all

credit goes to him.

Again these are the steps I took. If you try this and break something I'm not responsible.

Pre-requisites

Notepad++
Minitool partition wizard
Android SDK (google adb for dummies to get everything you need)
Cygwin (if you dont have it start install now and it might be done when its time to use it)
The rom zip you want on your sdcard and the rom zip you want on your phone
Moto-fastboot (search this forum)
Knowledge of ADB and fastboot
Fully Charged Battery



Backup everything from internal and external sdcard

Reboot to recovery

Flash the rom that you want on your sdcard to your phone like you would do normally.

Reboot phone and set it up if you like or just reboot back to recovery. If you set your rom up at this point, this

is how it will look on your sdcard at first boot.

Reboot back to recovery

adb shell

~ #mount /cache
~ #mount /system
~ #mount /data

~ #mount

Take note of system data and cache file systems (ext3 or ext4)


Power off phone and pull sdcard

Insert sdcard into computer and open minitool partition wizard.

Partition and format sdcard with same filesystem as noted before

These are the partition sizes I went with and only because i didnt feel like adjusting the slider anymore. But

These values did ensure they were big enough to hold the phone partitions. The first partition is whats left over

after resizing other partitions and will be formatted to fat32


system=384 MB <second partition on sdcard
cache=700 MB <third
data=2.6 GB <fourth


Insert sdcard and boot to recovery

adb shell

PATIENCE IS KEY FOR NEXT STEPS

~ # dd if=/dev/block/mmcblk0p12 of=/dev/block/mmcblk1p2 bs=1M
655360+0 records in
655360+0 records out
335544320 bytes (320.0MB) copied, 115.626214 seconds, 2.8MB/s

~ # dd if=dev/block/mmcblk0p15 of=/dev/block/mmcblk1p3 bs=1M
dd if=dev/block/mmcblk0p15 of=/dev/block/mmcblk1p3 bs=1M
640+0 records in
640+0 records out
671088640 bytes (640.0MB) copied, 206.557368 seconds, 3.1MB/s


~ # dd if=/dev/block/mmcblk0p16 of=/dev/block/mmcblk1p4 bs=1M
dd if=/dev/block/mmcblk0p16 of=/dev/block/mmcblk1p4 bs=1M
2048+0 records in
2048+0 records out
2147483648 bytes (2.0GB) copied, 658.327418 seconds, 3.1MB/s


Now get boot.img

While still in adb shell

~ #mount /dev/block/mmcblk0p18 /emmc

~ #cp /dev/block/mmcblk0p11 /emmc/boot.img

~ #exit

~ #adb pull /emmc/boot.img boot.img

Go here and follow this step by step and stop after you've got your boot image unpacked

http://xdaforums.com/show....php?t=1630130

If you have any problems with cpio run cygwin installer again and search for cpio and install

Once boot image is unpacked go to the out directory and find init.rc

Edit init.rc with notepad++ (NOT NOTEPAD) and change these lines

ONLY CHANGE THE /dev/bloc/mmcblk part. LEAVE EVERYTHING ELSE THE SAME


From

mount ext4 /dev/block/mmcblk0p12 /system noatime nodiratime wait ro barrier=1
mount ext4 /dev/block/mmcblk0p16 /data nosuid nodev noatime nodiratime wait barrier=1 noauto_da_alloc
mount ext4 /dev/block/mmcblk0p15 /cache nosuid nodev noatime nodiratime wait barrier=1 noauto_da_alloc

TO

mount ext4 /dev/block/mmcblk1p2 /system noatime nodiratime wait ro barrier=1
mount ext4 /dev/block/mmcblk1p4 /data nosuid nodev noatime nodiratime wait barrier=1 noauto_da_alloc
mount ext4 /dev/block/mmcblk1p3 /cache nosuid nodev noatime nodiratime wait barrier=1 noauto_da_alloc

Once you have made these changes you can finish the tutorial posted above or below for repacking and make sure to

click thanks. If the boot_new.img is a different size than original that's okay.

http://xdaforums.com/show....php?t=1630130

Move your boot_new.img to your moto-fastboot and reboot phone to fastboot.


moto-fastboot boot boot_new.img

If you're booted into your sdcard rom you're almost done.

Reboot to recovery and install any rom you want and boot to it.

Now create this directory on your internal sdcard

/sdcard/Boot/sdrom/

Copy your boot_new.img you used to boot your sd rom earlier to this directory and rename it to sdrom.img

Now create this directory on your internal sdcard

/sdcard/Boot/emmcrom/

Now open the rom zip you installed to your phone and copy the boot.img to this directory and rename it to

emmcrom.img

Use attached script with scriptmanager to commense dual booting. (Rename to modified-boot-rom.sh)

Run script as root with argument 1 to reboot to sdcard rom and argument 2 to reboot to phone rom. Argument 3 will

send you to recovery.

All done from windows even though it would be twice as easy and fast to do with linux but there ya go.


I take no credit as all I did was find the right resources and none of this would even be possible without

sendust7. If this helped you Please go to his guide and thank him TOO!!!!

http://xdaforums.com/show....php?t=1642185
 

Attachments

  • modified-boot-rom.sh.txt
    1,001 bytes · Views: 317
Last edited:

95rr900

Senior Member
Dec 19, 2008
265
65
Pennsylvania
I get everything up to get boot image. when I run that command, it runs for a few seconds then adb stops responding.

Any advice? I waited the one time for 15 minutes hoping it would respond...but it didn't.

thanks!

Sent from my MB860 using xda premium
 
  • Like
Reactions: hatefuel19

hatefuel19

Senior Member
Sep 23, 2010
313
113
Lex
I get everything up to get boot image. when I run that command, it runs for a few seconds then adb stops responding.

Any advice? I waited the one time for 15 minutes hoping it would respond...but it didn't.

thanks!

Sent from my MB860 using xda premium

What rom are you putting on sdcard

EDIT: look in your rom.zip.....boot img may be in there. If it is you can just use that

Edit: could try to make sure sdcard is mounted.......mount /sdcard



Sent from my MB860 using Tapatalk 2
 
Last edited:

95rr900

Senior Member
Dec 19, 2008
265
65
Pennsylvania
Im putting nottachtrix on sdcard.

Ok, so I can just copy the boot image from the rom zip and use that in cygwin...and go from there?

Now that I think about it, the sdcard was probably not mounted.

I'll give it another go in the morning. Thanks for the help!

Sent from my MB860 using xda premium
 

stokehall

Member
Sep 2, 2010
32
3
Install rom you want on your sdcard

Install rom you want on your sdcard

Reboot phone and set it up if you like or just reboot back to recovery. If you set your rom up at this point, this is how it will look on your sdcard at first boot.

What do you mean by install on sdcard and is that internal or external sd? And does Aroma make any difference

many thanks Simon

EDIT : Im an idiot it means install to the phone, the rom you want to have booting from sdcard.
 
Last edited:

95rr900

Senior Member
Dec 19, 2008
265
65
Pennsylvania
This is really burnin my nut sack:mad:

No matter what I do, I can't get through "getting boot image". I tried going into the nottachtrix rom.zip, but it is set up different from other roms. I guess because of the aroma installer?

Maybe I'll try with a different rom just to see if I have the same problem.


EDIT: Tried it with aokp, and still get adb not responding in the middle of getting boot image?
 
Last edited:
  • Like
Reactions: hatefuel19

hatefuel19

Senior Member
Sep 23, 2010
313
113
Lex
This is really burnin my nut sack:mad:

No matter what I do, I can't get through "getting boot image". I tried going into the nottachtrix rom.zip, but it is set up different from other roms. I guess because of the aroma installer?

Maybe I'll try with a different rom just to see if I have the same problem.


EDIT: Tried it with aokp, and still get adb not responding in the middle of getting boot image?

In about thirty minutes I'm gonna run through this again. Been trying to get webtop2sd working. Once I do I'm gonna do this tut again step by step and I'll see if I have any snags.


And you're right since nottachtrix uses aroma it isn't packed like other rooms which is why I put this step in here :)

Edit: strange how its doin same to me now too.......found a fix and gonna double check b4 I update op

EDIT: op updated - give it a try

Sent from my A500 using Tapatalk 2
 
Last edited:
  • Like
Reactions: 95rr900

95rr900

Senior Member
Dec 19, 2008
265
65
Pennsylvania
Alright, I'm going back in! I'm going to start from scratch...format external sd and repartion.....the works!

I got Nottachtrix set up perfect and doing a nandroid of it right now. Hopefully my next post will be about success!!

Thanks OP for updating the instructions......Here we go!!
 
  • Like
Reactions: hatefuel19

95rr900

Senior Member
Dec 19, 2008
265
65
Pennsylvania
:mad::mad::mad:

I had no errors this time, and it still didn't work? How big is your boot.img after you extract it and repack it? Mine is 2.9mb,,is that right (nottachtrix)?

also, my other question is....when you make the partitions on the sdcard, are you making them primary or logical (I did primary)? everything was ext3 when I mounted it...and that's what I made the partitions.

Also, in mini partition tool when you create them...how are you naming them? I'm just naming them, system, cache, and data?

I used aokpbc 35.1 for the internal rom and just copied the boot.img into the boot folder.

Also, the original boot.img that gets extracted from nottachtrix is 8mb in size. But after making the edits with notepad++ and saving, then repacking in cygwin...it is only 2.9mb?

This is frustrating because it takes awhile to partition the sdcard and then copy everything over in adb shell.

Also, after doing the whole boot.img thing, and then doing moto-fastboot boot boot_new.img

it boots into nottachtrix, but I'm already in nottachtrix. How can I tell if I booted from the sdcard?

Sorry for all these questions, I really want to get this working! It's more a matter of just not giving up now...lol!

Anybody else get this to work on windows?

Thanks!
 
  • Like
Reactions: hatefuel19

hatefuel19

Senior Member
Sep 23, 2010
313
113
Lex
:mad::mad::mad:

I had no errors this time, and it still didn't work? How big is your boot.img after you extract it and repack it? Mine is 2.9mb,,is that right (nottachtrix)?

also, my other question is....when you make the partitions on the sdcard, are you making them primary or logical (I did primary)? everything was ext3 when I mounted it...and that's what I made the partitions.

Also, in mini partition tool when you create them...how are you naming them? I'm just naming them, system, cache, and data?

I used aokpbc 35.1 for the internal rom and just copied the boot.img into the boot folder.

Also, the original boot.img that gets extracted from nottachtrix is 8mb in size. But after making the edits with notepad++ and saving, then repacking in cygwin...it is only 2.9mb?

This is frustrating because it takes awhile to partition the sdcard and then copy everything over in adb shell.

Also, after doing the whole boot.img thing, and then doing moto-fastboot boot boot_new.img

it boots into nottachtrix, but I'm already in nottachtrix. How can I tell if I booted from the sdcard?

Sorry for all these questions, I really want to get this working! It's more a matter of just not giving up now...lol!

Anybody else get this to work on windows?

Thanks!

the difference in sizes is okay. The orginal boot.img contains the kernel whereas the new boot.img only contains the ramdisk. my original is 8 mb and repacked is 2.8

if you ran fast-boot boot boot_new.img and it booted you're in your sd rom. from adb shell run mount and you'll see that system is mounted under /dev/block/mmcblk1p2. This is your sd card partition, internal is mmcblk0p12.

sd card partition naming is okay as that is exactly how i named mine. Make them primary.

Don't worry about asking questions, were both learning ;)
 
Last edited:
  • Like
Reactions: 95rr900

95rr900

Senior Member
Dec 19, 2008
265
65
Pennsylvania
I'm reaching here, but I wonder if it has something to do with how the internal and external sdcard are. I run aokpcb, but I flip flop the cards, so external is emmc and internal is sdcard.

Do you think that might be an issue?

Although, I did do a clean install of aokpbc with stock settings, still a no go.

I'll have to give it another try, I just don't wanna mess up my new 32gb sdcard!

I have to be close to getting this to work, this last time I made it all the way to using script manager to boot into the other rom...but it doesn't get past the splash screen,,,then loops.

anyway, thanks for your help...really!!
 

delewer

Senior Member
Aug 20, 2011
186
233
Paris
I don't anderstand....
May be wrong section, but...

Why don't use Nandroid backup files ?

Look in these directory :
/sdcard/clockworkmod/backup/<backupdatesave>
You have yours :
- boot.img
- system.etx4.tar
- data.ext3.tar
- cache.ext3.tar
...
all you need here.

May i'm wrong, but do a nandroid after install CM7, nottachtrix4G, CM9, etc...
A use Boot.img for multi boot

You can use "Boot Manager" too... http://xdaforums.com/showthread.php?t=1191014

To create ".img" file, you can use this proc (use CWM program) :
su
mkyaffs2image /system system.img &
while [ `pidof mkyaffs2image` ]; do
echo -n "."
sleep 2
done

Create "system.img" file...

Same for
/data
/cache
Boot
...
 
Last edited:

hatefuel19

Senior Member
Sep 23, 2010
313
113
Lex
I'm reaching here, but I wonder if it has something to do with how the internal and external sdcard are. I run aokpcb, but I flip flop the cards, so external is emmc and internal is sdcard.

Do you think that might be an issue?

Although, I did do a clean install of aokpbc with stock settings, still a no go.

I'll have to give it another try, I just don't wanna mess up my new 32gb sdcard!

I have to be close to getting this to work, this last time I made it all the way to using script manager to boot into the other rom...but it doesn't get past the splash screen,,,then loops.

anyway, thanks for your help...really!!

if its looping its so ething to do with your boot.img. tinker with it til you get it right. remember if you get that far and it doesnt boot dont start over. just flash the working boot image, meaning the one from the rom you just left and then try editing the broken boot.img
 

hatefuel19

Senior Member
Sep 23, 2010
313
113
Lex
I don't anderstand....
May be wrong section, but...

Why don't use Nandroid backup files ?

Look in these directory :
/sdcard/clockworkmod/backup/<backupdatesave>
You have yours :
- boot.img
- system.etx4.tar
- data.ext3.tar
- cache.ext3.tar
...
all you need here.

May i'm wrong, but do a nandroid after install CM7, nottachtrix4G, CM9, etc...
A use Boot.img for multi boot

You can use "Boot Manager" too... http://xdaforums.com/showthread.php?t=1191014

To create ".img" file, you can use this proc (use CWM program) :
su
mkyaffs2image /system system.img &
while [ `pidof mkyaffs2image` ]; do
echo -n "."
sleep 2
done

Create "system.img" file...

Same for
/data
/cache
Boot
...

give that a shot and see if it works
 

primeboss

Senior Member
Jun 1, 2008
214
7
My partitions are all ext3, but in the boot.img it says mount ext4? Do i change it to ext3 or leave it ext4?

Also do you mind posting a video tutorial?
 

stokehall

Member
Sep 2, 2010
32
3
adb shell

~ #mount /cache
~ #mount /system
~ #mount /data

~ #mount


adb shell

PATIENCE IS KEY FOR NEXT STEPS

~ # dd if=/dev/block/mmcblk0p12 of=/dev/block/mmcblk1p2 bs=1M
655360+0 records in
655360+0 records out
335544320 bytes (320.0MB) copied, 115.626214 seconds, 2.8MB/s

~ # dd if=dev/block/mmcblk0p15 of=/dev/block/mmcblk1p3 bs=1M
dd if=dev/block/mmcblk0p15 of=/dev/block/mmcblk1p3 bs=1M
640+0 records in
640+0 records out
671088640 bytes (640.0MB) copied, 206.557368 seconds, 3.1MB/s


~ # dd if=/dev/block/mmcblk0p16 of=/dev/block/mmcblk1p4 bs=1M
dd if=/dev/block/mmcblk0p16 of=/dev/block/mmcblk1p4 bs=1M
2048+0 records in
2048+0 records out
2147483648 bytes (2.0GB) copied, 658.327418 seconds, 3.1MB/s

ADB was unable to mount cache

Then when i changed the block/mmcblk0p16 , i was told it was unable to (Not Enough space)
I am very much a noob with this, just determined not to go without dual boot!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 25
    This is how I got dual booting from windows working and am now dual booting Nottachtrix4G from sdcard with stable

    cam and WEBTOP along side AOKPCB

    I was only able to achieve this after following sendust7 linux guide for dual boot and adapting to windows so all

    credit goes to him.

    Again these are the steps I took. If you try this and break something I'm not responsible.

    Pre-requisites

    Notepad++
    Minitool partition wizard
    Android SDK (google adb for dummies to get everything you need)
    Cygwin (if you dont have it start install now and it might be done when its time to use it)
    The rom zip you want on your sdcard and the rom zip you want on your phone
    Moto-fastboot (search this forum)
    Knowledge of ADB and fastboot
    Fully Charged Battery



    Backup everything from internal and external sdcard

    Reboot to recovery

    Flash the rom that you want on your sdcard to your phone like you would do normally.

    Reboot phone and set it up if you like or just reboot back to recovery. If you set your rom up at this point, this

    is how it will look on your sdcard at first boot.

    Reboot back to recovery

    adb shell

    ~ #mount /cache
    ~ #mount /system
    ~ #mount /data

    ~ #mount

    Take note of system data and cache file systems (ext3 or ext4)


    Power off phone and pull sdcard

    Insert sdcard into computer and open minitool partition wizard.

    Partition and format sdcard with same filesystem as noted before

    These are the partition sizes I went with and only because i didnt feel like adjusting the slider anymore. But

    These values did ensure they were big enough to hold the phone partitions. The first partition is whats left over

    after resizing other partitions and will be formatted to fat32


    system=384 MB <second partition on sdcard
    cache=700 MB <third
    data=2.6 GB <fourth


    Insert sdcard and boot to recovery

    adb shell

    PATIENCE IS KEY FOR NEXT STEPS

    ~ # dd if=/dev/block/mmcblk0p12 of=/dev/block/mmcblk1p2 bs=1M
    655360+0 records in
    655360+0 records out
    335544320 bytes (320.0MB) copied, 115.626214 seconds, 2.8MB/s

    ~ # dd if=dev/block/mmcblk0p15 of=/dev/block/mmcblk1p3 bs=1M
    dd if=dev/block/mmcblk0p15 of=/dev/block/mmcblk1p3 bs=1M
    640+0 records in
    640+0 records out
    671088640 bytes (640.0MB) copied, 206.557368 seconds, 3.1MB/s


    ~ # dd if=/dev/block/mmcblk0p16 of=/dev/block/mmcblk1p4 bs=1M
    dd if=/dev/block/mmcblk0p16 of=/dev/block/mmcblk1p4 bs=1M
    2048+0 records in
    2048+0 records out
    2147483648 bytes (2.0GB) copied, 658.327418 seconds, 3.1MB/s


    Now get boot.img

    While still in adb shell

    ~ #mount /dev/block/mmcblk0p18 /emmc

    ~ #cp /dev/block/mmcblk0p11 /emmc/boot.img

    ~ #exit

    ~ #adb pull /emmc/boot.img boot.img

    Go here and follow this step by step and stop after you've got your boot image unpacked

    http://xdaforums.com/show....php?t=1630130

    If you have any problems with cpio run cygwin installer again and search for cpio and install

    Once boot image is unpacked go to the out directory and find init.rc

    Edit init.rc with notepad++ (NOT NOTEPAD) and change these lines

    ONLY CHANGE THE /dev/bloc/mmcblk part. LEAVE EVERYTHING ELSE THE SAME


    From

    mount ext4 /dev/block/mmcblk0p12 /system noatime nodiratime wait ro barrier=1
    mount ext4 /dev/block/mmcblk0p16 /data nosuid nodev noatime nodiratime wait barrier=1 noauto_da_alloc
    mount ext4 /dev/block/mmcblk0p15 /cache nosuid nodev noatime nodiratime wait barrier=1 noauto_da_alloc

    TO

    mount ext4 /dev/block/mmcblk1p2 /system noatime nodiratime wait ro barrier=1
    mount ext4 /dev/block/mmcblk1p4 /data nosuid nodev noatime nodiratime wait barrier=1 noauto_da_alloc
    mount ext4 /dev/block/mmcblk1p3 /cache nosuid nodev noatime nodiratime wait barrier=1 noauto_da_alloc

    Once you have made these changes you can finish the tutorial posted above or below for repacking and make sure to

    click thanks. If the boot_new.img is a different size than original that's okay.

    http://xdaforums.com/show....php?t=1630130

    Move your boot_new.img to your moto-fastboot and reboot phone to fastboot.


    moto-fastboot boot boot_new.img

    If you're booted into your sdcard rom you're almost done.

    Reboot to recovery and install any rom you want and boot to it.

    Now create this directory on your internal sdcard

    /sdcard/Boot/sdrom/

    Copy your boot_new.img you used to boot your sd rom earlier to this directory and rename it to sdrom.img

    Now create this directory on your internal sdcard

    /sdcard/Boot/emmcrom/

    Now open the rom zip you installed to your phone and copy the boot.img to this directory and rename it to

    emmcrom.img

    Use attached script with scriptmanager to commense dual booting. (Rename to modified-boot-rom.sh)

    Run script as root with argument 1 to reboot to sdcard rom and argument 2 to reboot to phone rom. Argument 3 will

    send you to recovery.

    All done from windows even though it would be twice as easy and fast to do with linux but there ya go.


    I take no credit as all I did was find the right resources and none of this would even be possible without

    sendust7. If this helped you Please go to his guide and thank him TOO!!!!

    http://xdaforums.com/show....php?t=1642185
    2
    I get everything up to get boot image. when I run that command, it runs for a few seconds then adb stops responding.

    Any advice? I waited the one time for 15 minutes hoping it would respond...but it didn't.

    thanks!

    Sent from my MB860 using xda premium

    What rom are you putting on sdcard

    EDIT: look in your rom.zip.....boot img may be in there. If it is you can just use that

    Edit: could try to make sure sdcard is mounted.......mount /sdcard



    Sent from my MB860 using Tapatalk 2
    2
    I appreciate it, guys!


    Man, if you could do that, I'm so sure I wouldn't be the only one to be infinitely grateful for it. Hopefully, once I figure this out I'll get my feet wet in Ubuntu (jaunty, though it may be) out of necessity. It goes without saying that I'm very stoked to have a phone/laptop for use at college. :D


    Also, thanks for that. I can now continue my quest.

    Today I ported my auto-boot image modifier from Linux/Ubuntu to Windows. Please see my updated thread: http://xdaforums.com/showthread.php?p=28628649#post28628649

    So far I've tested NottachTrix 1.3.1 AT&T boot image, and it worked :)
    2
    Gonna see if I can make a flashable version of sd nottachtrix this weekend...will update

    Sent from my MB860 using Tapatalk 2
    1
    Using CM10 from SD Card

    For anyone looking to run NottachTrix (or other rom) from internal memory and CM10 from external. You'll run into the same problem I did. The init.rc and init.olympus.rc files don't contain the partition information. You need to update the fstab.olympus file in the boot.img. I've attached mine for comparison. (note, after repartitioning my SD Card several times I ended up with a phantom partition (mmcblk1p4) therefore my data is actually on mmcblk1p5.

    SD card partition sizes:
    System: 340mb
    Cache: 700mb
    Data: 1.25gb

    Additional notes about my partitioning experience:
    The DD command in linux (and ADB) copies the entire partition exactly to the SD card's partition, therefore you lose space if you leave it this way. I used DD, but then used fsarchiver to backup all of the sd card's partitions, repartitioned the card again, and restored the partition info with fsarchiver. This made my SD card a lot cleaner and avoided wasting any space.

    Everything's running great now. Thank you everyone who made dual booting possible!