using "dd" to rescue a system with a failing driveFrom john-at-johnmeister.com/linux Thu Oct 10 09:32:40 2013 Date: Thu, 10 Oct 2013 09:32:33 -0700 (PDT) Subject: rescue in process... HOW TO RESCUE A MICROSOFT (or any computer) SYSTEM with a FAILED or FAILING DRIVE using Linux and the "dd" command: (see additional notes below) 1) pull dead drive from failed Microsoft system 2) place in freezer (at least an hour or two) 3) insert into BlacXduet dual sata USB gizmo (or related SATA connectors so both are attached to a Linux system) 4) attach to Linux system 5) su - # (become root user) 6) script copy-w-dd-10oct2013.raw (use "script" to document and record steps, when finished type exit ; cat copy-w-dd-10oct2013.raw | col -b > copy-w-dd-10oct2013.txt ) 7) fdisk -l 8)dd if=/dev/sda of=/dev/sdb (NOTE, very, important, get the devices correct!!!) real world extract fdisk (excluding root drives): Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00051c12 Device Boot Start End Blocks Id System /dev/sdc1 16065 102398309 51191122+ f W95 Ext'd (LBA) /dev/sdc2 * 102398310 1953520064 925560877+ 7 HPFS/NTFS/exFAT /dev/sdc5 16128 102398309 51191091 7 HPFS/NTFS/exFAT Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0004b263 Device Boot Start End Blocks Id System /dev/sdd1 * 2048 1949333503 974665728 83 Linux /dev/sdd2 1949335550 1953523711 2094081 5 Extended /dev/sdd5 1949335552 1953523711 2094080 82 Linux swap / Solaris ------------------------------------------------ root@LOVING-LINUX -root- [/root] ------------------------------------------------ --> echo "dd if=/dev/sdc of=/dev/sdd" dd if=/dev/sdc of=/dev/sdd ------------------------------------------------ root@LOVING-LINUX -root- [/root] ------------------------------------------------ --> dd if=/dev/sdc of=/dev/sdd ------------------------------------------------ dd: reading `/dev/sdc': Input/output error 43184776+0 records in 43184776+0 records out 22110605312 bytes (22 GB) copied, 4404.01 s, 5.0 MB/s ------------------------------------------------ --> fdisk -l ------------------------------------------------ Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00051c12 Device Boot Start End Blocks Id System /dev/sdc1 16065 102398309 51191122+ f W95 Ext'd (LBA) /dev/sdc2 * 102398310 1953520064 925560877+ 7 HPFS/NTFS/exFAT /dev/sdc5 16128 102398309 51191091 7 HPFS/NTFS/exFAT Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00051c12 Device Boot Start End Blocks Id System /dev/sdd1 16065 102398309 51191122+ f W95 Ext'd (LBA) /dev/sdd2 * 102398310 1953520064 925560877+ 7 HPFS/NTFS/exFAT /dev/sdd5 16128 102398309 51191091 7 HPFS/NTFS/exFAT ------------------------------------------------ 9) note that I use the "echo" command often, this places the text into a clear field in my "script" file. 10) this process will run for HOURS, maybe days... dd copies files block by block from one 1TB drive to another... 11) The frozen drive is WORKING on Linux... but I didn't even attempt to try it on Microsoft... it'll only corrupt the File Allocation Table (FAT). 12) Lord willing and the penguins cooperative, I will have a perfect bootable copy of my XP system on /dev/sdd when this is done... the lights are blinking... aiming a fan at the dying drive, opening a window and heading off to support the next IT crisis... :) rescuing a Microsoft Windows XP (or any version) machine with a failed hard drive... the hard drive is failed and unreadable to any Microsoft system... after it's been frozen it may work for a few hours afterwards... but it will be unreliable, do NOT waste time... get it copied ASAP... copying from one windows system to another will NOT work properly as there are locked files, corruption will occur... this technique may require a fix with the install media, and if this were Win7 you'll likely need to re-register the cursed operating system because it'll see the difference in the hardware, even if you use the same brand hard drive... it likely records the drive serial number... if you can find it in the registry you may be able to fix it... but some of this stuff is in the security module and not editable... sneaky buggers there in redmond... think they'd expend some of that creativity to maintain legacy features that actually work for the power users... Anyway... my Windows XP system is on the path to recovery... here's the steps involved... even if there is a power failure or errant human interaction, the dead drive can possibly be refrozen and this attempted again. the Linux dd command does NOT corrupt the "if" or input file, it copies it to the "of" our output file. This will even work on encrypted drives. It's not reading anything, it's copying block by block at the lowest level. ----- ---------------------------------------------------------------------------- -o|||||o- Linux: the choice of a GNU generation Snohomish, WA- where Jeeps don't rust, they mold ---------------------------------------------------------------------------- |
|
Wagoneers FULL SIZE JEEPS JeepMeister "Jeep is America's -Enzo Ferrari MeisterTech Diesels + |
One Page Overview of Linux Commands click for an image of the 5 essential Linux commands An Intro to Linux |
at Midway Auto on SR9 in Snohomish, or at Northland Diesel in Bellingham, WA |