-
Imaging hard drive mistake
From http://www.knoppix.net/docs/index.ph...veUsingKnoppix
Image hard drive to Windows/Samba share:
Execute the following command, making necessary changes for your system
dd if=/dev/hda | split -b 100000000 - /mnt/remote_share/mypc_hda.img.
(Note: the period at the end is significant.)
Question (says she, trying not to panic): If you (or your dear boyfriend, actually) forgot to put the period at the end, what can be done to recover the contents of the harddrive you've imaged? All of the data seems to be there (the same number of GBs that were on the source drive) but due to the absence of period, the files are all over the place.
Eek! (deep breaths, must...take...deep breaths...)
-
Senior Member
registered user
Re: Imaging hard drive mistake
--Ah, I think I see what you're saying. W/o that period on the end, all the "split" prefixes are right after the .img part of the filename.
--Post about 3-5 sample filenames from /mnt/remote_share/ and we'll see what can be done. Is the original HD unusable for some reason?

Originally Posted by
remya
From
http://www.knoppix.net/docs/index.ph...veUsingKnoppix
Image hard drive to Windows/Samba share:
Execute the following command, making necessary changes for your system
dd if=/dev/hda | split -b 100000000 - /mnt/remote_share/mypc_hda.img.
(Note: the period at the end is significant.)
Question (says she, trying not to panic): If you (or your dear boyfriend, actually) forgot to put the period at the end, what can be done to recover the contents of the harddrive you've imaged? All of the data seems to be there (the same number of GBs that were on the source drive) but due to the absence of period, the files are all over the place.
Eek! (deep breaths, must...take...deep breaths...)
-
File names
mypc_hda.imgaa, ...._hda.imgab, .imgac, etc.. are the file names.
And yes, the hard drive has been formatted in the meantime.
Thanks!
-
Senior Member
registered user
Re: File names

Originally Posted by
remya
mypc_hda.imgaa, ...._hda.imgab, .imgac, etc.. are the file names.
And yes, the hard drive has been formatted in the meantime.
Thanks!
That is how they should look you just ended up with the mypc_hda.img in front of the parts instead of the default x that would have been used to put the file back together cat mypc_hda.imgaa mypc_hda.imgab mypc_hda.imgac > mypc_hda.img just put all the parts on the line in the correct order eg. the aa, ab,ac,ad,ae .... on the end before the > mypc_hda.img and you will have the one big image again.
-
Senior Member
registered user
--Actually you shouldn't even have to specify every single part; bash filename completion should auto-sort the parts for you. Test this by:
' echo mypc_hda.img* ' (without the quotes)
Example:
Code:
/mnt/squid/cache # l
total 2963
drwxr-x--x 66 nobody nogroup 1656 Dec 19 23:41 ./
drwxr-xr-x 4 nobody nogroup 688 Dec 20 00:01 ../
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 00/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 01/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 02/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 03/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 04/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 05/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 06/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 07/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 08/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 09/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 0A/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 0B/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 0C/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 0D/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 0E/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 0F/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 10/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 11/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 12/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 13/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 14/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 15/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 16/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 17/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 18/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 19/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 1A/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 1B/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 1C/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 1D/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 1E/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 1F/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 20/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 21/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 22/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 23/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 24/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 25/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 26/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 27/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 28/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 29/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 2A/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 2B/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 2C/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 2D/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 2E/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 2F/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 30/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 31/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 32/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 33/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 34/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 35/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 36/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 37/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 38/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 39/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 3A/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 3B/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 3C/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 3D/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 3E/
drwxr-xr-x 130 nobody nogroup 3120 May 5 2003 3F/
-rw-r--r-- 1 nobody nogroup 2800992 Dec 25 23:06 swap.state
-rw-r--r-- 1 nobody nogroup 0 Dec 19 23:41 swap.state.last-clean
[ p233 (scrn=) ]
829 root /mnt/squid/cache # echo *
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F swap.state swap.state.last-clean
--So all you (should) have to do is ' cat ' with a wildcard and it should all fall into place. IIRC the "split" program has deliberate naming to allow sorting by default.
--DO NOT, however, trust blindly to this.
Run a test 1st before you try restoring this way on a "production" machine. Hopefully the lack of a period won't be so significant after all
Similar Threads
-
By Ezor in forum General Support
Replies: 3
Last Post: 12-14-2004, 01:59 AM
-
By Bodhi in forum General Support
Replies: 3
Last Post: 12-11-2004, 02:19 AM
-
By kidsatacrux in forum MS Windows & New to Linux
Replies: 19
Last Post: 08-03-2004, 07:41 AM
-
By rkebo in forum Tips and Tricks
Replies: 1
Last Post: 09-21-2003, 04:44 AM
-
By asjones in forum General Support
Replies: 2
Last Post: 09-07-2003, 12:51 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM
$699.00

Dell PowerEdge FC430 Blade Server 2x Xeon E5-2630v4 20 Cores FX2 FX2s No RAM/HDD
$119.99

Dell PowerEdge M630 Blade Server 2x Xeon E5-2680 v4, 2F3MP , 4GDP5 ,R10KJ ,JVFVR
$140.00

Dell PowerEdge M640 Blade Barebone Server Dell P/N: HHB006 Tested Working
$149.99

Dell Poweredge C6400 24x 2.5’’ 2x 2400W 4x C6420 Nodes H330 | 2x SFP | 8x Trays
$799.99

Dell PowerEdge M620 Blade Server 2x Xeon E5-2680v2 2.8ghz 20-Cores | 128GB
$149.99

Cisco B200 M3 2x E5-2670V2 10 Core 8x 16GB-128GB Ram Blade Server VIC1240 14900R
$399.00

NETAPP HCI NAF-1701 SuperMicro Server 4X BLADE H410C 8X GOLD 5120 4 NODE SERVER
$1499.97

Dell Poweredge VRTX 25Bay 2.5" 2x PERC 8, 2xCMC, I/O 1GB Pass Through, 4x PS
$578.08

Dell PowerEdge M620 Blade Server 2x Xeon E5-2680v2 256GB DDR3 RAM NO HDD
$349.99