LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Forgot how I imaged my hard drive, dd, ddrescue, ntfsclone??? (http://www.linuxquestions.org/questions/linux-software-2/forgot-how-i-imaged-my-hard-drive-dd-ddrescue-ntfsclone-4175446991/)

antares4141 01-24-2013 01:53 AM

Forgot how I imaged my hard drive, dd, ddrescue, ntfsclone???
 
1 Attachment(s)
Been three years since I did it. I split an 80gb drive up between 9 .img files I vaguely remember doing it but don't remember anything more than that.

I suspect whatever command I used automatically split the files but I might have did the "skip" "seek" thing. They are compressed.

I was able to restore the image to the original 80gb drive (sda)
Quote:

cat file.000 file.001 file.002 file.003 etc. | gunzip -c | dd of=/dev/sda conv=sync,noerror bs=64K
but it was not readable. So I formatted it and than tried dd to (sda1) the drive was no longer readable. No error's (both times) it finished completely.
Quote:

76848496640 (77gb) copied, 1015.14 s, 75.7 mb/s
tried joining the files with cat and piping to gzip got a 33gb image file. tried ntfsclone on that unfortunately I don't remember the error I got.
what's odd is how dd managed to copy 77gb to the drive when the uncompressed version of the file was only 33gb.

also tried

Quote:

cat file.000 file.001 file.002 etc. | gunzip -c | ntfsclone --restore-image --overwrite /dev/sda1 -
also tried

cat file.* | gunzip -c | ntfsclone -r -O /dev/sda1

I should have kept a pad handy to write down all the errors but didn't think of it at the time. Neither command worked.

If I search enough I might find the page I used as a template to generate the files but was hoping maybe somebody is familiar enough with ntfsclone to know what I did wrong. (assuming it's a ntfsclone file)

It could be ddrescue tried that also and it said something to the effect no input output file:

cat file.000 file.001 file.002 etc. | gunzip -c | ddrescue /dev/sda1

Used trinity rescue disk both to generate the file and in my attempt to recover it.

Robert Christ

business_kid 01-24-2013 12:54 PM

I'll guess that you copied the files, not the blank space, with something like
mount /dev/sda1 /mnt
cp -a /mnt/* |split=whatever blah blah
or
tar -czf backup.tar.gz /mnt/* |split =2G (That was a kernel limit at some point)

I would run file on them all, and see if it recognises any signatures of a file type.
file *.00?

antares4141 01-24-2013 05:29 PM

Quote:

Originally Posted by business_kid (Post 4876857)
I would run file on them all, and see if it recognizes any signatures of a file type.
file *.00?

Running file on any one of the 9 individual compressed files just showed they were generated with gzip but I still had the 33gb decompressed file that I joined together using the cat piped to gzip and I ran file on that:
Quote:

partimage file version 0.6.1 volume 0 type ntfs device /dev/sda1 original filename hp-win-back.img gzip compressed
Solved Thanks!

Robert Christ

rknichols 01-24-2013 10:56 PM

Those "file.000" "file.001" ... names are how partimage breaks up its output files. You do not want to combine them yourself. Just give partimage the name of the first file, and it will continue on with the others. The files will need to have their original names. Embedded in each file is the name of the next one in the sequence, but you do get a chance to provide an alternate name whenever a name is not found.


All times are GMT -5. The time now is 05:04 PM.