<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Some stuff &#187; external usb drive</title>
	<atom:link href="http://blog.yhuang.org/?feed=rss2&#038;tag=external-usb-drive" rel="self" type="application/rss+xml" />
	<link>https://blog.yhuang.org</link>
	<description>here.</description>
	<lastBuildDate>Wed, 27 Aug 2025 08:50:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Useful information (Appendix)</title>
		<link>https://blog.yhuang.org/?p=47</link>
		<comments>https://blog.yhuang.org/?p=47#comments</comments>
		<pubDate>Mon, 08 Jan 2007 03:24:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Appendix]]></category>
		<category><![CDATA[ddrescue]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[ext]]></category>
		<category><![CDATA[ext2 file system]]></category>
		<category><![CDATA[ext2 partition]]></category>
		<category><![CDATA[ext2 partitions]]></category>
		<category><![CDATA[external usb drive]]></category>
		<category><![CDATA[hard disk recovery]]></category>
		<category><![CDATA[recovery]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=47</guid>
		<description><![CDATA[This is part of the hard disk recovery documentation. Appendix. Here are all the tools that made an arguably irreplaceable contribution in the recovery: Knoppix CD ddrescue DiskProbe fsstat (part of Knoppix) ext2 Installable File System (use with caution, as it may crap on your ext2 partition) Mount Image Pro vdk nfi chkdsk (part of [...]]]></description>
			<content:encoded><![CDATA[<p>This is part of the hard disk recovery documentation.</p>
<p>Appendix.</p>
<p>Here are all the tools that made an arguably irreplaceable contribution in the recovery:</p>
<ul>
<li><a href="http://www.knoppix.org/">Knoppix CD</a></li>
<li><a href="http://ftp.gnu.org/gnu/ddrescue/">ddrescue</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?familyid=49AE8576-9BB9-4126-9761-BA8011FABF38&#038;displaylang=en">DiskProbe</a></li>
<li>fsstat (part of Knoppix)</li>
<li><a href="http://www.fs-driver.org/download.html">ext2 Installable File System</a> (use with caution, as it may crap on your ext2 partition)</li>
<li><a href="http://www.mountimage.com/download-computer-forensics-software.php">Mount Image Pro</a></li>
<li><a href="http://chitchat.at.infoseek.co.jp/vmware/vdk.html">vdk</a></li>
<li><a href="http://support.microsoft.com/kb/253066">nfi</a></li>
<li>chkdsk (part of Windows XP)</li>
<li>ntbackup (part of Windows XP)</li>
<li><a href="http://www.elcomsoft.com/aefsdr.html">Advanced EFS Data Recovery</a></li>
</ul>
<p><span id="more-47"></span><br />
Here are some additional links that I looked at, with more information:</p>
<ul>
<li><a href="http://geeksaresexy.blogspot.com/2005/12/hard-drive-recovery-utilities-when-you.html">Hard disk recovery utilities</a></li>
<li><a href="http://www.ngine.de/index.jsp?pageid=4176">Installing XP on external USB drive</a></li>
<li><a href="http://www.pcinspector.de/file_recovery/uk/faq.htm">&#8220;PC Inspector&#8221; recovery software</a></li>
<li><a href="http://www.stellarinfo.com/">&#8220;Stellar&#8221; recovery software</a></li>
<li><a href="http://geschonneck.com/security/forensics/">Forensics tools</a></li>
<li><a href="http://freshmeat.net/projects/addrescue/?branch_id=52446&#038;release_id=243389">ddrescue documentation</a> and <a href="http://serverfault.com/questions/4906/using-dd-for-disk-cloning">discussion</a></li>
<li><a href="http://www.kernel.org/pub/dist/knoppix-dvd/knoppix-cheatcodes.txt">Knoppix boot options</a></li>
<li><a href="http://www.linuxquestions.org/questions/showthread.php?t=485322">Tips on NTFS recovery from ddrescue image and log</a></li>
<li><a href="http://www.ntfs.com/ntfs.htm">NTFS file system description</a></li>
<li><a href="http://www.linux-ntfs.org/content/view/104/43/">More technical information about NTFS</a></li>
<li><a href="http://www.science.unitn.it/~fiorella/guidelinux/tlk/node95.html">Ext2 file system description</a> (I only found the section entitled &#8220;The ext2 Group Descriptor&#8221; to be helpful. I put little trust in the correctness of the rest.)</li>
<li><a href="http://oss.oracle.com/projects/ocfs2/dist/documentation/disklayout.pdf">Disk layout of ext2 and ocfs2</a> (The data structures and the example of what the Group Descriptor Table were useful. The rest like the &#8220;first data block&#8221; value is different from what is observed &#8212; although the examples use a block size of 1KB, which may make a difference.)</li>
</ul>
<p>For the record, here are the two external disks I have with their ext2 partitions&#8217; Superblocks shown:</p>
<p>100GB disk, just one ext2 partition, starts at sector 63.<br />
<img src="wp-content/uploads/images/sector1.png"/></p>
<p>160GB disk, there is a 20GB FAT32 partition, and the second ext2 partition starts at sector 41945715. This is the partition whose backup superblocks are all off by +1KB (but are otherwise correct), and hence has an illegal formatting.<br />
<img src="wp-content/uploads/images/sector2.png"/></p>
<p>And here are the ddrescue log files, from the <a href="wp-content/uploads/rescue1.log">first run</a> and the <a href="wp-content/uploads/rescue2.log">second run</a>.</p>
<p>Back to <a href="http://scripts.mit.edu/~zong/wpress/?p=35">the beginning</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=47</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>The tide turns (part 5)</title>
		<link>https://blog.yhuang.org/?p=45</link>
		<comments>https://blog.yhuang.org/?p=45#comments</comments>
		<pubDate>Thu, 28 Dec 2006 15:13:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[ext]]></category>
		<category><![CDATA[ext2 partition]]></category>
		<category><![CDATA[external usb drive]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[knoppix linux]]></category>
		<category><![CDATA[letter]]></category>
		<category><![CDATA[mode]]></category>
		<category><![CDATA[ntfs partition]]></category>
		<category><![CDATA[seagate drive]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=45</guid>
		<description><![CDATA[This is part of the hard disk recovery documentation. Part 5. The tide turns (rather quickly) After the exceedingly annoying but ultimately inconsequential ext2 interlude, I&#8217;m back on track with the original problem of recovering data from the broken Seagate drive. After the disaster with file-copying using the Windows ext2ifs driver last time, I made [...]]]></description>
			<content:encoded><![CDATA[<p>This is part of the hard disk recovery documentation.</p>
<p>Part 5.</p>
<p><font color="#770033"><br />
The tide turns (rather quickly)</p>
<p>After the exceedingly annoying but ultimately inconsequential ext2 interlude, I&#8217;m back on track with the original problem of recovering data from the broken Seagate drive.</font><br />
<span id="more-45"></span><br />
<font color="#770033">After the disaster with file-copying using the Windows ext2ifs driver last time, I made sure to make a copy of the disk image while the external USB drive holding it was mounted under Knoppix Linux. The destination was another external drive formatted with ext2.</p>
<p>Then I took the copy of the image under Windows. This way I didn&#8217;t care what the ext2ifs driver wanted to do. But this time it didn&#8217;t mangle the partition (probably because this ext2 partition actually has a legal physical formatting!).</p>
<p>Finally I can run NTFS tools on the broken disk, but I need to mount the (broken) NTFS image first. There is a free tool, <a href="http://www.acc.umu.se/~bosse/">FileDisk</a> by Bo Branten, to do this. Unfortunately, it gives a drive letter to the whole disk, instead of to the partitions. This is nearly impossible to work with because (1) there are 63 sectors of MBR, partition table, and filler at the front of the disk, and (2) there is the Dell diagnostic partition. And FileDisk doesn&#8217;t virtualize a physical disk device, which would be the more correct metaphor.</p>
<p>A way around this is to use VMWare, and virtualize the disk image as a disk. But no, that&#8217;s too much trouble&#8230; although, after this incident, I&#8217;m really considering putting a VMWare image with Windows preinstalled onto a DVD or something &#8212; that would be the complement to Knoppix.</p>
<p>A somewhat more advanced tool called <a href="http://www.mountimage.com/">Mount Image Pro</a> (MIP) exists that does what I want. It isn&#8217;t free (<a href="#footnote">*</a>), but who cares when there is a one-month trial? (For the record, I&#8217;m not entirely happy with this thing, either. It works, but almost every other time it fails to load the system driver and requires a reboot and retry.)</p>
<p>With MIP, the NTFS partition comes up and is mounted under K:, but it is completely broken as expected. The file system cannot be read normally by Windows, nor would the diagnostic tool NFI (part of the <a href="http://support.microsoft.com/kb/253066">OEM Support Tools</a>) work on it. NFI relates what files a sector contains and what sectors a file resides in.</p>
<p>The next step is then to run chkdsk:</p>
<p>  > chkdsk /v K:</p>
<p>Very specific errors relating to the file table are immediately detected and chkdsk says it cannot continue in the (default) read-only mode.</p>
<p>So let&#8217;s try</p>
<p>  > chkdsk /v /r K:</p>
<p>Same complaint by chkdsk. What? It turns out MIP (at least the GUI) only mounts images in read-only mode, but it doesn&#8217;t specify this anywhere! Nor does it give an indication of how to get around this. Wow great.</p>
<p>After poking around, I noticed there is a command-line interface to MIP, too, and it is there that you can specify mounting in &#8220;read-write&#8221; mode, instead of &#8220;write-block&#8221; mode. (I would also call &#8220;write-block&#8221; mode &#8220;read-only&#8221; mode, but that&#8217;s just me, so what do I know!) Moving on:</p>
<p>  > mip mount rescue.image /rw /p:2 /l:K</p>
<p>Finally, the second partition in the disk image is mounted on the drive letter K: (hence the last two parameters). Unfortunately, MIP screws up again and says there is only &#8220;1&#8243; partition, and the drive letter K is associated with the first, Dell diagnostic, partition&#8230; even though it clearly displays two partitions and that the drive letter K is in reality associated with the second partition. No matter, it still works, so I&#8217;ll leave the MIP people unflogged. But they should still go home and fix these.</p>
<p>Trying chkdsk again and it slaves away through a 5-step process, dumping output on all the files and directories on which it detected problems. The disk image is broken enough that chkdsk had to kill most of the NTFS file permission. After about 2 or 3 hours, K: is miraculously readable again in Windows, with the basic directory structure at first glance intact. Very glaring, however, was that K:\windows isn&#8217;t there. There is a new K:\found.000 folder with all the directory trees that lost their names (but otherwise fairly intact) re-rooted there. There were 30+ such re-rooted directories, and it was trivial to find the one that should be K:\windows.</p>
<p>Running through the directories on the disk image that had been combed over by chkdsk, everything was readable and accessible. I&#8217;m more worried about the data parts that got zero-filled by ddrescue, which makes for a much more insidious type of data corruption. On the other hand, I am comforted by the high percentage of data that must not be zero-filled based on the percentage of raw recovered bits recovered by ddrescue. Also, anything that chkdsk had a problem with (in the file table) must have been due to zero-filling. Thus, the more problems chkdsk found, the less problems remain in the data portion, so statistically I am satisfied. With NFI, the extent of the damage at the file level can be ascertained precisely, but for all practical purposes, the recovery is near total. Certainly, all the files that I care about (defined as those not &#8220;easily&#8221; regenerated), which was maybe 20GB of the 40GB, are recovered, including really small text files to fairly large (hundreds of MB) NTFS compressed files.</p>
<p>There is a lot more to do and this project is far from over, but I can see the end-game now, and so the recovery effort can be declared a success.</font></p>
<p>Lessons today:</p>
<ul>
<li>MIP is pretty useful, but I still won&#8217;t buy it.</li>
<li>NTFS is truly robust, and the NTFS version of chkdsk is remarkable.</li>
</ul>
<p>On to <a href="http://scripts.mit.edu/~zong/wpress/?p=46">Part 6</a>.</p>
<p><a name=footnote>*</a> Edit: I&#8217;ve since found a free tool called <a href="http://chitchat.at.infoseek.co.jp/vmware/vdk.html">vdk</a> that makes Mount Image Pro obsolete. Yes, it mounts ddrescue images. Yay!</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=45</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
