What's new

Need Ubuntu guru help to make low level disk image

jnorwood

New Member
Joined
Apr 26, 2011
Messages
2
Reaction score
0
Hey all, I FINALLY got my Verizon 4.2.7 completely jailbroke in an attempt to recover deleted photos from my iPhone 4. In the process, I managed to overcome the network problems that are inherent with Ubuntu 10.10. So now I have my iPhone connected to my router, and Ubuntu on the router. But my two remaining issues are these (as my linux and Ubuntu knowledge is very limited and elementary):

1. How do I ensure port 22 is open in Ubuntu?

2. The directions I have are launching a command line ( dd if=/dev/disk0 | ssh <username>@<computer-ip> 'dd of=iphone-dump.img' ) FROM the iPhone using MobileTerminal. Problem is, MobilTerminal does not work on the later iOS for the iPhone. So what I need is the equivilent command to launch from my computer that will copy my iPhone disk disk image from the phone to my computer. Any suggestions?

3. Where do I save the file on my computer so that I can go back to Window and run the PhotoRec and pull them out of the image.

I really appreciate your input and hope that it helps me. I have literally put 50 man hours and a couple hundred bucks to get the necessary equipment up and running to achieve this. I am so close and this seems to be the only thing stopping me. Thanks for your help.

-Jon
 
1. You can check your port 22 is open in Ubuntu, or any version of Linux by connecting to the port.

telnet localhost 22 (from your ubuntu machine)

If it connects, the port is open and LISTEN'ing.

If this doesn't work, either sshd isn't installed, or the service isn't started.

To install it you can run 'apt-get install openssh-server' as the root user.

To start the service you can run '/etc/init.d/ssh restart' as the root user.



2. I am familiar with the dd command, however haven't personally heard of imaging an iPhone. There are many other Terminal programs for the iPhone that do work that you can use instead of MobilTerminal. Of of them will do the job for you.

Another way to do it using the command above is by ssh'ing to your iphone from your ubuntu box, then running the same command as above.

ssh <iphone ip>

dd if=/dev/disk0 | ssh <username>@<computer-ip> 'dd of=iphone-dump.img'

You'll end up with an img file on your ubuntu box as long as it runs correctly. Again I haven't done this with an iPhone so I can't really help with whatever you are trying to recover.

3. I don't know what PhotoRec is, but you will end up with raw file after you complete, so I'd be suprised if any Photo app would be able to read the contents of the file unless it is specifically designed to do so.

If PhotoRec doesn't read raw img / iso files that you have created above, then you will need to extract it first to files, or mount it so that PhotoRec can access it.

You'd need to use something like MagicISO (on Windows), or you can easily mount it in linux using mount -t -o loop iphone-dump.img /mnt

Good luck with recovering your photos, hope you manage to get them back.
 
@ craigfoot

thanks for the reply. i got everthing to work except i'm out of diskspace. i'll show you the command that i used, what i tried to use to correct the problem in a sec. as for PhotoRec, my understanding it its a 'carver' tool to pull photo and other media files out of the raw disk image. seems to be working on the incomplete file i was able to create. but if you could help me modify the command to direct it to copy the image file to another drive that is blank, i'd be extremely greatful for your help.

here is the command that i ran (remember, i don't have terminal on my iphone, one that works anyway, so i have to run the command from the computer). it seems to work.

ssh root@iphone-ip dd if=/dev/rdisk0s2s1 bs=1M | dd of=iphone-user.img

this copied a portion of the image until the disk was full to my ubuntu partition under my home directory. i only have the default partiion for ubuntu which is 30 or so gb. so when this command ran, it topped out the disk space. i do however have a 3rd disk which has 160, only one partition and is NTFS. the disk utility lists it as /dev/sbc . so i tried to write the command line to read this way to save it to this different disk:

ssh root@iphone-ip dd if=/dev/rdisk0s2s1 bs=1M | dd of=/dev/sbc/iphone-user.img

but this line came back with a 'directory does not exist' error and didn't run (mind you i plugged in my iphone ip and all). what would be the proper way modding the command to save to this drive? it can be on the root directory as i don't have anything on it at all. this disk is a 160 gb single partition drive with NTFS file system. i am also not too used to using the command line so prefer to create and mod files via the gui, but everthing under unbuntu (graphically) is 'read-only' and will not let me as folders and such. this is the last step. thanks for your help.

-jon

also, if you have some kind of im so we may be able to do this realtime and a few free moments, that would be great too. then i can be done with this for good. thanks again.
 
Top