M
M
Miku Hatsune2016-01-04 16:27:24
linux
Miku Hatsune, 2016-01-04 16:27:24

Is there an option to recover files after they have been erased by dd?

I raked very hard ... :c
In general, it was necessary to write the image of the ubuntu installer to a USB flash drive in order to agitate a friend to move from Windows: D
Well, I entered according to the knurled scheme:

dd if=/Data.Section/iso/myLinuxIsoFile.iso of=/dev/sdb bs=8MB

Only now I didn’t remember that I inserted a second HDD and the flash drive moved to sdc: D
Simply put, I erased my operating system (ArchLinux) on sdb
Is there an option to restore files? I didn’t do any rewriting, I didn’t do anything, so as not to finish it off.
Of course, there wasn’t anything particularly important there (or rather, it didn’t exist at all, everything is important in the cloud), but I don’t want to re-raise the entire system and configure (

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Tsilyurik, 2016-01-04
@Hatsune-Miku

I think no, it's impossible.
Because:
- dd actually writes physically byte by byte...
- you have /dev/sdb specified, ie. not a partition, but the whole disk, which is much worse: dd started writing from an MBR record, so you don't even have a partition structure.
PS If your Linux was not the 1st partition (if there was some kind of Windows rubbish ;-)), or the 1st was its swap partition ... then the partitions may not be damaged, and, with a strong desire, you can to restore them if you restore the boundaries manually in the MBR of the record (if the old fdisk listing has been preserved somewhere) ... but this is very troublesome.

E
eikoninaru, 2016-03-19
@eikoninaru

Just restored my partition after dd.
Once again, you need to restore not files, but a partition.
I followed these ten steps ==> ubuntuforums.org/showthread.php?t=1926510

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question