<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Digital Preservation Q&amp;A - Recent questions tagged disk-imaging</title>
<link>https://qanda.digipres.org/tag/disk-imaging</link>
<description>Powered by Question2Answer</description>
<item>
<title>Incomplete ISO image after imaging CD-ROM - how to prevent and detect this?</title>
<link>https://qanda.digipres.org/1076/incomplete-image-after-imaging-rom-prevent-and-detect-this</link>
<description>&lt;p&gt;
	While running some tests creating CD-ROM ISO images with ddrescue, I ended up with ISO images that were incomplete in some cases (last ~50 MB of image file missing), &lt;em&gt;even though ddrescue’s log file didn’t report any errors&lt;/em&gt;. Below the results I got from 4 attempts at imaging the same CD-ROM on the same PC (note that some of the ddrescue options I used are slightly different, but this appears to be unrelated to my issue). For this I used 2 different external DVD readers:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;
		Reader A - modern Samsung USB device;&lt;/li&gt;
	&lt;li&gt;
		Reader B - old SATA (internal) device, refurbished to USB.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
	Attempt 1 - reader A&lt;/h3&gt;
&lt;p&gt;
	Command line:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;ddrescue -b 2048 -r4 -v /dev/sr0 windows_98_upgrade_nl.iso windows_98_upgrade_nl.log
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
	This resulted in a 601.7 MB ISO image. Here are the contents of the log file:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;# Rescue Logfile. Created by GNU ddrescue version 1.17
# Command line: ddrescue -b 2048 -r4 -v /dev/sr0 windows_98_upgrade_nl.iso windows_98_upgrade_nl.log
# current_pos  current_status
0x23DC0000     +
#      pos        size  status
0x00000000  0x23DCB000  +
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
	I.e. the log file indicates the CD was imaged without problems. MD5 checksum is &lt;code&gt;82603be06a8142aad1dfaa9e1279371f&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
	Attempt 2 - reader B&lt;/h3&gt;
&lt;p&gt;
	Command line:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;ddrescue -d -n -b 2048 /dev/sr0 windows_98_upgrade.iso windows_98_upgrade.log
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
	Again this resulted in a 601.7 MB ISO image, again with no indication of read errors in the ddrescue log. MD5 checksum was (again) &lt;code&gt;82603be06a8142aad1dfaa9e1279371f&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;
	Then by chance I discovered some text files in the image file weren’t readable, so I did a third try, now again with reader A.&lt;/p&gt;
&lt;h3&gt;
	Attempt 3 - reader A&lt;/h3&gt;
&lt;p&gt;
	Command line:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;ddrescue -d -n -b 2048 /dev/sr0 windows_98_upgrade_test.iso windows_98_upgrade_test.log
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
	This resulted in a 660.9 MB ISO file. Again no errors in the ddrescue log; MD5 checksum is &lt;code&gt;24f0f746d0817121253c6b1242d4246e&lt;/code&gt;. After mounting the image, the text files that were problematic in the earlier images were normally readable.&lt;/p&gt;
&lt;h3&gt;
	Attempt 4 - reader B&lt;/h3&gt;
&lt;p&gt;
	Command line:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;ddrescue -d -n -b 2048 /dev/sr0 windows_98_upgrade_refurbished_onemoretry.iso windows_98_upgrade_refurbished_onemoretry.log
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
	Result was identical to result of attempt 3!&lt;/p&gt;
&lt;p&gt;
	So summarising, 2 runs of ddrescue (using 2 different USB readers) resulted in exactly the same error, whereas the remaining 2 runs (again using 2 different readers) completed fine. So what’s going on here!?&lt;/p&gt;
&lt;h2&gt;
	Md5sum directly on physical CD&lt;/h2&gt;
&lt;p&gt;
	As a first step I computed the MD5 checksum directly on the phyical disc, using:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;md5sum /dev/sr0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
	I repeated this 4 times, using both readers A and B, plugging them into different USB slots. In each case the result was &lt;code&gt;24f0f746d0817121253c6b1242d4246e&lt;/code&gt;, which is identical to the hash I got for the ISO in attempts 3 and 4 (confirming these images are correct).&lt;/p&gt;
&lt;h2&gt;
	Comparison of ISO images in hex editor&lt;/h2&gt;
&lt;p&gt;
	I also did a comparison of the intact and faulty ISOs in a hex editor. This revealed that in the faulty images a block of about 59 MB of data is missing at the end of the file. I double checked this by copying the block of missing data to a separate file (missingblock.dat), after which I appended it to one of the faulty files using:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;cat windows_98_upgrade_nl.iso missingblock.dat &amp;gt; isorepaired.iso
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
	Then check:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;md5sum isorepaired.iso
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
	Result:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;24f0f746d0817121253c6b1242d4246e
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
	Which corresponds to the value of the intact image.&lt;/p&gt;
&lt;h2&gt;
	But why is this happening in the first place?!&lt;/h2&gt;
&lt;p&gt;
	The really important question is why this is happening in the first place, and if there’s any way to avoid it? The thread below on the ddrescue mailing list describes a somewhat similar (but not quite the same) issue:&lt;/p&gt;
&lt;p&gt;
	&lt;a href=&quot;https://lists.gnu.org/archive/html/bug-ddrescue/2014-02/msg00003.html&quot; rel=&quot;nofollow&quot;&gt;https://lists.gnu.org/archive/html/bug-ddrescue/2014-02/msg00003.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	Note the following quote from the &lt;a href=&quot;https://lists.gnu.org/archive/html/bug-ddrescue/2014-02/msg00009.html&quot; rel=&quot;nofollow&quot;&gt;response&lt;/a&gt; by ddrescue’s main author. He suggests that the problem &lt;em&gt;might&lt;/em&gt; an issue with a USB port, adding:&lt;/p&gt;
&lt;blockquote&gt;
	&lt;p&gt;
		Ddrescue can’t know if the data are really good or if the hardware is lying about it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
	If correct, this would apply to other imaging tools as well. Based on my results, I’m curious if other people may have run into similar issues. More importantly: how does one even detect errors like these? Of course it is always possible to run a checksum on the physical medium and then compare it to the ISO checksum, but this takes ages. A more quick and dirty approach would be to compare the size of each created image against the size of input medium. E.g. to get the size of a CD-ROM I can use something like this:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;lsblk /dev/sr0 -n -b 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
	Result:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;sr0   11:0    1 660850688  0 rom
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
	(Third column is size of CD in bytes).&lt;/p&gt;
&lt;p&gt;
	To get the size of the ISO image:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;du -b windows_98_upgrade_refurbished_onemoretry.iso
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
	Result:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;660850688   windows_98_upgrade_refurbished_onemoretry.iso
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
	This does not guarantee the image is correct, but it will detect missing blocks of data.&lt;/p&gt;
&lt;p&gt;
	I also ran some cursory checks with &lt;em&gt;isovfy&lt;/em&gt; and &lt;em&gt;isoinfo&lt;/em&gt;, but the output of those tools turned out to be identical for both faulty and intact images, so they’re probably not very helpful for this sort of error.&lt;/p&gt;
&lt;p&gt;
	I’m curious how other people/memory institutions are dealing with this. Any thoughts / suggestions are welcome!&lt;/p&gt;
&lt;h2&gt;
	Addition&lt;/h2&gt;
&lt;p&gt;
	On Twitter Alexander Duryee rightly pointed out that a CD-Rom's Primary Volume Descriptor contains a field with the size of the disk (this is also where lsblk gets this value). So one would assume that ddrescue would check against this number. Apparently it doesn't do this, so I think I'll reprt this as a bug. (Note that such a check doesn't guarantee the copied data are identical to the source disc.)&lt;/p&gt;</description>
<guid isPermaLink="true">https://qanda.digipres.org/1076/incomplete-image-after-imaging-rom-prevent-and-detect-this</guid>
<pubDate>Thu, 03 Sep 2015 10:33:26 +0000</pubDate>
</item>
<item>
<title>What are best practices for cleaning floppy drive heads?</title>
<link>https://qanda.digipres.org/257/what-are-best-practices-for-cleaning-floppy-drive-heads</link>
<description>When working with legacy floppy disks, do you ever clean the drive heads? If so, when? Are there any established best practices for floppy drive maintenance?</description>
<guid isPermaLink="true">https://qanda.digipres.org/257/what-are-best-practices-for-cleaning-floppy-drive-heads</guid>
<pubDate>Wed, 30 Jul 2014 22:40:25 +0000</pubDate>
</item>
<item>
<title>What criteria should I consider when determining the hardware specs for a disk imaging station?</title>
<link>https://qanda.digipres.org/212/criteria-should-consider-determining-hardware-imaging-station</link>
<description>The person who asked the question at #digpres14 was thinking specifically of the tower that powers the disk imaging station rather than all the peripherals. Another way of framing the question is what are the bare minimum specs (RAM, processor, ports)?</description>
<guid isPermaLink="true">https://qanda.digipres.org/212/criteria-should-consider-determining-hardware-imaging-station</guid>
<pubDate>Wed, 23 Jul 2014 13:46:30 +0000</pubDate>
</item>
<item>
<title>What settings should be used when imaging floppy disks using a Kryoflux device?</title>
<link>https://qanda.digipres.org/199/settings-should-imaging-floppy-disks-using-kryoflux-device</link>
<description>&lt;p&gt;
	&lt;span style=&quot;font-size: 9pt; font-family: Arial, sans-serif;&quot;&gt;I'm trying to write a&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://github.com/euanc/kryofluxDiskID&quot; rel=&quot;nofollow&quot;&gt;small program&lt;/a&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;to identify floppy disk formats automatically in order to enable efficient bulk disk imaging.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style=&quot;font-size: 9pt; font-family: Arial, sans-serif;&quot;&gt;Details of the approach are outlined&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.openplanetsfoundation.org/blogs/2014-06-26-bulk-disk-imaging-and-disk-format-identification-kryoflux&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style=&quot;font-size: 9pt; font-family: Arial, sans-serif;&quot;&gt;As part of this I need the program to create every possible variant of disk image in order to test each to find out which type of disk it actually was.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style=&quot;font-size: 9pt; font-family: Arial, sans-serif;&quot;&gt;For this to work I need to know what possible types of disk there might have been. For example, double sided disks, single sided disks, disks that should be read at 300rpm, disks with 40 tracks, disks with 80 tracks, etc.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style=&quot;font-size: 9pt; font-family: Arial, sans-serif;&quot;&gt;I will be using the &lt;a href=&quot;http://www.kryoflux.com/&quot; rel=&quot;nofollow&quot;&gt;Kryoflux&lt;/a&gt; device to do this work and the settings options within that include:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;
		Image Type&lt;/li&gt;
	&lt;li&gt;
		Start Track&lt;/li&gt;
	&lt;li&gt;
		End Track&lt;/li&gt;
	&lt;li&gt;
		Side Mode&lt;/li&gt;
	&lt;li&gt;
		Sector Size&lt;/li&gt;
	&lt;li&gt;
		Sector Count&lt;/li&gt;
	&lt;li&gt;
		Track Distance&lt;/li&gt;
	&lt;li&gt;
		Target RPM&lt;/li&gt;
	&lt;li&gt;
		&lt;span style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; line-height: 12px;&quot;&gt;Track physical position - side 0&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;span style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; line-height: 12px;&quot;&gt;Track physical position - side 1&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;span style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; line-height: 12px;&quot;&gt;Start track&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;span style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; line-height: 12px;&quot;&gt;End track&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;span style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; line-height: 12px;&quot;&gt;Flippy/not flippy&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;span style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; line-height: 12px;&quot;&gt;Output Image Track Order&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;span style=&quot;color: rgb(51, 51, 51); font-family: Helvetica, Arial, Sens-serif; line-height: 12px;&quot;&gt;Disk Density&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
	&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 9pt;&quot;&gt;I don't have a lot of knowledge of disk formats however and so am hoping that others will know what settings I should include in the program. For example, are there other RPM that disks were read at aside from 300 and 360? Also, Are there any standard sector counts? (etc).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;span style=&quot;font-size: 9pt; font-family: Arial, sans-serif;&quot;&gt;I have started a spreadsheet to capture options&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://docs.google.com/spreadsheets/d/1g_xM_cmUAl2AIYwD3d_2IulZlOG6_JmDDf7FoIRW9EM/edit?usp=sharing&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;. I do not want to circumvent the use of this site so can you please give any answers you can on this site and in the spreadsheet also if possible. I will ensure that any that are only posted on this site are consolidated in the spreadsheet and included in the program.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</description>
<guid isPermaLink="true">https://qanda.digipres.org/199/settings-should-imaging-floppy-disks-using-kryoflux-device</guid>
<pubDate>Mon, 21 Jul 2014 18:06:36 +0000</pubDate>
</item>
</channel>
</rss>