Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to made a USB Ubuntu installer via zcat, because the T61s of my Dad don't have a CD Drive.

So i used "sudo zcat boot.img.gz > /dev/sdb" But i forgot to change the sdb to sdc and overwrite my Mediastorrage. Is there any possibility to undo that?

Thanks so far.

share|improve this question
Do you remember exact sizes of the partitions? – jippie Apr 15 '12 at 15:15

When a drive has been accidentally overwritten you will need Data Recovery Tools to restore the remainders of your data. After unpacking an image on your drive those parts of your drive where data were written are definitely lost and can not be recovered.

By installing testdisk Install testdisk you may be able to recover parts of your files.

Included in the TestDisk suite you will also find the tool PhotoRec that helps to recover individual files even in the case the partitions can not be restored by testdisk or the drive itself has a hardware defect.

TestDisk/PhotoRec can also be run on a backup image of your drive (strongly recommended).

share|improve this answer
Ah testdisk, I remembered there was another tool from the same creator, but I thought PhotoRec included that testdisk you mentioned. It is the other way around and that sounds logical :) – jippie Apr 15 '12 at 15:25
I always have to look it up first, I have to admit. That's why you beat me by 6 min. :) – Takkat Apr 15 '12 at 15:28

This always seems to happen just moments before someone decides to make regular backups of his system.

You may try PhotoRec to save some of the files. Boot from a live CD, attach an extra external hard disk to store files on.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.