PDA

View Full Version : [Guide] Dual Boot your iPhone.


themanofthedark
03-21-2008, 02:20 PM
If you think you bricked your iPhone/iPod don't worry. Just download ZiPhone 2.6b and update you iPod/iPhone to firmware 1.1.4. If when the update finishes and the iPod Touch goes back into recovery mode, follow these steps:
1) Open ZiPhone GUI and click Jailbreak (iPod Touch)
2) If your iPhone/iPod is still in recovery, open the "Advanced Features" tab.
3) Click on NVRAM Fix, and your iPhone/iPod should have scrolling lines of text, then reboot to 1.1.4!


First off, you need a freshly restored iPod/iPhone running 1.1.1
After you restore your iPoT, go to www.jailbreakme.com (http://www.jailbreakme.com/) and jailbreak it.
Once jailbroken go into installer and install BSD Subsystem, OpenSSH, and the BSD Fix.
Download this file and extract it: http://www.sendspace.com/file/53dwvj
Put all the files inside of this folder into /usr/sbin.
Time to execute commands, use your SSH Client or Install Term Vt-100 from installer.

1) Create a directory in "/" and name it "jb".
2) Copy the files inside of the downloaded files above into /jb/ and /usr/sbin/
3) Now copy the below s:
[quote] cd /jb
PATH=.:$PATH
tar -cf /private.tar --preserve /private/var Don't mind the errors, it's normal, ignore them.

umount -f /private/var []:
mount
fdisk -e /dev/disk0 It's going to say that it could not open the file, it's okay too.

4) Now you have entered a "sub directory" in Terminal. This is the trick part:

edit 2 This says that we want to edit the OS 2.
This will pop up: Partition id ('0' to disable) [0 - FF]: [AF] (? for help)
Just press enter. Then this will pop up: Do you wish to edit in CHS mode? [n]
Press enter again, until this pops up: Partition offset [0 - 3964928]:
This time enter the offset that is equal to your iPhone, under EDIT 2.
Next this will pop up: Partition size [1 - 3888065]: [3888065].
This time enter the size according to you iPhone under EDIT 2.

Once this is done type:

edit 3 This time type:
AF When Do you wish to edit in CHS mode? [n] pops up, press enter.
When Partition offset [0 - 3964928]: [3887922] pops up, type in the correct offset for your iPod, but this time in EDIT 3.
Again, when Partition size [1 - 77006]: [77006] comes up, enter the correct size for your iPod from EDIT 3.
________________________________
iPhone 8GB:
EDIT 2
offset: 153720
size: 3657465
EDIT 3
offset: 3811185
size: 153600
iPhone 16GB
EDIT 2
offset:76863
size:3811059
EDIT 3
offset:3887922
size:77006
_________________________________

Now that the "hard" part is done, you have to submit the changes you just made and create the new partition.

print This shows you what changes you just set so that you can review them.

write This part writes the changes to the iPod. It tells disk0 to save the new changes. Warning will pop up, press y.
Device could not be accessed exclusively.
A reboot will be needed for changes to take effect. OK? [n]

y
quit Now type this command to sync the partitions with eachother:

sync; sync; sync; This next command may take a few seconds.

newfs_hfs /dev/disk0s2
mount -t hfs /dev/disk0s2 /private/var
cd /private/var
tar -xf /private.tar An error will then pop up, and it is completely normal.

mv ./private/var/* /private/var && rm -rf ./private
mount -o ro / For this next command, it takes around 6 minutes or so, so go take a nice bathroom break.

dd if=/dev/rdisk0s1 of=/dev/rdisk0s3 bs=4096
fsck_hfs /dev/disk0s3 This should end with telling you that Snowbird appears to be OK. GOOD!
[]:
mount -o rw / This next command makes the folder where we put our new partition.

mkdir /mnt
mount -t hfs /dev/disk0s3 /mnt :
sed -e "s/disk0s1/disk0s3/" < /mnt/etc/fstab > /tmp/fstab && mv /tmp/fstab /mnt/etc/fstab && cat /mnt/etc/fstab
cd /mnt
mv sbin mysbin
ln -s /mysbin sbin
cd /jb
umount /mnt
find /private/var -name Installer -exec rm -rf {} \; You are now going to boot from the new partition!

nvram boot-partition=2
nvram boot-args="rd=disk0s3 -v"
nvram -p :
sync :
reboot If it reboots perfectly, Congratulations!!!

themanofthedark
03-21-2008, 02:28 PM
PART 2

HOW TO UPGRADE YOUR PARTITION
1) Click "Update" in iTunes.
2) Wait for the update to finish, and if iTunes doesn't give and error, then your doing great.
3) You iPod should be in restore mode, and now we have to get it out.
4) Download http://conceitedsoftware.com/iphone/site/112jb.html (http://this/)and extract jailbreak.jar.
5) Open the 1.1.4 ipsw and put kernelcache.release.s5l8900xrb in the same folder as iPHUC.
6) Type these commands in iPHUC:
:
filecopytophone kernelcache.release.s5l8900xrb
cmd setenv\ boot-args\ "rd=disk0s3\ -v"
cmd setenv auto-boot true
cmd saveenv
cmd bootx 7) When your iPod boots back up, enter these commands:

cd /jb
PATH=.:$PATH
fsck_hfs /dev/disk0s1
mkdir /mnt
mount -t hfs /dev/disk0s1 /mnt
sed -e "s/501/0/g" < /mnt/etc/passwd > /tmp/passwd && mv /tmp/passwd /mnt/etc
sed -e "s/501/0/g" < /mnt/etc/master.passwd > /tmp/master.passwd && mv /tmp/master.passwd /mnt/etc
cp -pr /Applications/Term-vt100.app /mnt/Applications/
cp -pr /Applications/Installer.app /mnt/Applications/
vim /mnt/System/Library/Lockdown/Services.plist
sed -e "s/hfs ro/hfs rw/" < /mnt/etc/fstab > /tmp/fstab && mv /tmp/fstab /mnt/etc/
sed -e "s/noexec,//" < /mnt/etc/fstab > /tmp/fstab && mv /tmp/fstab /mnt/etc/
cat /mnt/etc/fstab
umount /mnt
nvram boot-partition=0
nvram boot-args="-v"
nvram -p
sync
reboot If it boots normally into your partition, then you are all set, you can now dual boot!!!
__________________________________________________ ________
You're done! Now in order to get MobileTerminal to work you have to:

Install the BSD_Base and BSD_Extras from http://iphone.natetrue.com (http://iphone.natetrue.com/)
Copy Terminal.app into /mnt/Applications
mkdir -p /mnt/usr/local/arm-apple-darwin/
ln -s /usr/lib /mnt/usr/local/arm-apple-darwin/lib
cp -p /mnt/bin/bash /mnt/bin/sh
chmod 4755 /mnt/usr/bin/login
__________________________________________________ _________

Here is a little Jiggy main.js to have an automated switch:
http://danb-uk.net/~dan/files/iPhone...itcher-main.js (http://danb-uk.net/%7Edan/files/iPhone/boot_switcher-main.js)
CREDITS:
For finding out how to dual boot/The base tutorial: iPhone Dev Team (http://iphone-dev.org/s5l8900:dualboot)
For the Jiggy main.js to switch between OS's: DanBUK of Hackint0sh.org
__________________________________________________ ____________

I AM NOT RESPONSIBLE FOR ANY "BRICKED" OR BROKEN IPHONES OR IPODS.



NOTE: taken from iPTF. adapted through Nuclear Elephant tutorial.

Lincoln
03-21-2008, 02:30 PM
Great guide. I'm tempted to try it, and I also want to get Customize 2,0 running, but I'm headed off to Myrtle Beach tonight (what a drive that'll be) and I don't want to be dealing with any problems while away from the Mac.

- John

themanofthedark
03-21-2008, 02:32 PM
i tried it actually, if you follow the instructions EXACTLY itll work.

acosmichippo
03-21-2008, 02:35 PM
aw man... here you had me thinking someone wrote their own iphone linux distro.

themanofthedark
03-21-2008, 02:35 PM
aw man... here you had me thinking someone wrote their own iphone linux distro.
did you just delete and repost?

if so, thanks.

acosmichippo
03-21-2008, 02:37 PM
yeah, i didn't realize you had another one coming. looked crappy with my post in the middle.

depthnerd
03-21-2008, 02:59 PM
I would do this but I really don't like upgrading or restoring or anything since I have to re-do EVERYTHING that I've done.

themanofthedark
03-21-2008, 03:02 PM
i didnt want to do it either but then my 1.1.3 failed to boot. so i thought why the hell not, and i did it...

now to figure out how to get 1.0.2 on one of them...

hmm..

CBRfanatic
03-21-2008, 04:56 PM
so with this it is basically two iphones? or just one with two different firmwares like the old dual boot trick on the psp's?

depthnerd
03-21-2008, 05:06 PM
so with this it is basically two iphones? or just one with two different firmwares like the old dual boot trick on the psp's?
Those questions make no sense...since they ask the SAME thing.

Lincoln
03-21-2008, 05:11 PM
I would do this but I really don't like upgrading or restoring or anything since I have to re-do EVERYTHING that I've done.

I'm with you here. I''d really like to do this but the last time I had to restore due to Screenshot going all funky on me, it took three days to re-do and re-install everything I had set up.

- John

themanofthedark
03-21-2008, 05:14 PM
AUGH!!!!

12th time... restoring to 1.0.2..

Lincoln
03-21-2008, 05:15 PM
AUGH!!!!

12th time... restoring to 1.0.2..

12th? Wow. Does everybody experience such issues?

Best of luck with getting through.

- John

CBRfanatic
03-21-2008, 05:51 PM
Those questions make no sense...since they ask the SAME thing.
uh......no they dont. if you dont have an aswer to my question please dont post about it, now i see why there is a WHOLE thread just about YOU.

themanofthedark
03-21-2008, 05:58 PM
12th? Wow. Does everybody experience such issues?

Best of luck with getting through.

- John
IT WORKED finally...

jesus.. on the thirteenth time... 1.0.2 and 1.1.4...

F#%$ YES!!!

themanofthedark
03-21-2008, 07:14 PM
now... does anyone know how to make it load the other partition the next time it restarts, through Term-vt100 or something?

phsycology
03-21-2008, 08:03 PM
Wow! So you'd be able to have a jailbroken 1.02 and a stock 1.1.4 on the same phone but on different partitions?

goobs22xx
03-21-2008, 08:10 PM
I don't understand why you would want to do this, other than to say you can.

Maybe im just simple minded. Nice work, however.

depthnerd
03-22-2008, 12:42 AM
now... does anyone know how to make it load the other partition the next time it restarts, through Term-vt100 or something?
Yeah...I guess? Not sure.

patrick_83
03-22-2008, 10:08 AM
I don't understand why you would want to do this, other than to say you can.

Maybe im just simple minded. Nice work, however.


I think it was for when the hackers wanted to test to see if a JB would work, they could still be running the old version on the other parition.

themanofthedark
03-29-2008, 03:33 AM
nobody has tried this except me?

and I definitely am not the smartest here, I'm pretty sure many of us could do this better than me... I made stupid mistakes a couple of times...

x999x? John? Tinman? Noone?

x999x
03-29-2008, 03:43 AM
If there were a reason for me to be on 1.0.2 I'd consider it, but as the adage goes, "if it ain't broke, don't fix it."

I hate setting my phone up all over again, and that alone keeps me from really tinkering beyond apps and such.

themanofthedark
03-29-2008, 04:01 AM
I see your point sir...

what the hell am I doing up at 4.00??

Lincoln
04-06-2008, 12:59 PM
I'm bored this afternoon, so I'm restoring, dual-booting, and Pwning. Before I start, though, have you figured out how to boot into the other partition? Also - which should I do first - configure dual-booting, or use Pwnage?

- John