<?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>Aleksey Mullin, Author at DMC, Inc.</title>
	<atom:link href="https://static.dmcinfo.com/blog/author/alekseym/feed/index.xml" rel="self" type="application/rss+xml" />
	<link></link>
	<description></description>
	<lastBuildDate>Wed, 19 Aug 2026 21:34:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>

<image>
	<url>https://static.dmcinfo.com/wp-content/uploads/2025/04/site-icon-150x150.png</url>
	<title>Aleksey Mullin, Author at DMC, Inc.</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Resolving “No Space Left on Device” (ENOSPC) When Building Yocto in WSL2 </title>
		<link>https://static.dmcinfo.com/blog/41046/resolving-no-space-left-on-device-enospc-when-building-yocto-in-wsl2/</link>
		
		<dc:creator><![CDATA[Aleksey Mullin]]></dc:creator>
		<pubDate>Fri, 06 Feb 2026 13:00:00 +0000</pubDate>
				<category><![CDATA[Embedded Development & Programming]]></category>
		<guid isPermaLink="false">https://static.dmcinfo.com/?p=41046</guid>

					<description><![CDATA[<p>After spending hours building a Yocto Linux image in WSL2, it is discouraging to see it crash with a deceptively simple error with surprisingly complex root causes: This error often shows up late in the build, after you&#8217;ve already invested significant time, and it can recur even after cleaning up build files and artifacts. The [&#8230;]</p>
<p>The post <a href="https://static.dmcinfo.com/blog/41046/resolving-no-space-left-on-device-enospc-when-building-yocto-in-wsl2/">Resolving “No Space Left on Device” (ENOSPC) When Building Yocto in WSL2 </a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">After spending hours building a Yocto Linux image in WSL2, it is discouraging to see it crash with a deceptively simple error with surprisingly complex root causes:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">ShellScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly> No space left on device (errno = 28, ENOSPC) </textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4"> </span><span style="color: #DCDCAA">No</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">space</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">left</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">on</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">device</span><span style="color: #D4D4D4"> (errno </span><span style="color: #CE9178">=</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">28</span><span style="color: #CE9178">,</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">ENOSPC</span><span style="color: #D4D4D4">) </span></span></code></pre></div>



<p class="wp-block-paragraph">This error often shows up late in the build, after you&#8217;ve already invested significant time, and it can recur even after cleaning up build files and artifacts. The reason is that WSL storage has one extra layer compared to a typical Linux workstation, and Yocto is excellent at stressing it. </p>



<p class="wp-block-paragraph">This post walks through what ENOSPC really means in WSL2, why&nbsp;Yocto&nbsp;triggers it so reliably, how to diagnose the root cause, and the correct fixes that make your builds predictable again.&nbsp;</p>



<h2 id="h-what-enospc-actually-means-and-why-wsl2-makes-it-trickier" class="wp-block-heading">What ENOSPC Actually Means (and Why WSL2 Makes It Trickier)</h2>



<p class="wp-block-paragraph">On a traditional Linux machine,&nbsp;ENOSPC&nbsp;usually means one of two things:&nbsp;</p>



<ul class="wp-block-list">
<li>You’re&nbsp;out of disk space</li>



<li>You’re&nbsp;out of&nbsp;inodes&nbsp;(metadata entries used to track files)&nbsp;</li>
</ul>



<p class="wp-block-paragraph">In WSL2, there&#8217;s a third common cause: the Linux filesystem lives inside a <a href="https://learn.microsoft.com/en-us/windows/wsl/disk-space" target="_blank" rel="noreferrer noopener">virtual hard disk file</a> on Windows (typically <mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color"><strong><em>ext4.vhdx</em></strong></mark>). So, you effectively have two storage:</p>



<ul class="wp-block-list">
<li>Inside WSL2 (Linux view) &#8211; An ext4 filesystem with “available space.”&nbsp;</li>
</ul>



<ul class="wp-block-list">
<li>On Windows (host view) &#8211;&nbsp;A&nbsp;VHDX file that must be able to expand on the host disk&nbsp;</li>
</ul>



<p class="wp-block-paragraph">If the VHDX can&#8217;t grow (because the Windows host drive is full, or because you&#8217;ve hit a configured limit), Linux reports ENOSPC even if you clearly remember deleting a bunch of files yesterday.</p>



<h2 id="h-why-nbsp-yocto-nbsp-builds-hit-the-wall-so-fast-nbsp" class="wp-block-heading">Why&nbsp;Yocto&nbsp;Builds Hit the Wall So Fast&nbsp;</h2>



<p class="wp-block-paragraph">Yocto&nbsp;produces a large amount of output and (more importantly) a massive number of small files. A typical build tree can easily exceed 100GB once you include build artifacts, shared state, downloads, logs, and repeated iterations.&nbsp;A representative footprint looks like&nbsp;this:&nbsp;</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><tbody><tr><td><strong><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color">build/tmp</mark></em></strong></td><td>~ 90 GB</td></tr><tr><td><strong><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color">sstate-cache</mark></em></strong></td><td>~ 9 GB</td></tr><tr><td><strong><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color">downloads</mark></em></strong></td><td>~ 2 GB</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">Even a “single” build can push you into triple-digit GB usage quickly,&nbsp;especially with multiple machine configs, SDKs, images, or rebuild cycles.&nbsp;This is why even developers with large SSDs hit space issues faster than expected.&nbsp;</p>



<h2 id="h-why-you-nbsp-shouldn-t-nbsp-put-nbsp-yocto-nbsp-under-nbsp-mnt-nbsp" class="wp-block-heading">Why You&nbsp;Shouldn’t&nbsp;Put&nbsp;Yocto&nbsp;Under&nbsp;<strong><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color">/mnt/…</mark></em></strong>&nbsp;</h2>



<p class="wp-block-paragraph">It’s&nbsp;tempting to just place your&nbsp;Yocto&nbsp;workspace on a Windows host drive (<strong><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color">/mnt/c/yocto/…</mark></em></strong>), so it uses space on your physical SSD instead of the virtual hard disk file. But&nbsp;the&nbsp;Windows filesystem (NTFS) gets mounted into WLS via a translation layer. That cross-OS layer is convenient, but&nbsp;it’s&nbsp;not&nbsp;optimized&nbsp;for this style of compilations/builds that deal with&nbsp;hundreds of thousands of files.&nbsp;</p>



<p class="wp-block-paragraph">Microsoft’s guidance for these situations is&nbsp;<a href="https://learn.microsoft.com/en-us/windows/wsl/filesystems" target="_blank" rel="noreferrer noopener">straightforward</a>: for best performance, keep your build files&nbsp;inside the WSL filesystem. So, using the physical SSD&nbsp;won’t&nbsp;work in this case,&nbsp;and we should&nbsp;keep the&nbsp;Yocto&nbsp;tree under something like&nbsp;<strong><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color">~/yocto</mark></em></strong>, and not under&nbsp;<strong><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color">/mnt/c…</mark></em></strong>&nbsp;</p>



<h2 id="h-the-right-fix-clean-reclaim-and-put-the-vhdx-on-the-right-disk-nbsp" class="wp-block-heading">The Right Fix: Clean, Reclaim, and Put the VHDX on the Right Disk&nbsp;</h2>



<h3 id="h-step-1-clean-nbsp-yocto-nbsp-build-artifacts-inside-wsl-nbsp" class="wp-block-heading">Step 1: Clean&nbsp;Yocto&nbsp;Build Artifacts (Inside WSL)&nbsp;</h3>



<p class="wp-block-paragraph">If you need to get unblocked quickly, removing build outputs helps:</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">ShellScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>rm -rf build/tmp/* 
rm -rf sstate-cache/* 
rm -rf downloads/* </textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">rm</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-rf</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">build/tmp/</span><span style="color: #569CD6">*</span><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #DCDCAA">rm</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-rf</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">sstate-cache/</span><span style="color: #569CD6">*</span><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #DCDCAA">rm</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-rf</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">downloads/</span><span style="color: #569CD6">*</span><span style="color: #D4D4D4"> </span></span></code></pre></div>



<p class="wp-block-paragraph">This frees space&nbsp;inside&nbsp;ext4, which may be enough to complete a build.&nbsp;</p>



<h3 id="h-step-2-shrink-optimize-the-vhdx-so-windows-actually-gets-space-back" class="wp-block-heading">Step 2: Shrink/Optimize the VHDX (So Windows Actually Gets Space Back)</h3>



<p class="wp-block-paragraph">Deleting files inside ext4 does&nbsp;not&nbsp;necessarily reduce the physical size of&nbsp;<strong><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color">ext4.vhdx</mark></em></strong>.&nbsp;It’s&nbsp;common for the VHDX to grow during heavy workloads and&nbsp;<a href="https://github.com/microsoft/WSL/issues/4699" target="_blank" rel="noreferrer noopener">not automatically return that space to Windows</a>.&nbsp;</p>



<p class="wp-block-paragraph">To reclaim space on the Windows host, shut down WSL, then&nbsp;optimize&nbsp;the VHDX from PowerShell:&nbsp;</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">ShellScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>wsl --shutdown 
Optimize-VHD -Path "D:\WSL\Ubuntu\ext4.vhdx" -Mode Full </textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">wsl</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">--shutdown</span><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #DCDCAA">Optimize-VHD</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-Path</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">&quot;D:\WSL\Ubuntu\ext4.vhdx&quot;</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">-Mode</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">Full</span><span style="color: #D4D4D4"> </span></span></code></pre></div>



<p class="wp-block-paragraph">This approach is commonly recommended for&nbsp;<a href="https://learn.microsoft.com/en-us/answers/questions/4006845/reduce-disk-space-consumption-for-wsl" target="_blank" rel="noreferrer noopener">compacting WSL VHDX files after cleanup</a>.</p>



<p class="wp-block-paragraph">Note:&nbsp;Optimize-VHD&nbsp;requires&nbsp;the Hyper-V VHD tooling (available on many Windows editions). If you&nbsp;don’t&nbsp;have it, you may need to enable the&nbsp;appropriate Windows features.&nbsp;</p>



<h3 id="h-step-3-move-the-wsl-distribution-to-a-larger-drive-nbsp" class="wp-block-heading">Step 3: Move the WSL Distribution to a Larger Drive&nbsp;</h3>



<p class="wp-block-paragraph">If your&nbsp;Yocto&nbsp;workflow is a long-term need, the most robust fix is to ensure the distro (and therefore the VHDX&nbsp;file) lives on a drive with plenty of headroom.&nbsp;</p>



<h4 id="h-method-nbsp-0-nbsp-why-moving-ubuntu-in-windows-settings-nbsp-doesn-t-nbsp-work-nbsp" class="wp-block-heading">Method&nbsp;0:&nbsp;Why “Moving Ubuntu” in Windows Settings&nbsp;Doesn’t&nbsp;Work&nbsp;</h4>



<p class="wp-block-paragraph">Windows has an&nbsp;app setting that&nbsp;appears to “move”&nbsp;Ubuntu. In practice, this often moves the&nbsp;application wrapper, not necessarily the underlying storage you care about&nbsp;(VHDX file).&nbsp;If you need more space, you typically need to&nbsp;move the&nbsp;distribution’s&nbsp;VHDX&nbsp;(or&nbsp;relocate&nbsp;the distro) to a larger drive using WSL-supported methods (covered below).&nbsp;</p>



<h4 id="h-method-a-export-import-reliable-and-widely-supported" class="wp-block-heading">Method A: Export / Import (Reliable and Widely Supported)</h4>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">ShellScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>wsl --export Ubuntu D:\backup\ubuntu.tar 
wsl --unregister Ubuntu 
wsl --import Ubuntu D:\WSL\Ubuntu D:\backup\ubuntu.tar --version 2 </textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">wsl</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">--export</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">Ubuntu</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">D:</span><span style="color: #D7BA7D">\b</span><span style="color: #CE9178">ackup</span><span style="color: #D7BA7D">\u</span><span style="color: #CE9178">buntu.tar</span><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #DCDCAA">wsl</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">--unregister</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">Ubuntu</span><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #DCDCAA">wsl</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">--import</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">Ubuntu</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">D:</span><span style="color: #D7BA7D">\W</span><span style="color: #CE9178">SL</span><span style="color: #D7BA7D">\U</span><span style="color: #CE9178">buntu</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">D:</span><span style="color: #D7BA7D">\b</span><span style="color: #CE9178">ackup</span><span style="color: #D7BA7D">\u</span><span style="color: #CE9178">buntu.tar</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">--version</span><span style="color: #D4D4D4"> </span><span style="color: #B5CEA8">2</span><span style="color: #D4D4D4"> </span></span></code></pre></div>



<p class="wp-block-paragraph">This moves the distro storage to&nbsp;<strong><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color">D:\WSL\Ubuntu</mark></em></strong>&nbsp;</p>



<h4 id="h-method-b-nbsp-wsl-nbsp-manage-move-nbsp-newer-simpler-nbsp" class="wp-block-heading">Method B:&nbsp;<mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color"><strong><em>wsl&nbsp;&#8211;manage &#8211;move</em></strong></mark>&nbsp;(Newer, Simpler)&nbsp;</h4>



<p class="wp-block-paragraph">Newer WSL releases include a built-in move command:&nbsp;</p>



<div class="wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e"><span style="background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e">ShellScript</span></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>wsl --update 
wsl --manage Ubuntu --move D:\WSL\Ubuntu  </textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #DCDCAA">wsl</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">--update</span><span style="color: #D4D4D4"> </span></span>
<span class="line"><span style="color: #DCDCAA">wsl</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">--manage</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">Ubuntu</span><span style="color: #D4D4D4"> </span><span style="color: #569CD6">--move</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178">D:</span><span style="color: #D7BA7D">\W</span><span style="color: #CE9178">SL</span><span style="color: #D7BA7D">\U</span><span style="color: #CE9178">buntu</span><span style="color: #D4D4D4"> </span><span style="color: #CE9178"> </span></span></code></pre></div>



<p class="wp-block-paragraph">This is supported in WSL versions that include the&nbsp;<strong><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color">&#8211;move</mark></em></strong>&nbsp;option&nbsp;and is often the cleanest approach when available.&nbsp;</p>



<h2 id="h-conclusion-nbsp" class="wp-block-heading">Conclusion&nbsp;</h2>



<p class="wp-block-paragraph">In WSL2, “No space left on device” often&nbsp;isn’t&nbsp;just about what&nbsp;<strong><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color">df</mark></em></strong>&nbsp;shows inside Linux.&nbsp;It’s about how WSL stores Linux data in a Windows-hosted VHDX that expands over time and may not automatically shrink.&nbsp;</p>



<p class="wp-block-paragraph">The most reliable path to predictable&nbsp;Yocto&nbsp;builds is:&nbsp;</p>



<ol class="wp-block-list">
<li>Yocto&nbsp;is not a 20 GB project. Budget&nbsp;hundreds&nbsp;of GB.&nbsp;</li>



<li>Keep&nbsp;Yocto&nbsp;workspaces on ext4 inside WSL (not&nbsp;<strong><em><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-custom-medium-blue-color">/mnt/*</mark></em></strong>).</li>



<li>Clean build artifacts when needed.</li>



<li>Compact the VHDX after cleanup.</li>



<li>Move the VHDL file to a larger drive.</li>
</ol>



<div class="wp-block-group alignwide has-custom-light-blue-background-color has-background is-layout-flow wp-container-core-group-is-layout-dbd34961 wp-block-group-is-layout-flow" style="border-radius:20px;margin-top:var(--wp--preset--spacing--50);margin-bottom:var(--wp--preset--spacing--50);padding-top:var(--wp--preset--spacing--50);padding-right:0;padding-bottom:var(--wp--preset--spacing--50);padding-left:0">
<div class="wp-block-columns alignwide are-vertically-aligned-center is-layout-flex wp-container-core-columns-is-layout-43efaee5 wp-block-columns-is-layout-flex" style="padding-right:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--60)">
<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:85%">
<h3 class="wp-block-heading has-text-align-left" id="h-have-an-upcoming-project-dmc-can-help-you-take-the-next-step">Overcome <em>WSL2</em> and <em>Yocto Build</em> Hurdles with DMC.</h3>



<p class="has-text-align-left wp-block-paragraph" id="h-need-help-turning-ideas-into-outcomes-automation-project-to-the-next-level-contact-us-today-to-learn-more-about-our-solutions-and-how-we-can-help-you-achieve-your-goals">DMC can help you optimize your <em>WSL2</em> or <em>Yocto</em> setup and fix any challenges for your <a href="https://static.dmcinfo.com/services/embedded-development-and-embedded-programming/" data-type="page" data-id="431">Embedded Development</a> needs.</p>
</div>



<div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:15%">
<div class="wp-block-buttons is-horizontal is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-2236275c wp-block-buttons-is-layout-flex">
<div class="wp-block-button is-style-fill"><a class="wp-block-button__link has-base-contrast-color has-text-color has-link-color wp-element-button" href="https://static.dmcinfo.com/contact/">Contact Us</a></div>
</div>
</div>
</div>
</div>
<p>The post <a href="https://static.dmcinfo.com/blog/41046/resolving-no-space-left-on-device-enospc-when-building-yocto-in-wsl2/">Resolving “No Space Left on Device” (ENOSPC) When Building Yocto in WSL2 </a> appeared first on <a href="https://static.dmcinfo.com/">DMC, Inc.</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
