Disk Recovery Tools Clonezilla Dd / Ddrescue Testdisk Repair/Fix HFS+

Total Page:16

File Type:pdf, Size:1020Kb

Disk Recovery Tools Clonezilla Dd / Ddrescue Testdisk Repair/Fix HFS+ Linux List Disks Disk Recovery Tools pmount dd / ddRescue CloneZilla Repair/Fix HFS+ (macOS) partition using Ubuntu TestDisk WSL Format and Wipe Free Disk Space List Disks lsblk #OR sudo fdisk -l To list Filesystem disks, you can run df -hl Disk Recovery Tools If you are looking to recover data from a drive that is at least potentially failing, you should first resort to try to make a clone/image of that drive to a backup drive. Tools like DiskDrill on MacOS, or Clonezilla and DDrescue are great at doing this. Linux can also be a great last resort OS to try to recover data from a drive if you keep running into issues on Windows or MacOS Disk Recovery Tools pmount pmount manual pmount is a device mounting solution that simplifies mounting and will automatically try to remount any devices that may eject on their own. Very useful for doing data recovery on misbehaving drives. sudo apt install pmount Disk Recovery Tools dd / ddRescue Install ddrescue through the gddrescue package dd is a recovery tool probably found on every UNIX system. It is built to be lightweight, simple, and available. However, ddrescue (GNU) is more sophisticated algorithm to read "good" or "big" blocks first and then more damaged areas later to help reduce the amount of data read in a single operation. Install gddrescue package containing ddrescue (GNU) by entering this command: sudo apt install gddrescue References https://opensource.com/article/18/7/how-use-dd-linux https://askubuntu.com/questions/803789/testdisk-is-showing-wrong-size-of-drive https://superuser.com/questions/1024643/in-which-case-should-i-prefer-dd-over-gnu- ddrescue Manual https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html Disk Recovery Tools CloneZilla CloneZilla is useful disk cloning software that can be installed using Windows, MacOS, or Linux. sudo apt install clonezilla Using the uMount command, You will need to unmount the drives that you want to restore from / clone to: umount /dev/yourdrive #i.e. umount /dev/sdb/ umount /dev/sdc/ Disk Recovery Tools Repair/Fix HFS+ (macOS) partition using Ubuntu sudo apt-get install hfsprogs # Use fdisk to find the Mac Partition. sudo fdisk -l Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: 00006451-5A98-0000-F944-0000E3560000 Device Start End Sectors Size Type /dev/sda1 40 409639 409600 200M EFI System We want to do a FSCK check on the mac partition. sda1 is the EFI partition, so the mac partition should be sda2 (verify this in fdisk). sudo fsck.hfsplus -fryd /dev/sda2 # -f will force a filesystem check even if the specified device is "clean". # -r will try to rebuild the catalog file on the specified file system # -y Tries to repair fielsystem errors automatically during the check Disk Recovery Tools TestDisk If you are trying to recover data from a failing hard drive, try to clone the drive first. Resort to TestDisk only if that fails. Also, you should really only try to use TestDisk on a recovered image on a healthy disk rather than a damaged image on a failing drive. The reason to use it in this way is because the write operations that TestDisk performs will likely aggravate or further damage the failing drive more. TestDisk is an excellent multi-purpose repair software. It can perform repairs on most partitions and partition tables, and make non-booting disks bootable again. It can also help in a pinch with data recovery, though you should run it on secured and recovered data only (see the warning above). Check https://www.cgsecurity.org/wiki/TestDisk#Filesystems for a complete list of supported filesystems. Install TestDisk On Linux, TestDisk is really easy to install via package management. Otherwise, if you use TestDisk on Windows or MacOS you will have to compile binaries to run TestDisk on those platforms. sudo apt upgrade sudo apt update sudo apt install testdisk Basic Commands Run TestDisk sudo testdisk Run TestDisk and provide debugging and a log file. sudo testdisk /debug /log TestDisk - Data Recovery Examples https://www.cgsecurity.org/wiki/Data_Recovery_Examples WSL You can run a GNU/Linux environment in a terminal on Windows through Windows Subsystem for Linux (WSL). Note: Not all Ubuntu commands/programs will work in the WSL, including but not limited to disk restore/repair software. WSL2 is out, which improves overall performance using an entirely new software architecture. Install WSL Format and Wipe Free Disk Space You can use the DD command to completely clean a disk and make it difficult to reconstruct the drive and preexisting data on it. This is great if the drive had confidential files/information on it and you need to discard it or give it away. Identify your drives! List your available drives, their available partitions and storage information: lsblk You might see output like this, where there is a list of given disk names and their partitions. sda is most likely the internal disk of your computer, and sdb or sdc are probably your external drives (make sure you verify which disk is which): sda 8:0 0 931.5G 0 disk ├─sda1 8:1 0 260M 0 part /boot/efi ├─sda2 8:2 0 16M 0 part ├─sda3 8:3 0 814.3G 0 part ├─sda4 8:4 0 980M 0 part ├─sda5 8:5 0 18.4G 0 part ├─sda6 8:6 0 40.9G 0 part / ├─sda7 8:7 0 3.7G 0 part └─sda8 8:8 0 33.5G 0 part /home sdb 8:16 0 4.6T 0 disk ├─sdb1 8:17 0 200M 0 part └─sdb2 8:18 0 4.6T 0 part sdc 8:32 0 7.3T 0 disk ├─sdc1 8:33 0 200M 0 part └─sdc2 8:34 0 4.6T 0 part sr0 11:0 1 1024M 0 rom Lets say that sdb represents a drive that I want to completely wipe and jumble the data. The drive is a 5TB drive in this example. Write Zeros all over the drive dd if=/dev/zero of=/dev/sdb2 #Where sdb2 is the partition on your disk (sdb) you want to wipe. or Write random characters all over the drive dd if=/dev/urandom of=/dev/sdb2 #Where sdb2 is the partition on your disk (sdb) you want to wipe..
Recommended publications
  • How to Find out the IP Address of an Omron
    Communications Middleware/Network Browser How to find an Omron Controller’s IP address Valin Corporation | www.valin.com Overview • Many Omron PLC’s have Ethernet ports or Ethernet port options • The IP address for a PLC is usually changed by the programmer • Most customers do not mark the controller with IP address (label etc.) • Very difficult to communicate to the PLC over Ethernet if the IP address is unknown. Valin Corporation | www.valin.com Simple Ethernet Network Basics IP address is up to 12 digits (4 octets) Ex:192.168.1.1 For MOST PLC programming applications, the first 3 octets are the network address and the last is the node address. In above example 192.168.1 is network address, 1 is node address. For devices to communicate on a simple network: • Every device IP Network address must be the same. • Every device node number must be different. Device Laptop EX: Omron PLC 192.168.1.1 192.168.1.1 Device Laptop EX: Omron PLC 127.27.250.5 192.168.1.1 Device Laptop EX: Omron PLC 192.168.1.3 192.168.1.1 Valin Corporation | www.valin.com Omron Default IP Address • Most Omron Ethernet devices use one of the following IP addresses by default. Omron PLC 192.168.250.1 OR 192.168.1.1 Valin Corporation | www.valin.com PING Command • PING is a way to check if the device is connected (both virtually and physically) to the network. • Windows Command Prompt command. • PC must use the same network number as device (See previous) • Example: “ping 172.21.90.5” will test to see if a device with that IP address is connected to the PC.
    [Show full text]
  • Disk Clone Industrial
    Disk Clone Industrial USER MANUAL Ver. 1.0.0 Updated: 9 June 2020 | Contents | ii Contents Legal Statement............................................................................... 4 Introduction......................................................................................4 Cloning Data.................................................................................................................................... 4 Erasing Confidential Data..................................................................................................................5 Disk Clone Overview.......................................................................6 System Requirements....................................................................................................................... 7 Software Licensing........................................................................................................................... 7 Software Updates............................................................................................................................. 8 Getting Started.................................................................................9 Disk Clone Installation and Distribution.......................................................................................... 12 Launching and initial Configuration..................................................................................................12 Navigating Disk Clone.....................................................................................................................14
    [Show full text]
  • Problem Solving and Unix Tools
    Problem Solving and Unix Tools Command Shell versus Graphical User Interface • Ease of use • Interactive exploration • Scalability • Complexity • Repetition Example: Find all Tex files in a directory (and its subdirectories) that have not changed in the past 21 days. With an interactive file roller, it is easy to sort files by particular characteristics such as the file extension and the date. But this sorting does not apply to files within subdirectories of the current directory, and it is difficult to apply more than one sort criteria at a time. A command line interface allows us to construct a more complex search. In unix, we find the files we are after by executing the command, find /home/nolan/ -mtime +21 -name ’*.tex’ To find out more about a command you can read the online man pages man find or you can execute the command with the –help option. In this example, the standard output to the screen is piped into the more command which formats it to dispaly one screenful at a time. Hitting the space bar displays the next page of output, the return key displays the next line of output, and the ”q” key quits the display. find --help | more Construct Solution in Pieces • Solve a problem by breaking down into pieces and building back up • Typing vs automation • Error messages - experimentation 1 Example: Find all occurrences of a particular string in several files. The grep command searches the contents of files for a regular expression. In this case we search for the simple character string “/stat141/FINAL” in all files in the directory WebLog that begin with the filename “access”.
    [Show full text]
  • What Is UNIX? the Directory Structure Basic Commands Find
    What is UNIX? UNIX is an operating system like Windows on our computers. By operating system, we mean the suite of programs which make the computer work. It is a stable, multi-user, multi-tasking system for servers, desktops and laptops. The Directory Structure All the files are grouped together in the directory structure. The file-system is arranged in a hierarchical structure, like an inverted tree. The top of the hierarchy is traditionally called root (written as a slash / ) Basic commands When you first login, your current working directory is your home directory. In UNIX (.) means the current directory and (..) means the parent of the current directory. find command The find command is used to locate files on a Unix or Linux system. find will search any set of directories you specify for files that match the supplied search criteria. The syntax looks like this: find where-to-look criteria what-to-do All arguments to find are optional, and there are defaults for all parts. where-to-look defaults to . (that is, the current working directory), criteria defaults to none (that is, select all files), and what-to-do (known as the find action) defaults to ‑print (that is, display the names of found files to standard output). Examples: find . –name *.txt (finds all the files ending with txt in current directory and subdirectories) find . -mtime 1 (find all the files modified exact 1 day) find . -mtime -1 (find all the files modified less than 1 day) find . -mtime +1 (find all the files modified more than 1 day) find .
    [Show full text]
  • Netinfo 2009-06-11 Netinfo 2009-06-11
    Netinfo 2009-06-11 Netinfo 2009-06-11 Microsoft släppte 2009-06-09 tio uppdateringar som täpper till 31 stycken säkerhetshål i bland annat Windows, Internet Explorer, Word, Excel, Windows Search. 18 av buggfixarna är märkta som kritiska och elva av dem är märkta som viktiga, uppdateringarna finns för både servrar och arbetsstationer. Säkerhetsuppdateringarna finns tillgängliga på Windows Update. Den viktigaste säkerhetsuppdateringen av de som släpptes är den för Internet Explorer 8. Netinfo 2009-06-11 Security Updates available for Adobe Reader and Acrobat Release date: June 9, 2009 Affected software versions Adobe Reader 9.1.1 and earlier versions Adobe Acrobat Standard, Pro, and Pro Extended 9.1.1 and earlier versions Severity rating Adobe categorizes this as a critical update and recommends that users apply the update for their product installations. These vulnerabilities would cause the application to crash and could potentially allow an attacker to take control of the affected system. Netinfo 2009-06-11 SystemRescueCd Description: SystemRescueCd is a Linux system on a bootable CD-ROM for repairing your system and recovering your data after a crash. It aims to provide an easy way to carry out admin tasks on your computer, such as creating and editing the partitions of the hard disk. It contains a lot of system tools (parted, partimage, fstools, ...) and basic tools (editors, midnight commander, network tools). It is very easy to use: just boot the CDROM. The kernel supports most of the important file systems (ext2/ext3/ext4, reiserfs, reiser4, btrfs, xfs, jfs, vfat, ntfs, iso9660), as well as network filesystems (samba and nfs).
    [Show full text]
  • Linux Command Line Cheat Sheet by Davechild
    Linux Command Line Cheat Sheet by DaveChild Bash Commands ls Options Nano Shortcuts uname -a Show system and kernel -a Show all (including hidden) Files head -n1 /etc/issue Show distribution -R Recursive list Ctrl-R Read file mount Show mounted filesystems -r Reverse order Ctrl-O Save file date Show system date -t Sort by last modified Ctrl-X Close file uptime Show uptime -S Sort by file size Cut and Paste whoami Show your username -l Long listing format ALT-A Start marking text man command Show manual for command -1 One file per line CTRL-K Cut marked text or line -m Comma-separated output CTRL-U Paste text Bash Shortcuts -Q Quoted output Navigate File CTRL-c Stop current command ALT-/ End of file Search Files CTRL-z Sleep program CTRL-A Beginning of line CTRL-a Go to start of line grep pattern Search for pattern in files CTRL-E End of line files CTRL-e Go to end of line CTRL-C Show line number grep -i Case insensitive search CTRL-u Cut from start of line CTRL-_ Go to line number grep -r Recursive search CTRL-k Cut to end of line Search File grep -v Inverted search CTRL-r Search history CTRL-W Find find /dir/ - Find files starting with name in dir !! Repeat last command ALT-W Find next name name* !abc Run last command starting with abc CTRL-\ Search and replace find /dir/ -user Find files owned by name in dir !abc:p Print last command starting with abc name More nano info at: !$ Last argument of previous command find /dir/ - Find files modifed less than num http://www.nano-editor.org/docs.php !* All arguments of previous command mmin num minutes ago in dir Screen Shortcuts ^abc^123 Run previous command, replacing abc whereis Find binary / source / manual for with 123 command command screen Start a screen session.
    [Show full text]
  • Node and Edge Attributes
    Cytoscape User Manual Table of Contents Cytoscape User Manual ........................................................................................................ 3 Introduction ...................................................................................................................... 48 Development .............................................................................................................. 4 License ...................................................................................................................... 4 What’s New in 2.7 ....................................................................................................... 4 Please Cite Cytoscape! ................................................................................................. 7 Launching Cytoscape ........................................................................................................... 8 System requirements .................................................................................................... 8 Getting Started .......................................................................................................... 56 Quick Tour of Cytoscape ..................................................................................................... 12 The Menus ............................................................................................................... 15 Network Management ................................................................................................. 18 The
    [Show full text]
  • Networking TCP/IP Troubleshooting 7.1
    IBM IBM i Networking TCP/IP troubleshooting 7.1 IBM IBM i Networking TCP/IP troubleshooting 7.1 Note Before using this information and the product it supports, read the information in “Notices,” on page 79. This edition applies to IBM i 7.1 (product number 5770-SS1) and to all subsequent releases and modifications until otherwise indicated in new editions. This version does not run on all reduced instruction set computer (RISC) models nor does it run on CISC models. © Copyright IBM Corporation 1997, 2008. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents TCP/IP troubleshooting ........ 1 Server table ............ 34 PDF file for TCP/IP troubleshooting ...... 1 Checking jobs, job logs, and message logs .. 63 Troubleshooting tools and techniques ...... 1 Verifying that necessary jobs exist .... 64 Tools to verify your network structure ..... 1 Checking the job logs for error messages Netstat .............. 1 and other indication of problems .... 65 Using Netstat from a character-based Changing the message logging level on job interface ............. 2 descriptions and active jobs ...... 65 Using Netstat from System i Navigator .. 4 Other job considerations ....... 66 Ping ............... 7 Checking for active filter rules ...... 67 Using Ping from a character-based interface 7 Verifying system startup considerations for Using Ping from System i Navigator ... 10 networking ............ 68 Common error messages ....... 13 Starting subsystems ........ 68 PING parameters ......... 14 Starting TCP/IP .......... 68 Trace route ............ 14 Starting interfaces ......... 69 Using trace route from a character-based Starting servers .......... 69 interface ............ 15 Timing considerations ........ 70 Using trace route from System i Navigator 15 Varying on lines, controllers, and devices .
    [Show full text]
  • GNU Findutils Finding Files Version 4.8.0, 7 January 2021
    GNU Findutils Finding files version 4.8.0, 7 January 2021 by David MacKenzie and James Youngman This manual documents version 4.8.0 of the GNU utilities for finding files that match certain criteria and performing various operations on them. Copyright c 1994{2021 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled \GNU Free Documentation License". i Table of Contents 1 Introduction ::::::::::::::::::::::::::::::::::::: 1 1.1 Scope :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 1.2 Overview ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2 2 Finding Files ::::::::::::::::::::::::::::::::::::: 4 2.1 find Expressions ::::::::::::::::::::::::::::::::::::::::::::::: 4 2.2 Name :::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 2.2.1 Base Name Patterns ::::::::::::::::::::::::::::::::::::::: 5 2.2.2 Full Name Patterns :::::::::::::::::::::::::::::::::::::::: 5 2.2.3 Fast Full Name Search ::::::::::::::::::::::::::::::::::::: 7 2.2.4 Shell Pattern Matching :::::::::::::::::::::::::::::::::::: 8 2.3 Links ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 8 2.3.1 Symbolic Links :::::::::::::::::::::::::::::::::::::::::::: 8 2.3.2 Hard Links ::::::::::::::::::::::::::::::::::::::::::::::: 10 2.4 Time
    [Show full text]
  • Partition.Pdf
    Linux Partition HOWTO Anthony Lissot Revision History Revision 3.5 26 Dec 2005 reorganized document page ordering. added page on setting up swap space. added page of partition labels. updated max swap size values in section 4. added instructions on making ext2/3 file systems. broken links identified by Richard Calmbach are fixed. created an XML version. Revision 3.4.4 08 March 2004 synchronized SGML version with HTML version. Updated lilo placement and swap size discussion. Revision 3.3 04 April 2003 synchronized SGML and HTML versions Revision 3.3 10 July 2001 Corrected Section 6, calculation of cylinder numbers Revision 3.2 1 September 2000 Dan Scott provides sgml conversion 2 Oct. 2000. Rewrote Introduction. Rewrote discussion on device names in Logical Devices. Reorganized Partition Types. Edited Partition Requirements. Added Recovering a deleted partition table. Revision 3.1 12 June 2000 Corrected swap size limitation in Partition Requirements, updated various links in Introduction, added submitted example in How to Partition with fdisk, added file system discussion in Partition Requirements. Revision 3.0 1 May 2000 First revision by Anthony Lissot based on Linux Partition HOWTO by Kristian Koehntopp. Revision 2.4 3 November 1997 Last revision by Kristian Koehntopp. This Linux Mini−HOWTO teaches you how to plan and create partitions on IDE and SCSI hard drives. It discusses partitioning terminology and considers size and location issues. Use of the fdisk partitioning utility for creating and recovering of partition tables is covered. The most recent version of this document is here. The Turkish translation is here. Linux Partition HOWTO Table of Contents 1.
    [Show full text]
  • The Ultimate Guide to Hard Drive Partitioning
    Home SQL Server Cloud Computing Windows Server Cisco Exchange Windows 7 Active Directory Virtualization Forums IT Job Board Get Our FREE Newsletter! Search Site Gain access to white The Ultimate Guide to Hard Drive Partitioning papers, special offers and by Daniel Petri - March 11, 2009 the most recent IT tips! Printer Friendly Version Sponsors Email Address Disk partitioning divides the data storage space of a hard disk into separate areas referred to as Sign Up Now! Windows Application 'partitions'. Partitions are usually created when the hard disk is first being prepared for usage. Once a Monitoring Made Easy disk is divided into partitions, directories and files may be stored on them. Because of later changes on Quick Links the computer and operating system, often an administrator or power user will be faced with the need to Knowledge Base resize partitions, create new partitions in the unallocated space, and sometimes even undelete Take the guesswork out of Backup & Storage partitions that were previously removed or deleted. which WMI counters to use Security for apps like Microsoft® Active Directory Active Directory™ and Cisco and Routing Hard disk partitioning tools will allow you to create additional partitions from existing ones by resizing SharePoint™. SolarWinds Windows Networking FREE WMI Monitor makes it Exchange Server the existing partitions and creating empty, un-used space on which you can create new partitions. The easy! Download this FREE Virtualization desktop tool now! Windows Server 2008 most important aspect of such tools is their ability to do this without losing your data that is currently on Windows 7 your existing partitions.
    [Show full text]
  • Testdisk Step by Step
    TestDisk Step By Step Jump to: navigation, search More Sharing Services Share Share on facebookShare on twitter Share on linkedinShare on tumblrShare on stumbleuponShare on redditShare on email This recovery example guides you through TestDisk step by step to recover a missing partition and repair a corrupted one. After reading this tutorial, you should be ready to recover your own data. Translations of this TestDisk manual to other languages are welcome. Contents 1 Example problem 2 Symptoms 3 Running TestDisk executable 4 Log creation 5 Disk selection 6 Partition table type selection 7 Current partition table status 8 Quick Search for partitions 9 Save the partition table or search for more partitions? 10 A partition is still missing: Deeper Search 11 Partition table recovery 12 NTFS Boot sector recovery 13 Recover deleted files Example problem We have a 36GB hard disk containing 3 partitions. Unfortunately; the boot sector of the primary NTFS partition has been damaged, and a logical NTFS partition has been accidentally deleted. This recovery example guides you through TestDisk, step by step, to recover these 'lost' partitions by: rewriting the corrupted NTFS boot sector, and recovering the accidentally deleted logical NTFS partition. Recovery of a FAT32 partition (instead of an NTFS partition) can be accomplished by following exactly the same steps. Other recovery examples are also available. For Information about FAT12, FAT16, ext2/ext3, HFS+, ReiserFS and other partition types, read Running the TestDisk Program. One condition: TestDisk must be executed with Administrator privileges. Important points for using TestDisk: To navigate in TestDisk, use the Arrow and PageUp/PageDown keys.
    [Show full text]