<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=2398&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / mkfs.ext4: invalid blocks offset=X on device device.img]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=2398</link>
		<description><![CDATA[The most recent posts in mkfs.ext4: invalid blocks offset=X on device device.img.]]></description>
		<lastBuildDate>Thu, 04 Oct 2018 01:20:15 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: mkfs.ext4: invalid blocks offset=X on device device.img]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12149#p12149</link>
			<description><![CDATA[<div class="quotebox"><cite>fsmithred wrote:</cite><blockquote><div><p>What you tried looks right to me, but the man page for mke2fs doesn&#039;t actually say what units to use for offset. Further down the page where it talks about specifying the location of the journal, the wording suggests that you might need to use &#039;offset=1M&#039;.</p><p>One thing you did looks odd - why partition with cfdisk if you want gpt? gdisk is the right tool for that.</p></div></blockquote></div><p>Well, it happens that I was just forgetting to pass a -E flag to the mkfs command. After that, it was possible to create the filesystems</p><div class="quotebox"><cite>Plentyn wrote:</cite><blockquote><div><p>What about:</p><div class="codebox"><pre><code>loopdev=$(losetup -P -f --show imagem-zero.img)
mkfs.ext4 ${loopdev}p1
losetup -d $loopdev</code></pre></div><p>(Or something along these lines)</p></div></blockquote></div><p>Nice, losetup did the trick easily</p>]]></description>
			<author><![CDATA[dummy@example.com (0xf4b10)]]></author>
			<pubDate>Thu, 04 Oct 2018 01:20:15 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12149#p12149</guid>
		</item>
		<item>
			<title><![CDATA[Re: mkfs.ext4: invalid blocks offset=X on device device.img]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12134#p12134</link>
			<description><![CDATA[<p>What about:</p><div class="codebox"><pre><code>loopdev=$(losetup -P -f --show imagem-zero.img)
mkfs.ext4 ${loopdev}p1
losetup -d $loopdev</code></pre></div><p>(Or something along these lines)</p>]]></description>
			<author><![CDATA[dummy@example.com (Plentyn)]]></author>
			<pubDate>Tue, 02 Oct 2018 21:44:04 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12134#p12134</guid>
		</item>
		<item>
			<title><![CDATA[Re: mkfs.ext4: invalid blocks offset=X on device device.img]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12126#p12126</link>
			<description><![CDATA[<p>What you tried looks right to me, but the man page for mke2fs doesn&#039;t actually say what units to use for offset. Further down the page where it talks about specifying the location of the journal, the wording suggests that you might need to use &#039;offset=1M&#039;.</p><p>One thing you did looks odd - why partition with cfdisk if you want gpt? gdisk is the right tool for that.</p>]]></description>
			<author><![CDATA[dummy@example.com (fsmithred)]]></author>
			<pubDate>Tue, 02 Oct 2018 12:26:11 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12126#p12126</guid>
		</item>
		<item>
			<title><![CDATA[mkfs.ext4: invalid blocks offset=X on device device.img]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=12120#p12120</link>
			<description><![CDATA[<p>My goal is to create a regular file and within it make a partition and file systems (literally a virtual hard drive) and finally mount it, so I did:</p><div class="codebox"><pre><code>sudo dd if=/dev/zero of=imagem-zero.img count=20480000</code></pre></div><p>To create the file with aprox 20Gb. Then I&#039;ve partitioned with cfdisk, after that the status of the file was:</p><div class="quotebox"><blockquote><div><p>$ gdisk -l imagem-zero.img <br />GPT fdisk (gdisk) version 1.0.1</p><p>Partition table scan:<br />&#160; MBR: protective<br />&#160; BSD: not present<br />&#160; APM: not present<br />&#160; GPT: present</p><p>Found valid GPT with protective MBR; using GPT.<br />Disk imagem-zero.img: 40960000 sectors, 19.5 GiB<br />Logical sector size: 512 bytes<br />Disk identifier (GUID): 544A9633-7FA3-4BE8-BEE7-612C151A4504<br />Partition table holds up to 128 entries<br />First usable sector is 2048, last usable sector is 40959966<br />Partitions will be aligned on 2048-sector boundaries<br />Total free space is 0 sectors (0 bytes)</p><p>Number&#160; Start (sector)&#160; &#160; End (sector)&#160; Size&#160; &#160; &#160; &#160;Code&#160; Name<br />&#160; &#160;1&#160; &#160; &#160; &#160; &#160; &#160; 2048&#160; &#160; &#160; &#160; 16779263&#160; &#160;8.0 GiB&#160; &#160; &#160;8304&#160; <br />&#160; &#160;2&#160; &#160; &#160; &#160; 16779264&#160; &#160; &#160; &#160; 40959966&#160; &#160;11.5 GiB&#160; &#160; 8302</p></div></blockquote></div><p>Now I want to make the file system ext4 in both these two sectors but I&#039;m failing with the error message in the title of the question:</p><div class="codebox"><pre><code>$ sudo mkfs.ext4 imagem-zero.img offset=$((2048*512))</code></pre></div><div class="quotebox"><blockquote><div><p>mke2fs 1.43.4 (31-Jan-2017)<br />mkfs.ext4: invalid blocks &#039;offset=1048576&#039; on device &#039;imagem-zero.img&#039;</p></div></blockquote></div><div class="codebox"><pre><code>$ sudo mkfs.ext4 imagem-zero.img offset=$((2048))</code></pre></div><div class="quotebox"><blockquote><div><p>mke2fs 1.43.4 (31-Jan-2017)<br />mkfs.ext4: invalid blocks &#039;offset=2048&#039; on device &#039;imagem-zero.img&#039;</p></div></blockquote></div><p>My question is, how to find the correct offset to make the FS on both of the partitions? Thanks in advance.<br />Suggestions on how to reach my goal are also welcome <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (0xf4b10)]]></author>
			<pubDate>Tue, 02 Oct 2018 02:57:05 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=12120#p12120</guid>
		</item>
	</channel>
</rss>
