2

My piano teacher asked me to record one of his recitals with his iPod (3-4 generation, not so sure) and I did it. While trying to edit it, he accidentaly deleted it, I'm trying to recover.

After some research, I've been able to discover that there's a way to recover it and I've been able to make it work but the iPod had 64 GB and doing it through SSH is deadly slow, in the last two days, the process stopped twice with this error:

root@g1:/home/gustav# ssh [email protected] dd if=/dev/rdisk0s2s1 bs=1M | dd of=iphone-use2.img
[email protected]'s password: 
Write failed: Broken pipe
4113088+0 records in
4113088+0 records out
2105901056 bytes (2.1 GB) copied, 51107.2 s, 41.2 kB/s

I believe the probability of this process stoping in the middle is a high, mainly because it's a dd on 64GB through SSH (it seems it's going to take 6-7 days) then I thought about copying little pieces of the iPod's disk at a time and merge them after the process is complete.

Since the beginning, I noticed that the process through SSH is slow, then I have two questions:

  1. Is it possible to make these splitted images from the iPod's hard drive using dd?
  2. Would it be possible to use something else (such as FTP or anything faster than SSH) in order to achieve this?

The title of the question have only one of this questions for the following reason: "I've been able to make it work through SSH, having to wait is not really a problem - the processing stopping all the time is the problem, splitting the image is the objective, but you could also help me to find something that would work a little faster."

Also for the ones who suggest: "Why don't you just plug the iPod in and mount it's disk?" - the answer is: With the small research I did until now, it seems to be impossible, the only viable way I found to do it is with dd + ssh.

3: I've read here that there's a block size, is this related somehow?

4
  • It should only take a few minutes to transfer 64 GB, not days.
    – psusi
    Nov 27, 2012 at 20:00
  • With SSH+dd via WLAN? Strange, the process is taking a long time.
    – Red Banana
    Nov 27, 2012 at 20:03
  • Well, over an old, slow 11 Mbps WLAN, I suppose it would take the better part of a day.
    – psusi
    Nov 27, 2012 at 20:12
  • Broadly it should be possible to network via usb (think tethering) github.com/gilir/usbmuxd-debian might be useful. Also if ssh is cpu limited you could use netcat/socat or similar.
    – ijk
    Nov 27, 2012 at 20:16

1 Answer 1

1

You could use 3 options from dd, count, skip and seek like:

dd if=/dev/rdisk0s2s1 of=iphone1.img bs=1M count=1024
dd if=/dev/rdisk0s2s1 skip=1024 of=iphone2.img bs=1M count=1024
dd if=/dev/rdisk0s2s1 skip=2048 of=iphone3.img bs=1M count=1024

And so on. This way it will create several images, with the same size(1024MB).

To restore the from the backup, load the images in order, and use commands like these:

 dd if=iphone1.img of=/somepartition bs=1M conv=sync,noerror
 dd if=iphone2.img of=/somepartition seek=1024 bs=1M conv=sync,noerror
 dd if=iphone3.img of=/somepartition seek=2048 bs=1M conv=sync,noerror
8
  • Thanks. This /dev/rdisk0s2s1 seems to be a reference to somewhere in the disk, and it seems there are some other references such as /dev/rdisk0s1, how to know the total number of references?
    – Red Banana
    Nov 27, 2012 at 19:56
  • Oh i thought that would be the reference to the whole disk, i don't know about that. Nov 27, 2012 at 19:58
  • You've mentioned some commands to load them from the backup, are these commands intended for merging all them in only one image?
    – Red Banana
    Nov 27, 2012 at 19:58
  • I think they will merge all images into one partition. Never used this option before, but i can try to simulate something here. Nov 27, 2012 at 19:59
  • Can you test that?
    – Red Banana
    Nov 27, 2012 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .