De acordo com as Leis 12.965/2014 e 13.709/2018, que regulam o uso da Internet e o tratamento de dados pessoais no Brasil, ao me inscrever na newsletter do portal DICAS-L, autorizo o envio de notificações por e-mail ou outros meios e declaro estar ciente e concordar com seus Termos de Uso e Política de Privacidade.


Recuperação de arquivos de pendrives, discos rígidos ou qualquer tipo de mídia removível

Colaboração: Rubens Queiroz de Almeida

Data de Publicação: 24 de março de 2013

Hoje eu me vi com um pendrive de alta capacidade, com centenas de arquivos, e totalmente irreconhecível no meu sistema GNU/Linux.

Procurando por uma solução, eu me deparei com o utilitário testdisk, que funcionou maravilhosamente bem.

O aplicativo faz parte do repositório Debian/Ubuntu/LinuxMint. Para instalar digite, como root, o seguinte comando:

  # apt-get install testdisk

Uma vez que o software tenha sido instalado, basta executar, como root, o comando abaixo:

  # testdisk

Aparecerá então a tela inicial do programa, com informações e um menu inicial de ações:

  TestDisk 6.13, Data Recovery Utility, November 2011
  Christophe GRENIER <grenier@cgsecurity.org>
  http://www.cgsecurity.org
  
  
  TestDisk is free data recovery software designed to help recover lost
  partitions and/or make non-booting disks bootable again when these symptoms
  are caused by faulty software, certain types of viruses or human error.
  It can also be used to repair some filesystem errors.
  
  Information gathered during TestDisk use can be recorded for later
  review. If you choose to create the text file, testdisk.log , it
  will contain TestDisk options, technical information and various
  outputs; including any folder/file names TestDisk was used to find and
  list onscreen.
  
  Use arrow keys to select, then press Enter key:
  >[ Create ] Create a new log file
   [ Append ] Append information to log file
   [ No Log ] Don't record anything

Vamos deixar na primeira opção (Create). Para prosseguir, tecle <ENTER>.

  TestDisk 6.13, Data Recovery Utility, November 2011
  Christophe GRENIER <grenier@cgsecurity.org>
  http://www.cgsecurity.org
  
    TestDisk is free software, and
  comes with ABSOLUTELY NO WARRANTY.
  
  Select a media (use Arrow keys, then press Enter):
  >Disk /dev/sda - 500 GB / 465 GiB - ST500DM002-1BD142
   Disk /dev/sdb - 32 GB / 29 GiB - SanDisk Cruzer Blade
  
  Note: Disk capacity must be correctly detected for a successful recovery.
  If a disk listed above has incorrect size, check HD jumper settings, BIOS
  detection, and install the latest OS patches and disk drivers.
  ecover files
  or partitions off dead flash drives, usually fried by Windows, or any hard drive
  or removable media 

Nesta tela temos os dispositivos para os quais poderemos efetuar ações de recuperação. Neste caso, a minha opção é por realizar uma verificação do pendrive, a segunda opção disponível.

  TestDisk 6.13, Data Recovery Utility, November 2011
  Christophe GRENIER <grenier@cgsecurity.org>
  http://www.cgsecurity.org
  
  Disk /dev/sdb - 32 GB / 29 GiB - SanDisk Cruzer Blade
  
  Please select the partition table type, press Enter when done.
  >[Intel  ] Intel/PC partition
   [EFI GPT] EFI GPT partition map (Mac i386, some x86_64...)
   [Humax  ] Humax partition table
   [Mac    ] Apple partition map
   [None   ] Non partitioned media
   [Sun    ] Sun Solaris partition
   [XBox   ] XBox partition
   [Return ] Return to disk selection
  
  Note: Do NOT select 'None' for media with only a single partition. It's very
  rare for a drive to be 'Non-partitioned'.

Selecionamos então o tipo de partição, que já vem assinalada por padrão. Teclamos <ENTER> para prosseguir.

  TestDisk 6.13, Data Recovery Utility, November 2011
  Christophe GRENIER <grenier@cgsecurity.org>
  http://www.cgsecurity.org
  
  Disk /dev/sdb - 32 GB / 29 GiB - CHS 30532 64 32
  
  >[ Analyse  ] Analyse current partition structure and search for lost partitions
   [ Advanced ] Filesystem Utils
   [ Geometry ] Change disk geometry
   [ Options  ] Modify options
   [ MBR Code ] Write TestDisk MBR code to first sector
   [ Delete   ] Delete all data in the partition table
   [ Quit     ] Return to disk selection
  
  Note: Correct disk geometry is required for a successful recovery. 'Analyse'
  process may give some warnings if it thinks the logical geometry is mismatched.

A situação é de um pendrive ilegível, seleciono então a primeira opção, Analyse.

  TestDisk 6.13, Data Recovery Utility, November 2011
  Christophe GRENIER <grenier@cgsecurity.org>
  http://www.cgsecurity.org
  
  Disk /dev/sdb - 32 GB / 29 GiB - CHS 30532 64 32
  Current partition structure:
       Partition                  Start        End    Size in sectors
  
  Warning: Incorrect number of heads/cylinder 255 (FAT) != 64 (HD)
  Warning: Incorrect number of sectors per track 63 (FAT) != 32 (HD)
   1 P FAT32 LBA                0   1  1 30532  33 32   62530592 [NO NAME]
  
  Warning: Bad starting sector (CHS and LBA don't match)
  No partition is bootable
  
  *=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
  >[Quick Search]  [ Backup ]
                              Try to locate partition

Vamos então para a busca rápida (Quick Search):

  TestDisk 6.13, Data Recovery Utility, November 2011
  Christophe GRENIER <grenier@cgsecurity.org>
  http://www.cgsecurity.org
  
  Should TestDisk search for partition created under Vista or later ? [Y/N]
  (answer Yes if unsure)

Respondo então Yes:

Referências

Linux USB Flash Drive Recovery!!!

Adicionar comentário

* Campos obrigatórios
5000
Powered by Commentics

Comentários

Nenhum comentário ainda. Seja o primeiro!


Veja a relação completa dos artigos de Rubens Queiroz de Almeida