<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=accessing_a_disk_image_in_Linux</id>
	<title>accessing a disk image in Linux - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=accessing_a_disk_image_in_Linux"/>
	<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=accessing_a_disk_image_in_Linux&amp;action=history"/>
	<updated>2026-07-12T17:58:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://htyp.org/mw/index.php?title=accessing_a_disk_image_in_Linux&amp;diff=4377&amp;oldid=prev</id>
		<title>Woozle: Accessing a disk image in Linux moved to accessing a disk image in Linux</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=accessing_a_disk_image_in_Linux&amp;diff=4377&amp;oldid=prev"/>
		<updated>2006-05-25T13:43:00Z</updated>

		<summary type="html">&lt;p&gt;Accessing a disk image in Linux moved to accessing a disk image in Linux&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:43, 25 May 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
	<entry>
		<id>https://htyp.org/mw/index.php?title=accessing_a_disk_image_in_Linux&amp;diff=3335&amp;oldid=prev</id>
		<title>Woozle: moved from Qemu on Linux</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=accessing_a_disk_image_in_Linux&amp;diff=3335&amp;oldid=prev"/>
		<updated>2006-02-22T02:08:22Z</updated>

		<summary type="html">&lt;p&gt;moved from Qemu on Linux&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Computing]]: [[Software]]: [[Linux]]: [[{{PAGENAME}}|accessing a disk image]]&lt;br /&gt;
==Instructions==&lt;br /&gt;
In general, assuming the image file was made with the default disk head/sector parameters using [[qemu-img]] (in [[qemu]]) or [[bximage]] (in [[bochs]]):&lt;br /&gt;
 [[sudo]] [[mount]] -o loop,offset=32256 &amp;lt;u&amp;gt;/path/to/image&amp;lt;/u&amp;gt; &amp;lt;u&amp;gt;/path/to/directory/&amp;lt;/u&amp;gt;&lt;br /&gt;
Specific example ({{Woozle}}&amp;#039;s system):&lt;br /&gt;
 [[sudo]] [[mount]] -o loop,offset=32256 /home/woozle/win98/c.img /mnt/qemu&lt;br /&gt;
The reason for the offset is that the image represents an entire &amp;#039;&amp;#039;disk&amp;#039;&amp;#039;; you can only mount a &amp;#039;&amp;#039;partition&amp;#039;&amp;#039;, not the entire disk. The offset is where the main partition starts. You can find out where partitions are in a disk image by using fdisk:&lt;br /&gt;
 [[fdisk]] /path/to/image&lt;br /&gt;
Woozle example:&lt;br /&gt;
 [[fdisk]] /home/woozle/win98/c.img&lt;br /&gt;
This takes you to a menu, where you type &amp;quot;p&amp;quot; to get a partition table:&lt;br /&gt;
 Command (m for help): p&lt;br /&gt;
 &lt;br /&gt;
 Disk c.img: 0 MB, 0 bytes&lt;br /&gt;
 64 heads, 63 sectors/track, 0 cylinders&lt;br /&gt;
 Units = cylinders of 4032 * 512 = 2064384 bytes&lt;br /&gt;
 &lt;br /&gt;
 Device Boot      Start         End      Blocks   Id  System&lt;br /&gt;
 c.img1   *           1         520     1048288+   c  W95 FAT32 (LBA)&lt;br /&gt;
&lt;br /&gt;
Based on what I worked out below (which you don&amp;#039;t need to read unless that sort of thing interests you), you work this equation to find the correct offset:&lt;br /&gt;
 [Start] x [bytes-per-sector] x [sectors/track]&lt;br /&gt;
...where [bytes-per-sector] is the number after the &amp;quot;*&amp;quot; in &amp;quot;cylinders of...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
(Working backwards from the knowledge that 32256 &amp;amp;ndash; which was a Magic Number found by Tenebram &amp;amp;ndash; is the correct number, and trying to figure out why it is correct: If we presume that &amp;quot;sectors/track&amp;quot; means the number of sectors per track for a &amp;#039;&amp;#039;single head&amp;#039;&amp;#039;, then 4032 (which is 64 x 63) must be the number of sectors per track for &amp;#039;&amp;#039;all&amp;#039;&amp;#039; heads, and 512 is probably the sector size in bytes. The offset to a given sector, then (waving a magic wand at all this so that it matches reality somehow) is [start] x [bytes-per-sector] x [sectors-per-track] &amp;amp;ndash; which leads us to deduce that the units for the [start] number must be &amp;quot;tracks&amp;quot;.)&lt;/div&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
</feed>