Ubuntu Newbie...need to clone drive and store data on external drive
Guys, I am new to this site but just desperate enough to put this whole story out to see if anyone can help.
I have a pc loaded with windows, I am booting with a Ubuntu cd I burned from a downloaded iso. I have connected the drive that I wish to copy and a 500gb external drive and they are both seen. The drive I wish to copy is present but not recognized. (I don't know if that is an issue for this particular situation or not). Without going into too many details, I wish to clone/create a disk image of the attached drive much like an iso and then restore it at a later time. There is data on the external drive so I don't want to risk losing it. I was told that I could use the dd command to accomplish this but I know NOTHING about Linux or Unix. I am looking for a "hand holding" moment here as I attempt this. I have seen some very detailed and helpful threads on this site and was convinced that someone here could help. Let me be very clear, I know NOTHING about Linux/Unix. You cannot be too detailed or condescending in your replies. The disk I am attempting to copy has some very important data on it and I must save it. Thanks, Mike31718 |
Quote:
|
Quote:
Also posting the output of PHP Code:
open a terminal (probably under applications) type the command, then copy and paste the output in your reply. |
Quote:
|
Quote:
The PC drive shows up as /dev/sdb The attached drive shows up as /dev/sda The external drive shows up as /dev/sdc Hope this helps... |
Each disk has one partition? sda1, sdb1, sdc1? What file system is the unrecognized drive formatted for?
|
Quote:
|
dd doesn't need to know. I was curious. Here's a good link for you.
http://www.linuxweblog.com/dd-image It shouldn't be hard to adjust the commands there. Just for reference there are some really handy tools for backing up and restoring disks. My favorite is FSArchiver which is found on the SystemRescueCD available at http://www.sysresccd.org/Main_Page http://www.fsarchiver.org/Main_Page But dd will definitely do what you want. |
[QUOTE=damgar;3868938]dd doesn't need to know. I was curious. Here's a good link for you.
http://www.linuxweblog.com/dd-image It shouldn't be hard to adjust the commands there. Now we get to the crux of the issue. I don't understand the commands that are present on the link you sent me. I need to be sure that whatever I am doing is not going to effect the external drive that I have attached to the machine. Will it write to a specified folder or simply write openly to the USB drive that I attached? I have to be very cautious at this point before I attempt this. PC drive shows up as /dev/sdb Attached drive shows up as /dev/sda (drive to be copied) External (USB)drive shows up as /dev/sdc (target for data storage) With these identified, how do you see these commands...correct/need changes? It says to mount the USB drive but do I have to since Ubuntu can already see it? -t vfat /dev/sdc1 /mnt/sdc1 Then the backup (where does the "hda" come into play?) # dd if=/dev/hda conv=sync,noerror bs=64k | gzip -c > /mnt/sdc1/hda.img.gz Then to restore # gunzip -c /mnt/sdc1/hda.img.gz | dd of=/dev/hda conv=sync,noerror bs=64k |
Quote:
PHP Code:
Once you have the drive mounted in say /mnt/BACKUP then you can do something like: Code:
#create backup directory Quote:
I still prefer FSArchiver when it can be used, because it is only going to copy the USED blocks of the disk, thus saving a ton of space even before the compression stage. There are a number of good tutorials on the links I posted above. |
Mike31718,
You could try using a Clonezilla live CD. This is a live CD that you run from the cdrom drive similar to the Ubuntu live CD. Clonezilla can clone a hard drive for you. Read about Clonezilla here: http://clonezilla.org/ The Clonezilla live CD is here: http://clonezilla.org/clonezilla-live/ And examples of how to use Clonezilla is here: http://clonezilla.org/clonezilla-live/doc/ I have never actually used CLonezilla. I have read it works well though. |
[QUOTE=damgar;3869640]Once you have the drive mounted in say /mnt/BACKUP then you can do something like:
Code:
#create backup directory This is from the how-to that I modified to be specific for your case. It explains what all the options meanQUOTE] I really appreciate that you are being so detailed and have attempted to explain all of this. However, before I do this, I have to be very clear with what I am doing. The reason that I am having to do this a certain way is that I am salvaging my Directv harddrive that contains data that I cannot lose. In my research, "Unix dd" is the only successful way to be able to capture the data and restore it to the disk without the machine knowing what has happened. I am not pirating anything, this is a result of stupidity on my part that I mistakenly started the machine resetting the default settings which would have wiped out the harddrive if I had not intervened to save it. I need to capture the data from the disk, place the disk back in the machine and let it do it's re-format, and then be able to restore the image to the disk. This is why I am trying to be very cautious. I do need the "bit by bit" solution that dd offers so that the machine will recognize the disk. I have questions about what you sent me so please give me further explanation... I tried running the command that you gave me and I get access denied on the "sda" drive. Do I need to somehow mount it as well? Remember, I don't want to effect the data on this disk at all. Please sent me the mounting commands. Thanks. |
You will probably have to append sudo to the dd command like
Code:
sudo dd if=/dev/sda conv=sync,noerror bs=64K | gzip -c > /mnt/BACKUP/backup_images/attached_disk.img.gz Code:
sudo ls -alt /dev/sda And still further you might have to do Code:
sudo chmod -R 777 /dev/sda I would like to know if any of this actually works for you in the end since I sometimes contract for satellite TV providers and have been asked questions 1919123918247912 times regarding what you are attempting to do. |
Guys,
I have decided to seek Professional Help on this. I cannot get this to work on my own so I think it is time. I appreciate all the input you have made in this effort and will post the results to this forum when the diagnosis is in. Again, thank you for your patience as I dealt with this. Mike31718 |
Quote:
So it's the end of the road folks. The professional help says that the data was severed when the machine attempted to reformat the disk. To pursue this further is too cost prohibitive. The only possibility is forensic restoration and I don't know anyone even capable of that. So thank you for your efforts. May God bless you as you bless others with your knowledge. Thanks again, Mike31718 |
All times are GMT -5. The time now is 08:30 AM. |