Παρασκευή 11 Σεπτεμβρίου 2009

Make iPhone a Bootable USB Disk - Boot your PC with iPhone

After the release of USB DRIVE by dmytro, we can now make iPhone a bootable usb stick/hard disk and use it to install Windows XP/7/Vista,run LIVE USB distros, Backtrack, Ubuntu and anything else you might think of.

Tests where done on iPhone 3GS and iPhone 3G with success.

What is the use of it:

You can boot your PC using iPhone as the bootable device, and launch some or more of the following: (yes, altogether!)

Windows 7 Setup or Windows Vista Setup
Windows XP Setup
Backtrack 3 or 4
PartedMagic
Ghost boot disk
Ubuntu Live Usb
Windows XP Live CD
MemTest
Freedos

and anything else you might think of. You will have a powerful tool on your hands , anywhere you are. (provided you carry the cable along, of course )

Also, you'll have the rest of the partitioned space availabe for use with your files (applications, documents, music, videos etc) accesible by any PC or Mac.


What you'll need:


1. Jailbroken iPhone w/Cydia
2. USB Drive by dmytro.
3. A PC with Windows Vista or Windows 7
4. WinSetupFromUSB (http://www.datafilehost.com/download-a717212e.html)


Here we go:


1. Having installed USB DRIVE, create a partition of your desired size, set to Mass Storage mode and reboot your iPhone.

2. After iPhone boots, you'll see a new drive on your Comuter. If the drive does not appear, you probably have iTunes installed on the PC and the iTunes driver messes with the mass storage driver. To solve this, open Device Manager, go to Universal Serial Bus Controllers, find Apple USB Mobile Device Driver , right click on it and choose "update driver". Choose "manually install driver", "select from list" and you'll see 2 drivers, the Apple one and the USB Mass storage one.Choose the USB Mass storage one and continue. If the installation of the driver takes too long, disconnect Iphone. The driver will be installed. Connect it again and you are done.

Note: By updating the above driver, iTunes won't see your iPhone anymore. To revert that, use the above method (n.2) and choose the Apple driver instead. You should do this anytime you wanna switch between mass storage mode and iTunes mode.

3. Upon completion of the driver update, Windows might ask you to restart in order for the changes to take effect. Ignore that and go to step 4.

4. Open a command prompt with administrative rights (in Vista or Windows 7, click on Start, type CMD , hold down shift+ctrl and press enter. Or you may want to disable UAC instead . (suggested :p ). A command prompt will open with administrative rights. type DISKPART and press enter. it will show : "DISKPART>"

Note: You need to be careful here so you won't change any of your other hard disk partitions. Disconnect any other removable hard disk drives first just in case.

5. in Diskpart , we type the following commands:

LIST DISK (enter)

it will show all of our hard disks, including the iphone usb partition ! (you'll recognize it by the total disk space)
We note what disk number it has on the left, and we select this disk by typing:

SELECT DISK # (e.g. select disk 2, if the iphone partition has the number 2) and we press enter.

Now we type all of the following:

CLEAN (enter)
CREATE PARTITION PRIMARY (enter)
SELECT PARTITION 1 (enter)
FORMAT FS=FAT32 QUICK (enter)
ASSIGN (enter)
ACTIVE (enter)
exit (enter)

and we can exit command prompt. Now we've already created a bootable partition on iphone which we can see in My Computer! (only it doesn't have what to boot with, yet)
Optionally, we can rename our newly appeared disk on my copmuter to "iphone disk" or whatever name we want. (It doesn't have to have the same name that USB DRIVE gave it via iPhone).

6. Now we install WinsetupfromUSB which we downloaded from the link above.

7. When installed , we open it (we ignore the suggestion to use NTFS ) and at option USB DISK SELECTION we choose our newly created iPhone partition (you'll find it be its drive letter or size).

8. We check the option SYSLINUX BOOTSECTOR/DISTRO (leave the path intact)

NOTE: From now on, it's up to you have many boot images you want to install. I'll provide info for 4: Windows XP, Windows 7 or Vista, Backtrack 3 and PartedMagic.
For more boot images, I'll supply at the end of the tutorial my "grub menu.lst" file which you can use as a guide to install more boot images.

9. Copy all the contents of your WINDOWS XP cd into a folder , and under "Windows 2000/XP/2003 Source" click "browse" and select that folder.

10. Copy all the contents of your WINDOWS VISTA or 7 cd into a folder (not both!) , check the option "VISTA/7/SETUP/PE Recovery/iso" and choose that folder.

11. Download Partedmagic 4.5 ISO (http://beefdrapes.partedmagic.com/) . check the optin PARTEMAGIC> v3.... and browse and select the ISO you just downloaded (after unzipping it first)

12. Click "GO" (will take some time, be patient....). It will notify that it was unable to write grub to bootsector, will attempt to write it the MBR. That's ok.

13. When done, we're ready. IPHONE is now a bootable USB disk. You may now choose it from BIOS as the boot device (you'll find it listed as "Softick") and it will give you a boot menu of the all the installations above.

Optional: To install backtrack 3 on boot options: *suggested*

1. Download BackTrack 3 LIVE USB ISO (http://www.remote-exploit.org/cgi-bin/fileget?version=bt3-usb)

2. mount it as a virtual cd. (using ULTRAISO or Daemon Tools etc)

3. Copy the contents (a folder named "boot" and a folder named BT3) to the root folder of iphone usb partition.(overwrite files if asked)

4. Edit the menu.lst file found in root iphone disk , using notepad , and add the following:

title Backtrack 3
root (hd0,0)
chainloader (hd0,0)/syslin.dat

I hope it appears handy... by the way, it's the first tutorial for making iPhone bootable worldwide.

I've been looking for such a thing for a long time, and now, with USB DRIVE it is possible. (I've done this with many of my USB sticks,but iPhone is always iPhone)

Finally,here's a link to my "menu.lst" file , which holds the bootloader options, for anyone who wants to add more ISOs as bootable (ubuntu, freedos, ntpasswd etc)

Special thanks to Dmytro for his amazing work!

Limneos

Πέμπτη 10 Σεπτεμβρίου 2009

Workaround for USB DRIVE and APPLE USB DEVICE conflict

There is a known conflict with the USB Drive Mass Storage driver recognized by Windows and the Apple Mobile USB Device driver installed by iTunes.

In order for Windows XP and Vista to recognize iPhone as Mass Storage Device (Windows 7 most of the times recognizes it), you need to do the following:

1. Set iPhone to Mass Storage mode from USB Drive and reboot iPhone.
2. Right-click on "My computer" , select properties, and go to hardware-device manager.

3. Expand the hardware list : "universal serial bus controllers" and find "Apple Mobile USB Device".


4. Right click on it and select "Update driver", then choose "install driver manually" and then "select from list. You will be shown 2 possible compatible drivers. Select the mass storage driver instead, and click ok.

5. If the process of updating the driver gets stuck in for a long time, disconnect iphone and connect it again.
6. You're done. Your PC should now recognize iPhone's as a mass storage USB device.


Note: To revert the process and make iphone available in iTunes, do the same above steps selecting the Apple Mobile USB Device driver instead.

All thanks go to dmytro for making this possible!