Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 17823  / 3 Years ago, sun, june 20, 2021, 1:30:25

I recently wiped my hard disk with a fresh Ubuntu installation. I'm planning to use Testdisk to recover the files.



However, since I do not have prior experience, I feel it would be safer if I could keep an image of the hard drive as well. That way, I can work on the image to avoid wrecking the original drive even more.



I have two questions:



1) Could you suggest a tool for the same?



2) Since I need the image for recovery, I don't want to overwrite the hard disk anymore than it already has been. Hence, could you comment if the tool would affect the hard drive in any way (if it is run via a usb)?


More From » hard-drive

 Answers
5

You need to have some things prepared first:




  • your original hard-drive from where you will read all the bits (you have this one, obviously);

  • a separate hard-drive where you will write the backup - this one needs to be already partitioned & formatted and must have ENOUGH free space to host your backup file (if your original hard-drive has 80 GB, you must have at least 80 GB free on a partition of the backup hard-drive to create the backup);

  • a Linux LiveCD/LiveDVD/LiveUSB to boot from - it must have the "dd" utility. I guess using the CD/DVD/USB you already used to install Ubuntu should be ok.



Steps:



1) make sure both hard-drives are connected to the computer you will be using;



2) boot from the LiveCD/LiveDVD/LiveUSB and check what drive is what - let's say from now on that original drive is sda and backup drive is sdb. Let's also say the backup drive has only 1 partition, sdb1.



3) make sure nothing from sda is mounted;



4) make sure the backup partition (/dev/sdb1) is mounted (let's say to /media/sdb1);



5) you need to run from a terminal the "dd" command like this (it means: "copy bit-by-bit the whole sda hard-drive to file backup.img in /media/sdb1 using a block-size of 1 MB"):



dd if=/dev/sda of=/media/sdb1/backup.img bs=1M


Please know that, depending on your original drive size, step 5) will take less or more (or a lot of) time.



Good luck and let us know what happens!



Note: you can always restore from the backup file by using:



dd if=/media/sdb1/backup.img of=/dev/sda bs=1M


Again, please make sure to check what drive is what - sdb is the backup drive, sda is the drive where the backup will be restored.


[#30572] Sunday, June 20, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
corsee

Total Points: 479
Total Questions: 122
Total Answers: 106

Location: Barbados
Member since Sat, May 9, 2020
4 Years ago
;