случайно удалил мой основной раздел во время ddrescue

239
user52107

Я купил новый Raspberry Pi и последовал турориал для установки системы. Я работал на своей главной станции ПК и выполнил эту команду:

sudo ddrescue -d -D --force ubuntuXXXX.img / dev / sda

Что случилось потом, я перезагрузил свой компьютер, и он сказал, что не может найти мой основной жесткий диск, так что, похоже, я потерял все свои данные.

Несмотря на то, что я думаю, что нет способа вернуть это обратно, я все еще верю, что кто-то может мне помочь.

Я использую SSD-накопитель емкостью 500 ГБ, снял его с ПК, и когда я подключаю его с помощью USB-кабеля к другому компьютеру, все, что я вижу, - это три раздела, один - 67 МБ, другой - 1,8 ГБ, а остальное кажется пустым ( мои данные)

0
Возможная копия [Как восстановить удаленные файлы с \ [отформатированного \] диска FAT32 / NTFS в Linux?] (http://superuser.com/questions/326481/how-to-recover-deleted-files-from-formatted- fat32-диск NTFS-в-Linux) Breakthrough 8 лет назад 0

1 ответ на вопрос

0
CBHacking

You imaged your .img file (which is presumably for the RaPi, and therefore not x86 code) to your hard disk. The partitions that you see now are the ones in the RaPi image.

If you stopped ddrescue before it finished, then it might have only imaged part of the file, but I know from experience that ddrescue runs extremely quickly; even if you stopped it immediately I'm sure it overwrote enough of your system partition that the file system is at least corrupted and probably outright gone. Your files might still be there (and will still be there, past the end of the image size), but the file system metadata that is needed to locate them is gone. Data recovery software could possibly rescue those files (by scanning the disk at the block level, looking for the patterns that indicate the start of document or jpeg or whatever) but the OS is thoroughly trashed.

To get the PC booting (off its hard disk; you could of course use a Live CD or similar) again, your only options at this point are to restore from a backup, or to re-install your PC's operating system (probably repartitioning in the process). Sorry... that's what happens when you run commands as root without being really damn careful.

Вы должны были предоставить пользователю без полномочий root доступ к устройству, а не запускать команду от имени пользователя root. :( David Schwartz 8 лет назад 0