Thursday, February 20, 2014

clonezilla & dirty disks

yeah okay. so my helpdesk guy was out and i had to do things not systems-based.
I had an enduser which required the transfer of the contents of his larger physical drive to a Crucial solidstate drive.  
He is using a Lenovo X230.  His original drive was 500G and his new drive is 480G.

The standard procedure when using clonezilla is to:
1.  Make a failsafe backup of his original drive prior to any imaging.  Done
2.  Using gpartd, shrink original drive Windows7_OS partition 
(provided the partition is not full) to less than that of the new drive; if it is, 
then we use something to make data contiguous.   In this case, I shrank the partition to 450G.
3.  Boot the system and allow for the issurance of chkdsk.  Cleanly shut down system.  
In my case chkdsk flashed and closed.  Okay…
4.  Do a disk-to-disk copy.  Done.

For whatever reason, the drive was not marked as cleanly shut down and after 4, 
when I booted the system up, I received a BSOD.  Man!

So, I restored the original to another disk.  Well.  Since this is an X230, it has one of those spiffy slim-drives… anyway.  
It required a chkdsk, which prematurely ended. I did not have the patience to figure this out, so I proceeded to do a 
low-level dd to the new drive.    Despite the partition running over, the system did come up.  chkdsk came up and prematurely ended.

On the live system, I ran:
fsutil dirty query C:
The query had shown that C: was indeed dirty; the root of all problems!  

Since chkdsk /f /r was not working upon system boot, I created an ERD 6.5 x64 bootable CD - for this 
I required the MS Desktop Optimization Suite and a Windows7 disk.
I created the disk and booted, and selected 'command line'. 
For whatever reason ERD 6.5 does not have fsutil.  So, I went to the system's drive and issued fsutil 
and found that the system drive disk was dirty.
I issued chkdsk /f C: (recovery partition on a Levono) sans errors (awesome).  I then issued chkdsk /f D: 
(the system drive) and indeed there were bitmap errors.
After doing its fixes, chkdsk is supposed to mark the drive as clean.  I issued fsutil and all was well.

I rebooted the system and all was well.

Thus, the lesson learned is despite a system coming down clean prior to re-imaging, step .5 & 3.5 should be 
to issue fsutil and remedy.

No comments: