<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://dev1galaxy.org/extern.php?action=feed&amp;tid=5948&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / e2image - image created as sparse file and is mountable]]></title>
		<link>http://dev1galaxy.org/viewtopic.php?id=5948</link>
		<description><![CDATA[The most recent posts in e2image - image created as sparse file and is mountable.]]></description>
		<lastBuildDate>Fri, 01 Sep 2023 22:07:23 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[e2image - image created as sparse file and is mountable]]></title>
			<link>http://dev1galaxy.org/viewtopic.php?pid=44012#p44012</link>
			<description><![CDATA[<p>I stumbled upon <a href="https://unix.stackexchange.com/questions/541405/how-can-i-create-an-image-of-a-partition-ext4-and-later-mount-it-to-browse-res" rel="nofollow">https://unix.stackexchange.com/question … browse-res</a> , which is awesome!<br />Cite:</p><div class="quotebox"><blockquote><div><p>e2image can be used to create an image of an ext4 file system, while only copying sectors which are in use:</p><div class="codebox"><pre><code>e2image -ra /dev/sda1 /path/to/file.img</code></pre></div><p>file.img will be created as a sparse file, so it will only occupy the space which is really used in the file system, even though its apparent size will reflect the capacity of the file system. It can be mounted directly, like any file system image:</p></div></blockquote></div><p>This will save a massive amount of time when making a backup image and it&#039;s mountable. Excellent!<br />One question remains: How can the sparse file &quot;trick&quot; ls?</p><p>.<br />.<br />.<br />.<br />PS: <br />Since more than a decade I was happily doing:</p><div class="codebox"><pre><code>su -
mount /dev/sda1 /mnt
cat /dev/zero&gt;/mnt/null.dat    # until &quot;no space left on device&quot;
rm /mnt/null.dat
umount /dev/sda1
cat /dev/sda1 | gzip &gt;sda1.img.gz</code></pre></div><p>The image-archive sda1.img.gz has a size of about half the partition&#039;s effective data-content, but is not mountable of course.</p>]]></description>
			<author><![CDATA[dummy@example.com (delgado)]]></author>
			<pubDate>Fri, 01 Sep 2023 22:07:23 +0000</pubDate>
			<guid>http://dev1galaxy.org/viewtopic.php?pid=44012#p44012</guid>
		</item>
	</channel>
</rss>
