<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="https://blog.checo.cc/en/rss.xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <atom:link href="https://blog.checo.cc/en/rss.xml" rel="self" type="application/rss+xml"/>
    <title>Checo&amp;apos;s Blog</title>
    <link>https://blog.checo.cc</link>
    <description>Cloud / DevOps / Security / Frontend / Transport / Photography</description>
    <language>en-US</language>
    <pubDate>Mon, 15 Jun 2026 12:29:33 GMT</pubDate>
    <lastBuildDate>Mon, 15 Jun 2026 12:29:33 GMT</lastBuildDate>
    <generator>@vuepress/plugin-feed</generator>
    <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
    <copyright>© 2026 Checo&amp;apos;s Blog. All rights reserved.</copyright>
    <category>Blog</category>
    <category>AI</category>
    <category>AWS</category>
    <category>Windows</category>
    <category>Security</category>
    <category>Linux</category>
    <category>DevOps</category>
    <category>Database</category>
    <category>macOS</category>
    <category>Hardware</category>
    <category>Tools</category>
    <category>VPS</category>
    <category>Photography</category>
    <category>Homepage</category>
    <item>
      <title>About Me</title>
      <link>https://blog.checo.cc/en/intro.html</link>
      <guid>https://blog.checo.cc/en/intro.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">About Me</source>
      <description>About Me Checo Information Security graduate Geography enthusiast Photography lover Fan of 房东的猫 (Fangdong&amp;apos;s Cat)</description>
      <pubDate>Mon, 15 Jun 2026 12:28:47 GMT</pubDate>
      <content:encoded><![CDATA[
<p>Checo</p>
<ul>
<li>Information Security graduate</li>
<li>Geography enthusiast</li>
<li>Photography lover</li>
<li>Fan of 房东的猫 (Fangdong's Cat)</li>
</ul>
]]></content:encoded>
      <enclosure url="https://blog.checo.cc/assets/images/cover3.jpg" type="image/jpeg"/>
    </item>
    <item>
      <title>Afterword</title>
      <link>https://blog.checo.cc/en/posts/begin.html</link>
      <guid>https://blog.checo.cc/en/posts/begin.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Afterword</source>
      <description>This blog mainly serves two types of content: one is technical tinkering and troubleshooting records, and the other is life, photography, and personal interests. Many articles a...</description>
      <category>Blog</category>
      <pubDate>Mon, 20 May 2024 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>This blog mainly serves two types of content: one is technical tinkering and troubleshooting records, and the other is life, photography, and personal interests. Many articles are not standard tutorials but post-mortems I put together after encountering problems in real environments.</p>
<!-- more -->
<p>For me, blogging isn't about packaging everything neatly — it's about preserving &quot;how I judged the situation at the time, what pitfalls I hit, and how it was ultimately resolved.&quot; Next time I encounter a similar problem, I can take fewer detours; when others find it through search, they can quickly judge whether this approach suits them.</p>
<h2>AI</h2>
<p>The AI category mainly records experiences with large language models and related tools.</p>
<p>Currently planned topics:</p>
<ul>
<li>Local LLM deployment, e.g., LM Studio, Ollama.</li>
<li>Tool chains like DeepSeek, Cherry Studio, SiliconFlow.</li>
<li>API calls, model integration, and some low-cost usage methods.</li>
<li>Practical uses of AI tools in daily work.</li>
</ul>
<p>Articles in this section will be practice-oriented, not just theory. It's only worth recording if it can be run locally, integrated with a client, and solve real problems.</p>
<h2>AWS</h2>
<p>AWS currently has the most content on the blog. This section mainly covers cloud service troubleshooting, EC2 operations, Windows/Linux system issues, S3, ALB, IAM, FSx, SSM, CloudWatch, and similar cases.</p>
<p>These articles typically follow this structure:</p>
<ol>
<li>Problem symptoms</li>
<li>Key logs</li>
<li>Investigation path</li>
<li>Root cause diagnosis</li>
<li>Solution</li>
<li>Follow-up recommendations</li>
</ol>
<p>Many AWS problems look like cloud platform issues, but the root cause may end up being in the operating system, certificate chain, KMS permissions, Windows Update, AD ports, Kerberos tickets, or third-party security software. I write these down as a reminder: troubleshoot in layers, don't attribute the problem to a specific component right from the start.</p>
<h2>DevOps</h2>
<p>The DevOps category covers more general server, container, and service migration records.</p>
<p>For example:</p>
<ul>
<li>1Panel server maintenance</li>
<li>Docker networking and iptables/nftables issues</li>
<li>Migrating new-api from SQLite to MySQL</li>
<li>Blue-green production service switching</li>
<li>Reverse proxy and database connection issues</li>
</ul>
<p>The emphasis in this type of content is reproducibility and rollback capability. Operations in production environments can't just aim for &quot;it works&quot; — you also need to consider backups, verification, traffic switching, and failure rollback.</p>
<h2>VPS</h2>
<p>The VPS category records servers, networking, domains, and common scripts.</p>
<p>Planned additions:</p>
<ul>
<li>Common Linux scripts</li>
<li>VPS benchmarking and network testing</li>
<li>Domain, DNS, and certificate configuration</li>
<li>Nezha Probe, triple-network IPs, proxy and network connectivity</li>
</ul>
<p>This section will be relatively miscellaneous, but all centered around personal server and network asset management.</p>
<h2>macOS</h2>
<p>The macOS category mainly records my own Mac usage, troubleshooting, and hardware inspection.</p>
<p>For example:</p>
<ul>
<li>Hardware inspection after receiving the Mac mini M4</li>
<li>VS Code auto-update failure on external APFS volume</li>
<li>External drives, app migration, system log investigation</li>
</ul>
<p>These articles lean toward personal experience, but many pitfalls are common. Especially on macOS, issues with cross-volume operations, permissions, temporary directories, and app auto-updates are usually not obvious — until something goes wrong, and then they're hard to pinpoint.</p>
<h2>Windows and Security</h2>
<p>The Windows category currently covers WSL, Kali, and Windows environment-related content.</p>
<p>Planned additions:</p>
<ul>
<li>WSL migration and tinkering</li>
<li>Kali tool environment</li>
<li>Windows Server operations experience</li>
<li>Security testing environment setup</li>
</ul>
<p>This differs from the Windows troubleshooting in the AWS category: the AWS category focuses more on cloud cases, while the Windows category is more about local environments and personal use.</p>
<h2>Photography</h2>
<p>Photography is another long-term section.</p>
<p>This section won't focus much on gear specs — it's more about the photos themselves and shooting scenes, like the Southern Anhui Sichuan-Tibet Highway, birds, and football matches. Tech blogs tend to get drier over time; photography keeps this site from being just a problem list and preserves a bit of life.</p>
<h2>Writing Principles</h2>
<p>I'll try to follow several principles for future articles:</p>
<ul>
<li>Don't include sensitive information — accounts, instance IDs, internal IPs, domains, and keys should all be generalized.</li>
<li>Write less vague conclusions, more reasoning behind decisions.</li>
<li>Commands should be directly copyable, but risk warnings must be included.</li>
<li>Explain root causes, not just steps.</li>
<li>Production operations must include backup and rollback reminders.</li>
<li>Unfinished drafts shouldn't be pinned; placeholder content shouldn't be treated as published articles.</li>
</ul>
<h2>Future Plans</h2>
<p>Short-term: clean up existing notes, especially AWS, DevOps, and VPS-related content. Medium-term: further organize the blog's visual design and navigation to make categories clearer and article lists more browsable.</p>
<p>This blog isn't very extensive yet, but it's already developing its own direction: technical problems don't just record &quot;how to do it&quot; but more importantly &quot;why it was done this way.&quot; With long-term accumulation, it will become increasingly valuable.</p>
]]></content:encoded>
      <enclosure url="https://picgo.checo.cc/DSC_0180.jpg" type="image/jpeg"/>
    </item>
    <item>
      <title>Local Deployment of DeepSeek</title>
      <link>https://blog.checo.cc/en/posts/AI/1.html</link>
      <guid>https://blog.checo.cc/en/posts/AI/1.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Local Deployment of DeepSeek</source>
      <description>Why Use a Local Large Model The DeepSeek official website has been extremely popular recently and often fails to respond Local deployment offers higher security Local deployment...</description>
      <category>AI</category>
      <pubDate>Sun, 02 Feb 2025 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<h2>Why Use a Local Large Model</h2>
<ol>
<li>
<p>The DeepSeek official website has been extremely popular recently and often fails to respond<br>
<img src="https://picgo.checo.cc/20250209145239.png" alt loading="lazy"></p>
</li>
<li>
<p>Local deployment offers higher security</p>
</li>
<li>
<p>Local deployment can bypass some official restrictions</p>
</li>
</ol>
<!-- more -->
<h2>Test Environment</h2>
<p><strong>OS</strong>: Windows 10 Pro 22H2<br>
<strong>CPU</strong>: AMD Ryzen 5 5600H (6C12T, Base 3.3GHz / Boost 4.2GHz)<br>
<strong>GPU</strong>: NVIDIA GeForce RTX 3050 Ti Laptop GPU (4GB GDDR6 VRAM)<br>
<strong>RAM</strong>: SAMSUNG 16GB DDR4-3200<br>
<strong>IDE</strong>: LM Studio v0.3.9</p>
<h2>Deployment Method</h2>
<ol start="0">
<li>
<p>It is recommended to use an international network environment and enable TUN mode in your proxy tool</p>
</li>
<li>
<p>Download and install the LM Studio client<br>
<a href="https://lmstudio.ai" target="_blank" rel="noopener noreferrer">Click to go</a></p>
</li>
<li>
<p>Change the model download directory (recommended)<br>
This prevents models from consuming too much space on the C drive<br>
<img src="https://picgo.checo.cc/20250209115213.png" alt loading="lazy"></p>
</li>
<li>
<p>Download the appropriate model based on your computer configuration<br>
Models with <code>Distill</code> in the name are distilled models<br>
The recommended model is <code>DeepSeek-R1-Distill-Llama-8B-Abliterated-GGUF</code>, which runs smoothly with 4GB of VRAM. This model also removes some of DeepSeek's built-in restrictions, allowing more freedom in local use<br>
<img src="https://picgo.checo.cc/20250209144621.png" alt loading="lazy"></p>
</li>
<li>
<p>Load the model<br>
After the download completes, click the top bar to load the model you just downloaded<br>
It is recommended to increase <code>GPU Offload</code> and enable <code>Fast Attention</code> for better performance<br>
<img src="https://picgo.checo.cc/20250209144950.png" alt loading="lazy"></p>
</li>
<li>
<p>Start using it<br>
<img src="https://picgo.checo.cc/20250209145930.png" alt loading="lazy"></p>
</li>
</ol>
<h2>Advanced Usage</h2>
]]></content:encoded>
      <enclosure url="https://picgo.checo.cc/20250209145239.png" type="image/png"/>
    </item>
    <item>
      <title>Using DeepSeek-R1 via SiliconFlow</title>
      <link>https://blog.checo.cc/en/posts/AI/2.html</link>
      <guid>https://blog.checo.cc/en/posts/AI/2.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Using DeepSeek-R1 via SiliconFlow</source>
      <description>SiliconFlow provides API services for models like DeepSeek-R1, which can be used with clients like Cherry Studio. This article documents the account registration, API Key acquis...</description>
      <category>AI</category>
      <pubDate>Sun, 09 Feb 2025 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>SiliconFlow provides API services for models like DeepSeek-R1, which can be used with clients like Cherry Studio. This article documents the account registration, API Key acquisition, and client configuration process.</p>
<!-- more -->
<h2>Download and Install Cherry Studio</h2>
<p>This section will be supplemented with specific download and installation steps later.</p>
<h2>Register a SiliconFlow Account</h2>
<p><a href="https://cloud.siliconflow.cn/i/YCwowtrD" target="_blank" rel="noopener noreferrer">Click to register</a></p>
<h2>Get an API Key</h2>
]]></content:encoded>
    </item>
    <item>
      <title>Finding Public DeepSeek Services via FOFA</title>
      <link>https://blog.checo.cc/en/posts/AI/3.html</link>
      <guid>https://blog.checo.cc/en/posts/AI/3.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Finding Public DeepSeek Services via FOFA</source>
      <description>Finding Public DeepSeek Services via FOFA This article has not been completed yet. If continued in the future, it is recommended to focus on risk boundaries, legality, and read-...</description>
      <category>AI</category>
      <pubDate>Tue, 11 Feb 2025 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>This article has not been completed yet. If continued in the future, it is recommended to focus on risk boundaries, legality, and read-only verification methods, to avoid writing it as a tutorial for abusing public services.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Training a TinyStories-Style GPT Model from Scratch</title>
      <link>https://blog.checo.cc/en/posts/AI/4.html</link>
      <guid>https://blog.checo.cc/en/posts/AI/4.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Training a TinyStories-Style GPT Model from Scratch</source>
      <description>A minimalist flowchart for training an LLM from scratchA minimalist flowchart for training an LLM from scratch This project trains a small TinyStories-style GPT model from rando...</description>
      <category>AI</category>
      <pubDate>Sat, 06 Jun 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<figure><img src="/assets/images/posts/llm-from-scratch-hero.png" alt="A minimalist flowchart for training an LLM from scratch" tabindex="0" loading="lazy"><figcaption>A minimalist flowchart for training an LLM from scratch</figcaption></figure>
<p>This project trains a small TinyStories-style GPT model from random initialization on an Apple M4 Mac mini 16GB using MLX. It is not about calling APIs or fine-tuning an existing model, but rather walking through the entire pipeline of data preparation, tokenizer, model architecture, training loop, checkpoint, and inference generation.</p>
<p>This write-up leans more toward an engineering retrospective: the focus is not on training a chat-capable model, but on verifying whether a personal machine can complete an end-to-end small-scale LLM training run.</p>
<p>Project repository: <a href="https://github.com/sergioperezcheco/llm-from-scratch" target="_blank" rel="noopener noreferrer">sergioperezcheco/llm-from-scratch</a></p>
<!-- more -->
<h2>Project Results</h2>
<p>The final trained model is a GPT with 44M parameters:</p>
<p>| Item | Result |<br>
|</p>
]]></content:encoded>
      <enclosure url="https://blog.checo.cc/assets/images/posts/llm-from-scratch-hero.png" type="image/png"/>
    </item>
    <item>
      <title>Windows Server 2008 CloudWatch Agent Certificate Verification Failure</title>
      <link>https://blog.checo.cc/en/posts/AWS/1.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/1.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Windows Server 2008 CloudWatch Agent Certificate Verification Failure</source>
      <description>CloudWatch Agent certificate chain fix architecture diagramCloudWatch Agent certificate chain fix architecture diagram On a Windows Server 2008 EC2 instance, the CloudWatch Agen...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Fri, 01 May 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<figure><img src="/assets/images/posts/aws-cloudwatch-cert-architecture.svg" alt="CloudWatch Agent certificate chain fix architecture diagram" tabindex="0" loading="lazy"><figcaption>CloudWatch Agent certificate chain fix architecture diagram</figcaption></figure>
<p>On a Windows Server 2008 EC2 instance, the CloudWatch Agent service status was normal, but monitoring metrics could never be reported to CloudWatch. The logs repeatedly showed <code>x509: certificate signed by unknown authority</code>, and the root cause was ultimately traced to outdated system root certificates and insufficient TLS support.</p>
<!-- more -->
<h2>Symptoms</h2>
<p>The CloudWatch Agent logs continuously showed errors like:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>WriteToCloudWatch failure, err: RequestError: send request failed</span></span>
<span class="line"><span>caused by: Post https://monitoring.&#x3C;region>.amazonaws.com.cn/:</span></span>
<span class="line"><span>x509: certificate signed by unknown authority</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Also note two easily misdiagnosed points:</p>
<ul>
<li><code>ping monitoring.&lt;region&gt;.amazonaws.com.cn</code> failing does not necessarily mean the service is unreachable — Interface Endpoints typically do not respond to ICMP.</li>
<li>Opening the CloudWatch API endpoint in a browser and getting <code>404 Not Found</code> is also normal — it is not a regular web service.</li>
</ul>
<h2>Root Cause</h2>
<p>The root certificate store on Windows Server 2008 is too old and may lack the root certificates needed to verify AWS server certificates, such as Amazon Root CA 1. Purely internal instances that cannot access the public internet also cannot automatically pull new trusted root certificates.</p>
<p>Additionally, older versions of Windows Server 2008 may also lack patches that support modern TLS chains. The end result is that the CloudWatch Agent cannot complete certificate chain verification when establishing an HTTPS connection.</p>
<h2>Resolution Steps</h2>
<h3>1. Install SHA-2 / TLS Related Patches</h3>
<p>First, install the required security patches for Windows Server 2008, such as KB4474419. The system must be restarted after patch installation.</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">wusa.exe</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> C:\Patches\windows6.</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">1</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">kb4474419</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">v3</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">x64.msu </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">quiet </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">norestart</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">shutdown </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">r </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">t </span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">0</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><h3>2. Import Amazon Root CA 1</h3>
<p>Download the Amazon Root CA 1 certificate:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>https://www.amazontrust.com/repository/AmazonRootCA1.cer</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>In an internal network environment, you can first download it from a machine with public internet access, then securely copy it to the instance.</p>
<p>Import it into the trusted root certificate store:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">certutil </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">addstore </span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">-f</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> Root C:\Patches\AmazonRootCA1.cer</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>You can also import it via the <code>certmgr.msc</code> graphical interface into &quot;Trusted Root Certification Authorities.&quot;</p>
<h3>3. Restart the CloudWatch Agent</h3>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">net stop </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"Amazon CloudWatch Agent"</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">net start </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"Amazon CloudWatch Agent"</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><h2>Verification</h2>
<p>Check the Agent logs to confirm that <code>x509: certificate signed by unknown authority</code> no longer appears.</p>
<p>You can also test TCP 443 connectivity:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">(</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">New-Object</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> System.Net.Sockets.TcpClient).Connect(</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"monitoring.&#x3C;region>.amazonaws.com.cn"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">, </span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">443</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">)</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If the command completes without errors, TCP layer connectivity is confirmed. Ultimately, verify that metrics are being reported normally in the CloudWatch console.</p>
<h2>Summary</h2>
<p>When running CloudWatch Agent on older Windows Server 2008 systems in a purely internal network environment, the common issue is not VPC Endpoint configuration, but outdated system root certificates and TLS capabilities. The recommended resolution order is:</p>
<ol>
<li>Confirm CloudWatch endpoint TCP 443 is reachable.</li>
<li>Install necessary system patches.</li>
<li>Manually import Amazon Root CA 1.</li>
<li>Restart the CloudWatch Agent and observe the logs.</li>
</ol>
<p>Such legacy systems should be included in a migration plan, as they will continually encounter certificate, TLS, patch, and software compatibility issues over time.</p>
]]></content:encoded>
      <enclosure url="https://blog.checo.cc/assets/images/posts/aws-cloudwatch-cert-architecture.svg" type="image/svg+xml"/>
    </item>
    <item>
      <title>SSM Patch Manager Windows Patch Scan Failure: Microsoft Update Service 503</title>
      <link>https://blog.checo.cc/en/posts/AWS/10.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/10.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">SSM Patch Manager Windows Patch Scan Failure: Microsoft Update Service 503</source>
      <description>When using Systems Manager Patch Manager to scan Windows Server 2019 patches, if SSM Agent, network, and permissions are all normal, but WindowsUpdate.log shows the Microsoft up...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Thu, 04 Jun 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>When using Systems Manager Patch Manager to scan Windows Server 2019 patches, if SSM Agent, network, and permissions are all normal, but WindowsUpdate.log shows the Microsoft update service returning 503, the root cause may be on Microsoft's side, not AWS's.</p>
<!-- more -->
<h2>Symptoms</h2>
<p>Executing <code>AWS-RunPatchBaseline</code> scan fails, returning something like:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>The find operation did not complete successfully</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>The HResult may be:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>-2145107934</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Under the same network environment, Windows Server 2016 works normally while Windows Server 2019 fails.</p>
<h2>Troubleshooting Process</h2>
<h3>1. Verify SSM Endpoints</h3>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Test-NetConnection</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> ssm.&#x3C;region>.</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">amazonaws.com</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Port </span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">443</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Test-NetConnection</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> ssmmessages.&#x3C;region>.</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">amazonaws.com</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Port </span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">443</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Test-NetConnection</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> ec2messages.&#x3C;region>.</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">amazonaws.com</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Port </span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">443</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>If using China regions or VPC Endpoints, replace with the corresponding domain names.</p>
<h3>2. Verify Windows Update Network</h3>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Test-NetConnection</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> sls.update.microsoft.com</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Port </span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">443</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Test-NetConnection</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> download.windowsupdate.com</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Port </span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">80</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>Also check if WSUS is configured:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Get-ItemProperty</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate"</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">ErrorAction SilentlyContinue</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Get-ItemProperty</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU"</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">ErrorAction SilentlyContinue</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><h3>3. Export Windows Update Log</h3>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Get-WindowsUpdateLog</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If the log contains:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>The server returned HTTP status code '503'</span></span>
<span class="line"><span>The service is temporarily overloaded</span></span>
<span class="line"><span>*FAILED* [80244022] Web service call</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>This means the Windows Update client has connected to the Microsoft service, but the server returned an unavailable status.</p>
<h2>Root Cause</h2>
<p>Windows Server 2019 may be accessing a specific Microsoft update service domain, such as:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>fe3.delivery.mp.microsoft.com</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If that service endpoint is temporarily overloaded, it returns HTTP 503, corresponding to error code:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>0x80244022</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>At the same time, Windows Server 2016 may work fine because it accesses a different set of update service domains that are not affected.</p>
<h2>Workarounds</h2>
<h3>1. Wait for Microsoft Service Recovery</h3>
<p>If you've confirmed that the network, SSM, and WSUS configuration are all normal, and the error is clearly 503, the most straightforward approach is to wait for the service to recover and retry.</p>
<h3>2. Manually Download Patches</h3>
<p>Download the <code>.msu</code> from Microsoft Update Catalog, then install via script or SSM Run Command:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>https://www.catalog.update.microsoft.com/</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h3>3. Pre-cache Patches</h3>
<p>Patch Manager itself does not provide a standard &quot;download only, don't install&quot; mode. You can use a custom SSM document to pre-download patches and execute installation during the maintenance window.</p>
<h3>4. Deploy WSUS</h3>
<p>For environments with strict patch window requirements, you can deploy an on-premises WSUS server to pre-sync patches locally, reducing dependency on the public Microsoft update service.</p>
<h2>Summary</h2>
<p>SSM Patch Manager scan failures are not necessarily SSM issues. When troubleshooting, work through the layers:</p>
<ol>
<li>Whether the SSM Agent is online.</li>
<li>Whether AWS endpoints are reachable.</li>
<li>Whether Windows Update endpoints are reachable.</li>
<li>Whether WindowsUpdate.log shows a Microsoft server-side 503.</li>
</ol>
<p>If the logs clearly show <code>0x80244022</code> and HTTP 503, it should generally be treated as a temporary Microsoft update service unavailability — consider retrying, manual patching, pre-caching, or WSUS.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Windows Server 2016 Keeps Rolling Back After Patch Installation</title>
      <link>https://blog.checo.cc/en/posts/AWS/11.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/11.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Windows Server 2016 Keeps Rolling Back After Patch Installation</source>
      <description>After installing a cumulative update on Windows Server 2016, if the reboot phase displays &amp;quot;We couldn&amp;apos;t complete the updates&amp;quot; and repeatedly rolls back, the root cause ...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Wed, 13 May 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>After installing a cumulative update on Windows Server 2016, if the reboot phase displays &quot;We couldn't complete the updates&quot; and repeatedly rolls back, the root cause may not be disk space or component store corruption — it could be historical user profile corruption causing the per-user registry phase to fail.</p>
<!-- more -->
<h2>Symptoms</h2>
<p>The patch installation phase appears successful, but upon reboot:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>We couldn't complete the updates</span></span>
<span class="line"><span>Undoing changes</span></span>
<span class="line"><span>Don't turn off your computer</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>After entering the system, the OS Build has not increased, and reinstalling still results in repeated rollbacks.</p>
<p>WindowsUpdate.log may show:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>Post-reboot status ... 0x800f0922</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>CBS.log contains:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>CBS_E_INSTALLERS_FAILED</span></span>
<span class="line"><span>Per-User Registry Installer ... 0x80070002</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>CSI logs may also show historical user <code>NTUSER.DAT</code> unload failures.</p>
<h2>Troubleshooting Approach</h2>
<p>First, rule out common causes:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">sfc </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">scannow</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">DISM </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Cleanup</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Image </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">RestoreHealth</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>Also check:</p>
<ul>
<li>Whether SSU is already installed.</li>
<li>Whether the C drive has sufficient space.</li>
<li>Whether failure persists after resetting SoftwareDistribution / catroot2.</li>
</ul>
<p>If all of these are normal, examine the CBS/CSI logs to see if failures are concentrated in the Per-User Registry Installer phase.</p>
<h2>Root Cause</h2>
<p>In this case, the issue was concentrated in historical user profiles. The server had multiple legacy user directories, Unknown Profiles, and even abnormally large user profiles. During the reboot phase, updates need to load or unload user registry hives, and some <code>NTUSER.DAT</code> files cannot be properly unloaded, causing the patch transaction to fail and triggering a rollback.</p>
<h2>Solution</h2>
<h3>1. Back Up First</h3>
<p>Before performing operations in production, create an AMI or snapshot. User profile cleanup carries data risk and should not be done by blindly deleting in production.</p>
<h3>2. Clean Up Unknown Profiles</h3>
<p>Via the GUI:</p>
<ol>
<li>Run <code>sysdm.cpl</code>.</li>
<li>Go to the &quot;Advanced&quot; tab.</li>
<li>Click &quot;Settings&quot; in the &quot;User Profiles&quot; section.</li>
<li>Delete profiles with Unknown status or those confirmed to be no longer in use.</li>
</ol>
<h3>3. Clean Up Registry ProfileList If Necessary</h3>
<p>Carefully open the registry:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Cross-reference the <code>C:\Users</code> directory with SIDs in ProfileList, and clean up invalid entries. Export a registry backup before proceeding.</p>
<h3>4. Reinstall the Patch</h3>
<p>After cleanup, reboot, then reinstall the target cumulative update.</p>
<h3>5. Temporary Workaround</h3>
<p>If profiles cannot be cleaned up immediately and a newer monthly patch has been released, you can test installing the updated cumulative patch directly. Windows cumulative updates typically include the previous month's security content, but this should only be used as a temporary workaround — the underlying issue should still be addressed through cleanup.</p>
<h2>Summary</h2>
<p>When Windows patches roll back during the reboot phase, don't focus solely on Windows Update. If CBS/CSI logs point to the Per-User Registry Installer and user hive unload failures, focus on examining historical user profiles.</p>
<p>Profile accumulation is common on servers that have been accessed by many users over a long period. It is recommended to regularly clean up obsolete profiles to avoid issues surfacing during patch windows.</p>
]]></content:encoded>
    </item>
    <item>
      <title>FSx ONTAP SMB Share Permission Troubleshooting</title>
      <link>https://blog.checo.cc/en/posts/AWS/12.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/12.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">FSx ONTAP SMB Share Permission Troubleshooting</source>
      <description>After adding NTFS security permissions to an FSx ONTAP SMB share, users are still unable to access it. The key to this issue is: the effective Windows SMB permission is the inte...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Mon, 06 Apr 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>After adding NTFS security permissions to an FSx ONTAP SMB share, users are still unable to access it. The key to this issue is: the effective Windows SMB permission is the intersection of share permissions and NTFS permissions, and Kerberos tickets do not automatically refresh group membership while the user remains logged in.</p>
<!-- more -->
<h2>Symptoms</h2>
<p>Users receive a permission denied message when accessing the SMB share path. The administrator has already added permissions to the target domain group in the &quot;Security&quot; tab, but access still fails.</p>
<h2>Key Concepts</h2>
<p>SMB share access is controlled by two permission layers simultaneously:</p>
<ul>
<li>Share Permissions</li>
<li>Security Permissions / NTFS Permissions</li>
</ul>
<p>The effective permission is the intersection of both. If only NTFS permissions are configured without share permissions, users may still be denied.</p>
<h2>Troubleshooting Steps</h2>
<h3>1. Check Share Permissions</h3>
<p>Log in to a domain-joined Windows machine with a domain administrator account and open:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>compmgmt.msc</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Connect to the FSx SVM DNS name, then navigate to:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>System Tools -> Shared Folders -> Shares</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Find the target share, open its properties, and check the &quot;Share Permissions&quot; tab. Confirm that the target user or group has at least Read permission.</p>
<h3>2. Check NTFS Permissions</h3>
<p>Then check the &quot;Security&quot; tab to confirm the file system permissions also include the target user or group.</p>
<h3>3. Refresh Kerberos Tickets</h3>
<p>If a user was just added to a domain group, the Kerberos TGT in their current login session may still contain old group membership information.</p>
<p>The most reliable approach is to have the user fully log off and log back in, rather than just locking the screen or disconnecting RDP.</p>
<p>You can also try purging tickets:</p>
<div class="language-cmd line-numbers-mode" data-highlighter="shiki" data-ext="cmd" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-cmd"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">klist purge</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>But in production troubleshooting, a full logoff and logon is more straightforward and reliable.</p>
<h2>Why This Happens</h2>
<p>After a Windows user logs in, they receive a Kerberos ticket containing group membership information. If an administrator modifies group memberships while the user is logged in, the user's existing ticket will not automatically reflect the new permissions. FSx still sees the old identity information, causing the permission check to fail.</p>
<h2>Summary</h2>
<p>When FSx ONTAP SMB share access is denied, investigate in this order:</p>
<ol>
<li>Whether share permissions allow access.</li>
<li>Whether NTFS permissions allow access.</li>
<li>Whether the user has logged off and back in to refresh Kerberos tickets.</li>
</ol>
<p>Only checking the &quot;Security&quot; tab is not enough — this is the most common mistake in SMB permission troubleshooting.</p>
]]></content:encoded>
    </item>
    <item>
      <title>FSx for Windows Creation Fails: TCP 9389 Unreachable to Self-Managed AD</title>
      <link>https://blog.checo.cc/en/posts/AWS/13.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/13.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">FSx for Windows Creation Fails: TCP 9389 Unreachable to Self-Managed AD</source>
      <description>When creating FSx for Windows File Server using a self-managed Active Directory, if Single-AZ 2 or Multi-AZ file system creation fails and reports Get-ADComputer: Unable to cont...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Thu, 04 Jun 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>When creating FSx for Windows File Server using a self-managed Active Directory, if Single-AZ 2 or Multi-AZ file system creation fails and reports <code>Get-ADComputer: Unable to contact the server</code>, focus on checking TCP 9389 connectivity from the FSx subnet to the domain controllers.</p>
<!-- more -->
<h2>Symptoms</h2>
<p>FSx creation fails, with the following appearing in the console or error message:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>setupFileServerRole failed</span></span>
<span class="line"><span>Get-ADComputer : Unable to contact the server.</span></span>
<span class="line"><span>This may be because this server does not exist, it is currently down,</span></span>
<span class="line"><span>or it does not have the Active Directory Web Services running.</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>This error typically occurs when FSx is setting up the file server role, joining, or querying AD objects.</p>
<h2>Root Cause</h2>
<p><code>Get-ADComputer</code> depends on Active Directory Web Services, i.e., ADWS. ADWS uses:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>TCP 9389</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>For FSx for Windows Single-AZ 2 and Multi-AZ types, FSx needs to access the domain controller's TCP 9389. If this port is blocked by security groups, NACLs, enterprise firewalls, or cross-region network policies, file system creation will fail.</p>
<h2>Verification Method</h2>
<p>On a domain-joined EC2 Windows instance in the same subnet and same security group as FSx, run the AD validation tool.</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Install-WindowsFeature</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> RSAT</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">AD</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">PowerShell</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Invoke-WebRequest</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> `</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">  "https://docs.aws.amazon.com/fsx/latest/WindowsGuide/samples/AmazonFSxADValidation.zip"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> `</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">  -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">OutFile </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"AmazonFSxADValidation.zip"</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Expand-Archive</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Path </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"AmazonFSxADValidation.zip"</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Import-Module</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> .\AmazonFSxADValidation</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">$Credential</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> =</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> Get-Credential</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">$Args </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">=</span><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD"> @</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">{</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">  DomainDNSRoot</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">  =</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "example.com"</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">  DnsIpAddresses</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> =</span><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD"> @</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">(</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"DC_IP_1"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">, </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"DC_IP_2"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">)</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">  SubnetIds</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">      =</span><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD"> @</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">(</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"subnet-xxxxxxxx"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">)</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">  Credential</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">     =</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75"> $Credential</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">}</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">$Result</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> =</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> Test-FSxADConfiguration</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75"> @Args</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">$Result.Failures</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>If the output contains a TCP 9389 failure entry, you can confirm it is an ADWS port connectivity issue.</p>
<h2>Why Single-AZ 1 Might Succeed</h2>
<p>Single-AZ 1 has different requirements for TCP 9389 and may succeed in the same environment. This can help determine whether service account permissions, DNS, and basic AD ports are functioning properly.</p>
<p>If Single-AZ 1 succeeds but Single-AZ 2 / Multi-AZ fails, the troubleshooting focus should shift to TCP 9389.</p>
<h2>Solution</h2>
<p>Allow TCP 9389 from the FSx subnet to all domain controllers:</p>
<ul>
<li>FSx security group outbound rules.</li>
<li>Domain controller security group inbound rules.</li>
<li>Network ACL rules in both directions.</li>
<li>Local or cross-region firewall policies.</li>
<li>Intermediate firewalls in enterprise networks.</li>
</ul>
<p>After allowing access, re-run the validation tool to confirm there are no failures, then recreate FSx.</p>
<h2>Summary</h2>
<p>When FSx for Windows fails to join a self-managed AD, don't only check common ports like 389, 445, and 88. For Single-AZ 2 and Multi-AZ, TCP 9389 is equally critical.</p>
<p>When you see <code>Get-ADComputer</code> or ADWS-related errors, prioritize verifying 9389 connectivity from the FSx subnet to all DCs.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Key Points for EC2 SQL Server HA Standby Node License Cost Reduction</title>
      <link>https://blog.checo.cc/en/posts/AWS/14.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/14.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Key Points for EC2 SQL Server HA Standby Node License Cost Reduction</source>
      <description>Amazon EC2 High Availability for SQL Server can provide license cost reduction for eligible SQL Server HA standby nodes. However, this cost reduction has strict prerequisites — ...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Wed, 03 Jun 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>Amazon EC2 High Availability for SQL Server can provide license cost reduction for eligible SQL Server HA standby nodes. However, this cost reduction has strict prerequisites — notably, the standby node cannot carry active workloads or serve as a readable secondary replica for queries.</p>
<!-- more -->
<h2>Prerequisites</h2>
<p>Before enabling SQL Server HA license savings, confirm the environment meets the requirements:</p>
<ul>
<li>Windows Server 2019 or later.</li>
<li>SQL Server 2017 or later.</li>
<li>An HA cluster supports only two EC2 nodes.</li>
<li>Instances need to run SSM Agent.</li>
<li>Instance IAM Role needs EC2 SQL HA and SSM-related permissions.</li>
</ul>
<p>If the environment is still on Windows Server 2016, or the cluster has more than two nodes, the prerequisites for this feature are not met.</p>
<h2>Standby Node Restrictions</h2>
<p>To qualify for license cost reduction, the standby node must remain passive:</p>
<ul>
<li>It does not process incoming business traffic.</li>
<li>It does not run active SQL Server workloads.</li>
<li>It cannot serve as a readable secondary replica to handle read queries.</li>
<li>It should not run standalone databases outside the availability group.</li>
</ul>
<p>The core determination is simple: as long as the node is providing data services, it is no longer a pure standby.</p>
<h2>Readable Secondary Affects Cost Reduction</h2>
<p>When Readable Secondary is enabled in an Always On availability group, the secondary replica can be accessed by applications, reports, or manual queries. Under license logic, this constitutes active use and requires full SQL Server licensing.</p>
<p>Therefore, if the goal is to obtain the standby node license cost reduction, do not enable readable secondary replicas.</p>
<h2>Does Backup Require a Readable Secondary?</h2>
<p>No. SQL Server supports executing certain backup scenarios on non-readable secondary replicas. In other words, for full backups and log backups, there is no need to set the secondary replica as readable.</p>
<p>Before actual configuration, verify against the SQL Server version and availability group backup preferences.</p>
<h2>Enablement Steps Overview</h2>
<h3>1. Confirm SSM Agent Is Online</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">aws</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ssm</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> describe-instance-information</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>The instance should show <code>PingStatus: Online</code>.</p>
<h3>2. Configure IAM Permissions</h3>
<p>Attach the following to the instance profile:</p>
<ul>
<li><code>AmazonSSMManagedInstanceCore</code></li>
<li><code>AWSEC2SqlHaInstancePolicy</code></li>
</ul>
<h3>3. Prepare SQL Credentials</h3>
<p>By default, <code>NT AUTHORITY\SYSTEM</code> can be used to read SQL Server HA metadata. If the environment restricts this account, place the SQL Server credentials in Secrets Manager and specify them during enablement.</p>
<h3>4. Enable in the EC2 Console</h3>
<p>In the EC2 console, select the HA cluster-related instances and navigate to:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>Actions -> Instance settings -> Modify SQL High Availability settings</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Check the prerequisites, and enable license savings after they pass.</p>
<p>After enabling, you should see:</p>
<ul>
<li>Primary node: <code>Active / Full license included</code></li>
<li>Standby node: <code>Standby / Waived</code></li>
</ul>
<h2>Summary</h2>
<p>SQL Server HA standby node license cost reduction is not a simple toggle. What truly matters is that the standby node must remain passive.</p>
<p>If you enable a readable secondary for queries, reports, or application reads, you lose the cost reduction eligibility. For backup scenarios, prioritize using SQL Server's supported secondary replica backup capabilities rather than turning the standby node into a readable workload node.</p>
]]></content:encoded>
    </item>
    <item>
      <title>EC2 Windows: Recovering Server Manager After Uninstalling .NET</title>
      <link>https://blog.checo.cc/en/posts/AWS/15.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/15.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">EC2 Windows: Recovering Server Manager After Uninstalling .NET</source>
      <description>Do not treat &amp;quot;.NET Framework 4 Features&amp;quot; as a regular application and uninstall it on Windows Server. It is a dependency for many management components, including Serv...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Wed, 03 Jun 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>Do not treat &quot;.NET Framework 4 Features&quot; as a regular application and uninstall it on Windows Server. It is a dependency for many management components, including Server Manager, PowerShell modules, and IIS/WCF-related features. Disabling it by mistake can cause both Server Manager and <code>Install-WindowsFeature</code> to stop working.</p>
<!-- more -->
<h2>Symptoms</h2>
<p>After unchecking <code>.NET Framework 4</code> in Server Manager's &quot;Remove Roles and Features&quot; and rebooting the instance:</p>
<ul>
<li>Server Manager won't open.</li>
<li>PowerShell reports the <code>ServerManager</code> command is not recognized.</li>
<li><code>Install-WindowsFeature</code> reports the feature name doesn't exist.</li>
<li>Some PowerShell management capabilities stop working.</li>
</ul>
<p>Example error:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>ServerManager : The term 'ServerManager' is not recognized</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h2>Root Cause</h2>
<p>Windows Server's Server Manager and related PowerShell modules depend on <code>NetFx4-OC-Package</code>. Unchecking <code>.NET Framework 4 Features</code> in the GUI actually disables a batch of OC packages that depend on NetFx4.</p>
<p>This is not the same as the <code>.NET Framework 4.8</code> runtime version. The registry may still show .NET 4.8 is present, but the Windows optional component <code>NetFx4</code> has been disabled.</p>
<p>Additionally, <code>NetFx3</code> cannot substitute for <code>NetFx4</code>. Running:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">DISM </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Enable-Feature</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">FeatureName:NetFx3 </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">All</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>will not restore Server Manager, which depends on .NET 4.</p>
<h2>Recovery Steps</h2>
<p>Before proceeding, it is recommended to create an AMI backup. All commands should be run as administrator.</p>
<h3>1. Enable NetFx4</h3>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">DISM </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Enable-Feature</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">FeatureName:NetFx4 </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">All</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h3>2. Enable Server Manager GUI Management Components</h3>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">DISM </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Enable-Feature</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">FeatureName:Server</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Gui</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Mgmt </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">All</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h3>3. Reboot the Instance</h3>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">shutdown </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">r </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">t </span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">0</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Verify after rebooting.</p>
<h3>4. Restore Other Dependent Components as Needed</h3>
<p>If your workload uses IIS, WCF, PowerShell ISE, or DSC, enable them as needed:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">DISM </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Enable-Feature</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">FeatureName:NetFx4Extended</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">ASPNET45 </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">All</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">DISM </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Enable-Feature</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">FeatureName:WCF</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">HTTP</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Activation45 </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">All</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">DISM </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Enable-Feature</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">FeatureName:WCF</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">TCP</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">PortSharing45 </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">All</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">DISM </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Enable-Feature</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">FeatureName:IIS</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">ASPNET45 </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">All</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">DISM </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Enable-Feature</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">FeatureName:IIS</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">NetFxExtensibility45 </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">All</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">DISM </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Enable-Feature</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">FeatureName:MicrosoftWindowsPowerShellISE </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">All</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">DISM </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Enable-Feature</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">FeatureName:DSC</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Service </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">All</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2>Verification</h2>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">ServerManager</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Get-Command</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> Install-WindowsFeature</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">DISM </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Get-Features</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> | findstr </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">I </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"NetFx4 Server-Gui PowerShell"</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2>Summary</h2>
<p>To meet .NET version compliance requirements, the correct approach is to install .NET cumulative updates, not to disable <code>.NET Framework 4 Features</code>. The latter does not make .NET &quot;safely disappear&quot; from the system — instead, it breaks the Windows Server management toolchain.</p>
<p>During recovery, enabling <code>NetFx4</code> alone is not enough — you must also enable <code>Server-Gui-Mgmt</code> and reboot.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Key Considerations for Deploying BitLocker on EC2 Windows Instances</title>
      <link>https://blog.checo.cc/en/posts/AWS/16.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/16.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Key Considerations for Deploying BitLocker on EC2 Windows Instances</source>
      <description>Enabling BitLocker system drive encryption on EC2 Windows instances is feasible, but the risks are higher than on physical machines. The key issue is that EC2 typically lacks a ...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Sat, 28 Mar 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>Enabling BitLocker system drive encryption on EC2 Windows instances is feasible, but the risks are higher than on physical machines. The key issue is that EC2 typically lacks a traditional TPM, so after encrypting the system drive, a password is required during the boot phase, and the standard console may not provide a reliable input channel.</p>
<!-- more -->
<h2>Risk Points</h2>
<p>If you enable BitLocker directly on the C drive and reboot, you may encounter:</p>
<ul>
<li>The instance status shows running, but RDP cannot connect.</li>
<li>The boot phase is waiting for a BitLocker password or recovery key.</li>
<li>The console shows a black screen or cannot accept input.</li>
<li>The workload is unavailable for an extended period, and recovery is only possible through snapshot/AMI rollback.</li>
</ul>
<p>Therefore, you must first verify that the EC2 serial console is available.</p>
<h2>Pre-Operation Preparation</h2>
<ul>
<li>Create an AMI or EBS snapshot.</li>
<li>Perform a complete rehearsal on a test instance.</li>
<li>Record and securely store the recovery key offline.</li>
<li>Confirm acceptance of a reboot and brief downtime window.</li>
</ul>
<h2>Enable Serial Console SAC</h2>
<p>Run the following in an administrator PowerShell session:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">bcdedit </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">ems </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">'{current}'</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> on</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">bcdedit </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">emssettings EMSPORT:</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">1</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> EMSBAUDRATE:</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">115200</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">bcdedit </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">set </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">'{bootmgr}'</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> displaybootmenu yes</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">bcdedit </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">set </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">'{bootmgr}'</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> timeout </span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">15</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">bcdedit </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">set </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">'{bootmgr}'</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> bootems yes</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">shutdown </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">r </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">t </span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">0</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>After rebooting, confirm through the EC2 console via &quot;Connect -&gt; EC2 Serial Console&quot; that you can access the boot interface. If the serial console is not available, do not proceed with encrypting the system drive.</p>
<h2>Install BitLocker Feature</h2>
<p>Add BitLocker via Server Manager, or use PowerShell:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Install-WindowsFeature</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> BitLocker </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">IncludeAllSubFeature </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">IncludeManagementTools</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Restart-Computer</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><h2>Configure Boot Without TPM</h2>
<p>Run <code>gpedit.msc</code> and navigate to:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>Computer Configuration -> Administrative Templates -> Windows Components -> BitLocker Drive Encryption -> Operating System Drives</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Enable &quot;Require additional authentication at startup&quot; and check &quot;Allow BitLocker without a compatible TPM&quot;.</p>
<h2>Encrypt Data Drives</h2>
<p>For data drives, test first:</p>
<ol>
<li>Right-click the data drive and enable BitLocker.</li>
<li>Choose password unlock.</li>
<li>Save the recovery key.</li>
<li>Configure auto-unlock after encryption completes.</li>
</ol>
<p>Without auto-unlock, the workload may become unavailable after every reboot because the data drive is locked.</p>
<h2>Encrypt the System Drive</h2>
<p>Enable BitLocker on the C drive, choose password unlock, save the recovery key, and run the BitLocker system check.</p>
<p>After rebooting:</p>
<ol>
<li>RDP is temporarily unavailable.</li>
<li>Connect to the EC2 serial console.</li>
<li>At the black screen, enter the BitLocker password and press Enter.</li>
<li>Windows unlocks and continues booting.</li>
<li>Restore RDP after the system finishes booting.</li>
</ol>
<h2>Summary</h2>
<p>The key to using BitLocker on EC2 Windows is not clicking &quot;Enable Encryption&quot; — it's whether you can unlock during the boot phase.</p>
<p>You must:</p>
<ul>
<li>Create an AMI/snapshot before encrypting.</li>
<li>Enable and verify the EC2 serial console first.</li>
<li>Save the recovery key.</li>
<li>Configure auto-unlock for data drives.</li>
<li>Rehearse the complete reboot process in a test environment first.</li>
</ul>
<p>If you only need static EBS encryption in the cloud, prioritize using EBS encryption. BitLocker is more suitable for BYOL or specific compliance scenarios.</p>
]]></content:encoded>
    </item>
    <item>
      <title>EC2 Windows Unable to RDP: Winlogon Failure Due to Memory Exhaustion</title>
      <link>https://blog.checo.cc/en/posts/AWS/17.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/17.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">EC2 Windows Unable to RDP: Winlogon Failure Due to Memory Exhaustion</source>
      <description>When an EC2 Windows instance passes status checks, responds to ping, but RDP connections fail, and Stop &amp;amp; Start resolves the issue — don&amp;apos;t only look at the network. Windows ...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Sat, 25 Apr 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>When an EC2 Windows instance passes status checks, responds to ping, but RDP connections fail, and Stop &amp; Start resolves the issue — don't only look at the network. Windows internal resource exhaustion can also cause critical processes like Winlogon to crash.</p>
<!-- more -->
<h2>Symptoms</h2>
<ul>
<li>Instance is in running state.</li>
<li>System status checks and instance status checks pass.</li>
<li>Security group allows port 3389.</li>
<li>Instance responds to ping.</li>
<li>RDP cannot connect.</li>
<li>Stop &amp; Start resolves the issue.</li>
</ul>
<p>This behavior closely resembles a network issue, but the logs may point to insufficient system resources.</p>
<h2>Key Logs</h2>
<p>The event log may contain:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>Not enough storage is available to process this command.</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>And:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>System.OutOfMemoryException</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>You may also see Winlogon-related events, such as Winlogon crashing or failing to create a login session.</p>
<p>Here, &quot;storage&quot; does not necessarily refer to disk — in the context of Windows error codes, it can also mean insufficient memory or system resources.</p>
<h2>Root Cause</h2>
<p>When instance memory and page file resources are exhausted, the system cannot allocate resources for critical processes. Components required for RDP login — such as Winlogon, LSASS, and Remote Desktop Services — may fail to function properly.</p>
<p>Stop &amp; Start clears the memory state, so the issue temporarily disappears, but if the instance size or application memory usage is not addressed, the problem will recur.</p>
<h2>Troubleshooting Direction</h2>
<h3>1. Check Event Logs</h3>
<p>Focus on the period around the failure in:</p>
<ul>
<li>Application.evtx</li>
<li>System.evtx</li>
<li>Setup.evtx</li>
</ul>
<p>Look for:</p>
<ul>
<li><code>OutOfMemoryException</code></li>
<li><code>Not enough storage is available</code></li>
<li>Winlogon errors</li>
<li>Security software or monitoring agent anomalies</li>
<li>Windows Update-related anomalies</li>
</ul>
<h3>2. Check Instance Size</h3>
<p>Confirm whether the current instance memory meets peak workload demands. If it is consistently near the upper limit, upgrade the instance size or optimize the application.</p>
<h3>3. Deploy OS Metrics Monitoring</h3>
<p>CloudWatch does not collect Windows memory metrics by default. You need to install the CloudWatch Agent to collect:</p>
<ul>
<li>Memory utilization</li>
<li>Pagefile utilization</li>
<li>Disk utilization</li>
<li>Key process metrics</li>
</ul>
<p>And set up alarms, such as alerting when memory utilization exceeds 85%.</p>
<h2>Recommended Actions</h2>
<h3>Short-Term Recovery</h3>
<p>Stop &amp; Start can release memory and temporarily restore login capability. But this is not a permanent fix.</p>
<h3>Medium-Term Optimization</h3>
<p>Investigate applications, monitoring agents, and security software that consume high memory to determine if there are memory leaks or overly heavy configurations.</p>
<h3>Long-Term Solution</h3>
<p>If peak workloads genuinely require more memory, upgrade to a larger instance size. Before upgrading, create an AMI and confirm instance type compatibility with ENA/NVMe.</p>
<h2>Summary</h2>
<p>RDP login failure is not necessarily a port 3389, security group, or NACL issue. As long as the instance is still pingable and status checks pass, you should also examine the Windows event logs.</p>
<p>If the logs show OOM, insufficient system resources, and Winlogon anomalies, the root cause is most likely memory exhaustion. Stop &amp; Start only provides temporary recovery — long-term, you need to monitor memory and adjust instance size or application configuration.</p>
]]></content:encoded>
    </item>
    <item>
      <title>EC2 Windows Unable to Mount SMB: EDR Interception and Workgroup Authentication</title>
      <link>https://blog.checo.cc/en/posts/AWS/18.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/18.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">EC2 Windows Unable to Mount SMB: EDR Interception and Workgroup Authentication</source>
      <description>Two EC2 Windows instances in the same VPC fail to access a shared folder via SMB. Security groups and NACLs are open, Windows Firewall is disabled, but net use reports error 179...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Wed, 03 Jun 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>Two EC2 Windows instances in the same VPC fail to access a shared folder via SMB. Security groups and NACLs are open, Windows Firewall is disabled, but <code>net use</code> reports error 1792, and packet capture shows <code>STATUS_NETLOGON_NOT_STARTED</code>. The root cause is not VPC networking — security software is intercepting the SMB authentication flow.</p>
<!-- more -->
<h2>Symptoms</h2>
<p>Client access attempt:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>\\&#x3C;server-private-ip>\share</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Cannot open, and no authentication prompt appears. Command line execution:</p>
<div class="language-cmd line-numbers-mode" data-highlighter="shiki" data-ext="cmd" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-cmd"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">net use Z: \\&#x3C;</span><span style="--shiki-light:#C18401;--shiki-dark:#E5C07B">server</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">-</span><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD">private</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">-</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">ip</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">>\</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">share</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Reports:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>System error 1792 has occurred.</span></span>
<span class="line"><span>The attempt to logon to the network account failed because the network logon service is not started.</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>Afterward, port 445 connection timeouts and ping failures may even occur.</p>
<h2>Troubleshooting Process</h2>
<h3>1. Rule Out AWS Network Issues First</h3>
<p>Confirm:</p>
<ul>
<li>Both instances are in the same VPC or have routable connectivity.</li>
<li>Security group allows TCP 445.</li>
<li>NACL is not blocking.</li>
<li>Route table has a local or correct route.</li>
<li>Windows Defender Firewall policy is not blocking.</li>
</ul>
<h3>2. Packet Capture on Both Ends</h3>
<p>Packet capture shows the SMB protocol has already begun negotiation:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>SMB2 Negotiate Protocol Request</span></span>
<span class="line"><span>SMB2 Negotiate Protocol Response</span></span>
<span class="line"><span>SMB2 Session Setup Request</span></span>
<span class="line"><span>SMB2 Session Setup Response: STATUS_NETLOGON_NOT_STARTED</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>This indicates traffic has reached the server — it is not an AWS underlying network packet drop.</p>
<h3>3. Understanding Netlogon</h3>
<p>In a Workgroup environment, the <code>Netlogon</code> service not running by default is normal. Local account SMB authentication typically completes through local SAM + NTLM, and should not necessarily fail just because Netlogon is stopped.</p>
<p>If <code>STATUS_NETLOGON_NOT_STARTED</code> is returned and then all traffic is blocked, suspect that security software or EDR is intercepting SMB authentication traffic.</p>
<h2>Solution</h2>
<h3>1. Temporarily Disable EDR to Verify</h3>
<p>Temporarily disable security software during a change window to verify whether SMB access is restored. If port 445 and ping both recover after disabling, the root cause is essentially confirmed.</p>
<h3>2. Use Explicit Local Account Authentication</h3>
<p>In a Workgroup environment, do not rely on implicit credentials. Use a server local account:</p>
<div class="language-cmd line-numbers-mode" data-highlighter="shiki" data-ext="cmd" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-cmd"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">net use Z: \\&#x3C;</span><span style="--shiki-light:#C18401;--shiki-dark:#E5C07B">server</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">-</span><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD">private</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">-</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">ip</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">>\</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">share</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> /</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">user</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">:&#x3C;</span><span style="--shiki-light:#C18401;--shiki-dark:#E5C07B">server</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">-</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">computer</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">-</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">name</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">>\</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">Administrator</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Note that <code>&lt;server-computer-name&gt;</code> must be the server's computer name, not the client's.</p>
<h3>3. Adjust EDR Policy</h3>
<p>Contact the security software vendor or security team to whitelist normal SMB/NTLM authentication traffic and prevent false positives.</p>
<h3>4. Long-Term Recommendation: Join a Domain</h3>
<p>If multiple Windows instances frequently share files, consider joining Active Directory and using domain accounts with group-based permissions to reduce the complexity of Workgroup + local account authentication.</p>
<h2>Summary</h2>
<p>When EC2 Windows SMB access fails, don't only look at security groups. If packet capture already shows SMB protocol negotiation and authentication-stage errors, the issue has moved into the OS or security software layer.</p>
<p><code>STATUS_NETLOGON_NOT_STARTED</code> in a Workgroup scenario does not necessarily mean Netlogon itself is the root cause. Combined with subsequent traffic being blocked, EDR or security software interception should be a primary investigation focus.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Exporting EC2 Windows Root Volume as VMDK and Booting in VMware</title>
      <link>https://blog.checo.cc/en/posts/AWS/19.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/19.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Exporting EC2 Windows Root Volume as VMDK and Booting in VMware</source>
      <description>EC2 instances launched from public Windows AMIs cannot be directly exported as VMDK via VM Import/Export because they contain AWS-licensed software. The workaround is to perform...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Wed, 03 Jun 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>EC2 instances launched from public Windows AMIs cannot be directly exported as VMDK via VM Import/Export because they contain AWS-licensed software. The workaround is to perform a block-level read of the EBS root volume after stopping the instance, convert it with <code>qemu-img</code>, and offline-enable Windows generic storage drivers to avoid blue screens in VMware.</p>
<!-- more -->
<h2>Why VM Export Fails</h2>
<p>Running <code>create-instance-export-task</code> may produce:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>An error occurred (NotExportable) when calling the CreateInstanceExportTask operation:</span></span>
<span class="line"><span>The image ID (ami-xxxxxxxx) provided contains AWS-licensed software and is not exportable.</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>This is a product limitation, not an IAM permissions issue. Windows / SQL Server / Marketplace images launched from public AWS AMIs are generally non-exportable.</p>
<h2>Alternatives</h2>
<p>Available options:</p>
<ul>
<li>If you can log in to the instance: use Disk2vhd.</li>
<li>If you don't want to spin up a rescue instance: use coldsnap + qemu-img.</li>
<li>If the instance can be stopped or has crashed: use a rescue instance for block-level EBS reading, then qemu-img conversion.</li>
</ul>
<p>This article documents the third approach.</p>
<h2>Key Pitfall: Storage Controller Drivers</h2>
<p>EC2 Windows typically runs on NVMe devices. After exporting to VMware, the controller may change to LSI Logic SAS, SATA, or IDE. If these drivers are not set to Boot start in the Windows registry, you'll get a blue screen at boot:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>UNMOUNTABLE_BOOT_VOLUME</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>So before conversion, you need to offline-modify the SYSTEM hive and set the Start value of common storage drivers to 0.</p>
<h2>Procedure</h2>
<h3>1. Stop Instance and Detach Volume</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">aws</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ec2</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> stop-instances</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> --instance-ids</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> &#x3C;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">instance-i</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">d></span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">aws</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ec2</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> wait</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> instance-stopped</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> --instance-ids</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> &#x3C;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">instance-i</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">d></span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">aws</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ec2</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> detach-volume</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> --volume-id</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> &#x3C;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">volume-i</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">d></span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">aws</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ec2</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> wait</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> volume-available</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> --volume-ids</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> &#x3C;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">volume-i</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">d></span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">aws</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ec2</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> attach-volume</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  --volume-id</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> &#x3C;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">volume-i</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">d> </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">\</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  --instance-id</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> &#x3C;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">helper-instance-i</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">d> </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">\</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  --device</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /dev/sdg</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>It's recommended to create a snapshot of the volume before proceeding.</p>
<h3>2. Identify Disk on Rescue Instance</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> lsblk</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -o</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> NAME,SIZE,SERIAL,MOUNTPOINT,FSTYPE</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>On Nitro instances, EBS appears as <code>/dev/nvmeXn1</code>. You can match volume IDs via the SERIAL field.</p>
<h3>3. Mount Working Disk</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> mkfs.xfs</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -f</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /dev/nvme1n1</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> mkdir</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -p</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /mnt/work</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> mount</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /dev/nvme1n1</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /mnt/work</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>The working disk must be larger than the actual output size of the target volume.</p>
<h3>4. Install Tools</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> dnf</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> install</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -y</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> qemu-img</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> gcc</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> make</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> perl</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If hivex is not available in the repository, you'll need to install it from source. It's used to edit Windows registry hives.</p>
<h3>5. Mount NTFS and Backup SYSTEM Hive</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> modprobe</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ntfs3</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> mkdir</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -p</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /mnt/windows</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> mount</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -t</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ntfs3</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -o</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> rw</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /dev/nvme2n1p1</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /mnt/windows</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> cp</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /mnt/windows/Windows/System32/config/SYSTEM</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /mnt/work/SYSTEM_BACKUP</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> cp</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /mnt/windows/Windows/System32/config/SYSTEM</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /tmp/SYSTEM_EDIT</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3>6. Enable Generic Storage Drivers</h3>
<p>The following services need their <code>Start</code> set to <code>0</code>:</p>
<p>| Service | Purpose |<br>
|</p>
]]></content:encoded>
    </item>
    <item>
      <title>Launching a Windows 11 EC2 Instance on AWS</title>
      <link>https://blog.checo.cc/en/posts/AWS/2.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/2.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Launching a Windows 11 EC2 Instance on AWS</source>
      <description>AWS China does not directly provide a Windows 11 AMI, and VM Import/Export also requires additional image preparation and import procedures. A compromise approach is to first la...</description>
      <category>AWS</category>
      <pubDate>Wed, 03 Dec 2025 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>AWS China does not directly provide a Windows 11 AMI, and VM Import/Export also requires additional image preparation and import procedures. A compromise approach is to first launch a Linux EC2 instance and then reinstall the system as Windows using an open-source reinstall script.</p>
<p>Project repository: <a href="https://github.com/bin456789/reinstall" target="_blank" rel="noopener noreferrer">bin456789/reinstall</a></p>
<p>Reference documentation: <a href="https://lpwmm.blog.csdn.net/article/details/155258680?spm=1001.2014.3001.5502" target="_blank" rel="noopener noreferrer">CSDN original article</a></p>
<!-- more -->
<h2>Steps</h2>
]]></content:encoded>
    </item>
    <item>
      <title>Installing Windows 11 ARM via DD on EC2 T4g (Graviton) ARM Instances</title>
      <link>https://blog.checo.cc/en/posts/AWS/20.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/20.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Installing Windows 11 ARM via DD on EC2 T4g (Graviton) ARM Instances</source>
      <description>AWS does not provide Windows AMIs for the Graviton architecture, but that doesn&amp;apos;t mean Graviton can&amp;apos;t run Windows. This article documents how to use the open-source project bin4...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Mon, 08 Jun 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>AWS does not provide Windows AMIs for the Graviton architecture, but that doesn't mean Graviton can't run Windows. This article documents how to use the open-source project <a href="https://github.com/bin456789/reinstall" target="_blank" rel="noopener noreferrer">bin456789/reinstall</a>'s one-click DD script to reinstall a t4g instance running Amazon Linux 2023 into Windows 11 Pro ARM64 in place.</p>
<figure><img src="/assets/images/posts/graviton2-win11-taskmanager.jpg" alt="Windows 11 Task Manager showing AWS Graviton2 processor" tabindex="0" loading="lazy"><figcaption>Windows 11 Task Manager showing AWS Graviton2 processor</figcaption></figure>
<!-- more -->
<h2>Why Graviton Can't Officially Run Windows</h2>
<p>AWS only provides Windows AMIs for the x86 architecture. Graviton uses the ARM64 architecture. Although Microsoft has Windows on ARM, AWS has not done official driver adaptation and AMI publishing for the Graviton platform. So the normal flow is: choose t3/t3a x86 instances for Windows, and Graviton can only run Linux.</p>
<p>But &quot;not officially supported&quot; doesn't mean &quot;can't run.&quot; The <a href="http://reinstall.sh" target="_blank" rel="noopener noreferrer">reinstall.sh</a> script can directly DD-install Windows on an existing Linux instance, including the ARM64 version. Test environment:</p>
<ul>
<li>Instance type: <code>t4g.large</code> (2 vCPU / 8 GB)</li>
<li>Original system: Amazon Linux 2023 aarch64, 50 GB EBS (gp3), UEFI boot</li>
<li>Target system: Windows 11 Pro 25H2 ARM64 (Build 26200.6584), Chinese version</li>
</ul>
<h2>Core Finding: The Counter-Intuitive NVMe Driver Pitfall</h2>
<p>The most counter-intuitive part of the entire process: <strong>Injecting the official AWS NVMe driver actually causes boot failure; only the Microsoft inbox StorNVMe works properly.</strong></p>
<p><code>StorNVMe.sys</code> is a standard NVMe driver built into the system image by Microsoft since Windows 8.1. It loads automatically during installation without any external injection or manual operation. The <code>Has StorNVMe: true</code> in the <a href="http://reinstall.sh" target="_blank" rel="noopener noreferrer">reinstall.sh</a> log means the script detected the ISO includes this inbox driver.</p>
<p>Real-world comparison:</p>
<p>| Approach | NVMe Driver | ENA Driver | Result |<br>
|</p>
]]></content:encoded>
      <enclosure url="https://blog.checo.cc/assets/images/posts/graviton2-win11-taskmanager.jpg" type="image/jpeg"/>
    </item>
    <item>
      <title>ALB Certificate Chain Break Causes curl to Report &amp;quot;unable to get local issuer certificate&amp;quot;</title>
      <link>https://blog.checo.cc/en/posts/AWS/3.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/3.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">ALB Certificate Chain Break Causes curl to Report &amp;quot;unable to get local issuer certificate&amp;quot;</source>
      <description>After configuring HTTPS on an internal ALB, clients accessing the domain receive curl: (60) SSL certificate problem: unable to get local issuer certificate. This error is not ne...</description>
      <category>AWS</category>
      <pubDate>Wed, 03 Jun 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>After configuring HTTPS on an internal ALB, clients accessing the domain receive <code>curl: (60) SSL certificate problem: unable to get local issuer certificate</code>. This error is not necessarily a network issue — more commonly it means the ACM certificate chain bound to the ALB is incomplete, or the certificate SAN does not cover the accessed domain.</p>
<!-- more -->
<h2>Symptoms</h2>
<p>Accessing an internal service results in an error:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">curl</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> https://service.example.internal/api/v1/health</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>curl: (60) SSL certificate problem: unable to get local issuer certificate</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>The architecture is roughly:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>Client -> Internal ALB 443 -> Backend Target 443</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If bypassing the ALB and directly accessing the backend target succeeds, it indicates the backend service itself is most likely not the root cause.</p>
<h2>Troubleshooting Approach</h2>
<h3>1. Don't Rely on Public SSL Check Results</h3>
<p>If the domain resolves to an internal ALB in a Route 53 private hosted zone, a public SSL checker may see a different public DNS record. Public check results cannot represent the certificate actually served by the internal ALB.</p>
<h3>2. Use openssl to Inspect the Actual ALB Certificate</h3>
<p>Run the following on an internal client:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">openssl</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> s_client</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -showcerts</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  -connect</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> &#x3C;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">alb-dns-nam</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">e></span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">:443</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  -servername</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> service.example.internal</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> &#x3C;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">/dev/null</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Focus on two things:</p>
<ul>
<li>Whether the certificate SAN/CN covers the accessed domain.</li>
<li>Whether the intermediate certificate served by the ALB matches the site certificate's signing chain.</li>
</ul>
<h3>3. Distinguish Between Two Problems</h3>
<p>A broken certificate chain and a domain mismatch are two different problems:</p>
<ul>
<li>A broken chain causes the client to fail to find a trusted parent CA.</li>
<li>SAN not covering the domain causes hostname verification to fail.</li>
</ul>
<p>Either one can cause HTTPS to fail.</p>
<h2>Root Cause</h2>
<p>In this case, the site certificate was issued by a DV intermediate CA, but the one included during ACM import was a different OV intermediate CA. The ALB therefore served a mismatched intermediate certificate chain to the client, and curl could not build a complete trust chain.</p>
<p>At the same time, the ALB-bound certificate's SAN also did not cover the actual domain being accessed. In other words, even if the certificate chain were fixed, it would still fail due to the domain mismatch.</p>
<h2>Solution</h2>
<h3>1. Fix the ACM Certificate Chain</h3>
<p>Re-import the original ACM certificate and upload the correct intermediate certificate chain:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">aws</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> acm</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> import-certificate</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  --certificate-arn</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> &#x3C;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">certificate-ar</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">n> </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">\</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  --certificate</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> fileb://site.crt</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  --private-key</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> fileb://site.key</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  --certificate-chain</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> fileb://correct-chain.crt</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>The advantage of using reimport is that it preserves the original ARN, so the ALB listener does not need to re-select a certificate.</p>
<h3>2. Ensure the Certificate Covers the Accessed Domain</h3>
<p>Check whether the certificate SAN includes the domain being used:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">openssl</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> x509</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -in</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> site.crt</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -noout</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -text</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> | </span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">grep</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -A1</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "Subject Alternative Name"</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If it does not, you need to request or import a new certificate that covers the target domain and bind it to the ALB HTTPS listener.</p>
<h3>3. Clean Up ALB Listener Certificates</h3>
<p>If the ALB has multiple certificates attached, it is recommended to clean up unused certificates to avoid SNI matching confusion and operational judgment errors.</p>
<h2>Summary</h2>
<p>When ALB HTTPS reports <code>unable to get local issuer certificate</code>, the troubleshooting focus should be the certificate chain actually served by the ALB, not the backend Nginx or public SSL check results.</p>
<p>Recommended fixed troubleshooting order:</p>
<ol>
<li>Use <code>openssl s_client -showcerts</code> on an internal client to inspect the certificate served by the ALB.</li>
<li>Check whether SAN/CN covers the accessed domain.</li>
<li>Check whether the intermediate certificate matches the site certificate's signing chain.</li>
<li>Use ACM reimport to fix the certificate chain, and replace the listener certificate if necessary.</li>
</ol>
]]></content:encoded>
    </item>
    <item>
      <title>Counting Objects with Specific Extensions in an S3 Bucket by Size and Count</title>
      <link>https://blog.checo.cc/en/posts/AWS/4.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/4.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Counting Objects with Specific Extensions in an S3 Bucket by Size and Count</source>
      <description>Sometimes you need to quickly count the number and total size of a certain type of file in an S3 bucket, such as .jpg or .png image objects. If the bucket has versioning enabled...</description>
      <category>AWS</category>
      <pubDate>Sat, 25 Apr 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>Sometimes you need to quickly count the number and total size of a certain type of file in an S3 bucket, such as <code>.jpg</code> or <code>.png</code> image objects. If the bucket has versioning enabled, historical versions also need to be included. This kind of requirement may not be suitable for waiting on S3 Inventory — streaming the count directly with AWS CLI is faster.</p>
<!-- more -->
<h2>Scenario</h2>
<p>The goal is to count the following in a versioning-enabled S3 bucket:</p>
<ul>
<li>Number of objects with a specified file extension.</li>
<li>Total size of objects with a specified file extension.</li>
<li>Including all historical versions, not just the current version.</li>
</ul>
<p>If the business requires &quot;results right now,&quot; S3 Inventory may not be suitable because it is an asynchronous report and the first generation typically has a delay.</p>
<h2>Why Use list-object-versions</h2>
<p>The regular <code>list-objects</code> only looks at the current object version and cannot cover historical versions. For buckets with versioning enabled, use:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">aws</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> s3api</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> list-object-versions</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Then use <code>--query 'Versions[*].[Key, Size]'</code> to extract only the object Key and Size, reducing downstream processing cost.</p>
<h2>Counting Command</h2>
<p>The following example counts <code>.jpg</code> and <code>.png</code> objects:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">aws</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> s3api</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> list-object-versions</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  --bucket</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> &#x3C;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">bucket-nam</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">e> </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">\</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  --region</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> &#x3C;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">regio</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">n> </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">\</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  --query</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> 'Versions[*].[Key, Size]'</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  --output</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> text</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> |</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">grep</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -Ei</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "\.(jpg|png)[[:space:]]+[0-9]+$"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> |</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">awk</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> '</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">BEGIN {</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">  fmt = "Total image objects (including historical versions): %d\n"</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">}</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">{</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">  count++;</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">  size += $NF;</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">}</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">END {</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">  print "======================";</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">  printf fmt, count;</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">  printf "Total size (including historical versions): %.2f GB\n", size/1024/1024/1024;</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">  print "======================";</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">}'</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Example output:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>======================</span></span>
<span class="line"><span>Total image objects (including historical versions): 120446</span></span>
<span class="line"><span>Total size (including historical versions): 56.33 GB</span></span>
<span class="line"><span>======================</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2>Notes</h2>
<ul>
<li>It is recommended to execute this on an EC2 instance in the same region to reduce network latency.</li>
<li>If there are many objects, CLI calls will incur List request costs.</li>
<li>If you only need the current version, do not use <code>list-object-versions</code> — use <code>list-objects-v2</code> instead.</li>
<li>If the object scale is very large and some delay is acceptable, S3 Inventory is more suitable for periodic reporting.</li>
<li>If keys contain special characters such as newlines, text pipeline processing will have edge-case issues. For rigorous scenarios, use JSON + jq.</li>
</ul>
<h2>Summary</h2>
<p>When you need to urgently count objects with specific extensions in an S3 bucket, <code>list-object-versions + grep + awk</code> is a simple and effective solution. Its advantages are that it is real-time, lightweight, and requires no waiting for Inventory; its disadvantage is that it is more suited for one-off counting, not long-term periodic reporting.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Restricting Specific Users from Logging into EC2 via Console After SAML Federated Login</title>
      <link>https://blog.checo.cc/en/posts/AWS/5.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/5.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Restricting Specific Users from Logging into EC2 via Console After SAML Federated Login</source>
      <description>In an AD + SAML federated identity scenario, users may log into the AWS console through the same high-privilege IAM Role. If you only want to restrict a subset of those users fr...</description>
      <category>AWS</category>
      <category>Security</category>
      <pubDate>Mon, 06 Apr 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>In an AD + SAML federated identity scenario, users may log into the AWS console through the same high-privilege IAM Role. If you only want to restrict a subset of those users from using Session Manager or EC2 Instance Connect to log into instances, you can use the <code>aws:userid</code> condition key to create an explicit Deny.</p>
<!-- more -->
<h2>Scenario</h2>
<p>In a customer environment, many domain users log into the AWS console via SAML AssumeRole, potentially using high-privilege roles like <code>PowerUser</code> or <code>Administrator</code>.</p>
<p>Due to compliance requirements, certain users need to be restricted from accessing EC2 instances through the console, primarily involving two capabilities:</p>
<ul>
<li>SSM Session Manager: <code>ssm:StartSession</code></li>
<li>EC2 Instance Connect: <code>ec2-instance-connect:SendSSHPublicKey</code></li>
</ul>
<h2>Why Not Use RoleSessionName</h2>
<p>After SAML federated login, IAM generates a session identifier. The more stable and available global condition key for policy evaluation is <code>aws:userid</code>. It typically contains the role ID and session name, in a format like:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>&#x3C;role-id>:&#x3C;session-name></span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Because the role ID portion changes with the Role, it is not suitable for hardcoding. Instead, you can use a wildcard to match the session suffix:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>*:user-or-ou-id</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h2>Example Policy</h2>
<p>Add an explicit Deny to the target IAM Role:</p>
<div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-json"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">{</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">  "Version"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">: </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"2012-10-17"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">,</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">  "Statement"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">: [</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">    {</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">      "Sid"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">: </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"DenyEC2LoginForSpecificFederatedUsers"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">,</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">      "Effect"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">: </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"Deny"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">,</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">      "Action"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">: [</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">        "ssm:StartSession"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">,</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">        "ec2-instance-connect:SendSSHPublicKey"</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">      ],</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">      "Resource"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">: </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"*"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">,</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">      "Condition"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">: {</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">        "StringLike"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">: {</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">          "aws:userid"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">: [</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">            "*:&#x3C;user-or-ou-id>"</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">          ]</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">        }</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">      }</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">    }</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">  ]</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">}</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Explicit Deny takes priority over Allow, so even if the Role already has high-privilege policies, users matching the condition will still be blocked.</p>
<h2>Verification Method</h2>
<ol>
<li>Log into the console as the target SAML user.</li>
<li>Attempt to connect to EC2 via Session Manager.</li>
<li>Attempt to use EC2 Instance Connect.</li>
<li>Then verify that unrestricted users are not affected.</li>
</ol>
<p>If the Deny is working, the target user will be denied when calling the related APIs.</p>
<h2>Recommended Long-Term Approach</h2>
<p>Hardcoding user suffixes based on <code>aws:userid</code> can quickly solve the problem, but the maintenance cost is high. A better approach is to split permissions at the identity source level:</p>
<ul>
<li>Create a restricted user group in AD, e.g., <code>AWS-No-EC2-Login</code>.</li>
<li>Map different user groups to different IAM Roles in the IdP.</li>
<li>Create a dedicated restricted Role that does not grant EC2 login capabilities.</li>
</ul>
<p>This makes permission boundaries clearer and easier to audit and automate.</p>
<h2>Summary</h2>
<p>If you need to temporarily restrict certain SAML users from logging into EC2 via the console, you can use <code>aws:userid</code> + explicit Deny to precisely block <code>ssm:StartSession</code> and <code>ec2-instance-connect:SendSSHPublicKey</code>.</p>
<p>In the long term, it is recommended to manage user grouping and Role mapping at the identity source side, rather than maintaining increasingly complex conditional policies within a single high-privilege Role.</p>
]]></content:encoded>
    </item>
    <item>
      <title>growpart Fails After EBS Volume Expansion on Amazon Linux 2</title>
      <link>https://blog.checo.cc/en/posts/AWS/6.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/6.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">growpart Fails After EBS Volume Expansion on Amazon Linux 2</source>
      <description>After expanding an EBS volume in the console, you still need to extend the partition and filesystem from within the operating system. If the root partition is already 100% full,...</description>
      <category>AWS</category>
      <category>Linux</category>
      <pubDate>Sat, 25 Apr 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>After expanding an EBS volume in the console, you still need to extend the partition and filesystem from within the operating system. If the root partition is already 100% full, <code>growpart</code> may fail because it cannot write temporary files, and the error may look like an <code>sfdisk</code> issue.</p>
<!-- more -->
<h2>Symptoms</h2>
<p>Executing partition expansion:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> growpart</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /dev/nvme0n1</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> 1</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Returns an error like:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>failed [sfd_list:1] sfdisk --list --unit=S /dev/nvme0n1</span></span>
<span class="line"><span>FAILED: failed: sfdisk --list /dev/nvme0n1</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>The environment is typically:</p>
<ul>
<li>Nitro architecture instance.</li>
<li>Amazon Linux 2.</li>
<li>Root filesystem is XFS.</li>
<li>Device name is <code>/dev/nvme0n1</code>, root partition is <code>/dev/nvme0n1p1</code>.</li>
<li><code>/</code> is at or near 100%.</li>
</ul>
<h2>Root Cause</h2>
<p><code>growpart</code> needs to create temporary files in system directories and rewrite the partition table when executing. If the root filesystem is so full that only a few tens of KB remain, the underlying <code>sfdisk</code> call may not complete successfully, resulting in partition expansion failure.</p>
<p>In this case, the first priority is not to keep running <code>growpart</code> repeatedly, but to first free up some space on the root partition.</p>
<h2>Resolution Steps</h2>
<h3>1. Clean the yum Cache</h3>
<p>On Amazon Linux 2, you can start by cleaning the yum cache:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> yum</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> clean</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> all</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Confirm the root partition has at least a few MB of free space:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">df</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -h</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h3>2. Expand the Partition</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> growpart</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /dev/nvme0n1</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> 1</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h3>3. Expand the XFS Filesystem</h3>
<p>XFS requires using the mount point for expansion:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> xfs_growfs</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -d</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>For ext4, you should use:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> resize2fs</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /dev/nvme0n1p1</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h3>4. Verify</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">df</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -hT</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">lsblk</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>Confirm the root partition size and available space have been updated.</p>
<h2>Notes</h2>
<ul>
<li>After modifying the volume size in the EBS console, wait for the status to complete before proceeding with in-system expansion.</li>
<li>Individual EBS volumes have modification frequency limits — do not repeatedly attempt expansion.</li>
<li>When the root partition is nearly full, it is recommended to prioritize cleaning caches, old logs, and temporary files.</li>
<li>For the long term, it is recommended to use CloudWatch Agent to collect disk usage metrics and set up advance alerts.</li>
</ul>
<h2>Summary</h2>
<p><code>growpart</code> reporting an <code>sfdisk</code> failure does not necessarily mean the partition table is corrupted — it may simply be that the root filesystem has no space for the tool to operate. For root volume expansion on Amazon Linux 2 + XFS, follow this order:</p>
<ol>
<li>Free up a small amount of space.</li>
<li>Expand the partition with <code>growpart</code>.</li>
<li>Expand the filesystem with <code>xfs_growfs</code>.</li>
<li>Verify with <code>df -hT</code>.</li>
</ol>
]]></content:encoded>
    </item>
    <item>
      <title>Troubleshooting RHEL EC2 Boot Failure and Instance Status Check Issues</title>
      <link>https://blog.checo.cc/en/posts/AWS/7.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/7.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Troubleshooting RHEL EC2 Boot Failure and Instance Status Check Issues</source>
      <description>When an EC2 Linux instance fails to boot or the instance status check fails, the problem may exist simultaneously in the AWS control plane and within the operating system. In th...</description>
      <category>AWS</category>
      <category>Linux</category>
      <pubDate>Mon, 06 Apr 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>When an EC2 Linux instance fails to boot or the instance status check fails, the problem may exist simultaneously in the AWS control plane and within the operating system. In this case, part of the issue was KMS permissions preventing encrypted EBS decryption, and another part was <code>/etc/fstab</code> using unstable device names causing the system to enter maintenance mode.</p>
<!-- more -->
<h2>Symptoms</h2>
<p>The failures fall into two categories:</p>
<ol>
<li>Instance fails to boot, and CloudTrail shows KMS <code>CreateGrant</code> or <code>Decrypt</code> permission errors.</li>
<li>Instance attempts to boot, but the system log is stuck at:</li>
</ol>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>Give root password for maintenance</span></span>
<span class="line"><span>(or press Control-D to continue):</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>The second case causes the OS to fail to fully start, the instance cannot respond to underlying health checks, and the final manifestation is an instance status check failure.</p>
<h2>Problem 1: Insufficient KMS Permissions</h2>
<p>If the EBS volume uses a KMS CMK for encryption, the IAM role used to launch the instance must have permissions to use that KMS key. At minimum, the following are required:</p>
<div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-json"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">{</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">  "Effect"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">: </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"Allow"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">,</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">  "Action"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">: [</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">    "kms:Decrypt"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">,</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">    "kms:GenerateDataKey"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">,</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">    "kms:CreateGrant"</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">  ],</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">  "Resource"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">: </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"arn:aws-cn:kms:&#x3C;region>:&#x3C;account-id>:key/&#x3C;key-id>"</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">}</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>If the role lacks permissions, EC2 cannot decrypt the system or data volumes during the boot phase, and the instance will fail to start.</p>
<h2>Problem 2: fstab Blocking Boot</h2>
<p>On Linux, NVMe device names may change with reboots or underlying changes. If <code>/etc/fstab</code> contains a hardcoded entry like:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>/dev/nvme2n1p1 /data ext4 defaults 1 2</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>When the device name changes or the volume does not exist, the system will wait for the mount during boot and eventually enter emergency / maintenance mode.</p>
<p>A more stable approach is to use UUID with <code>nofail</code>:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>UUID=&#x3C;volume-uuid> /data ext4 defaults,nofail 1 2</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Network filesystems should also add <code>_netdev</code>:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>server:/share /mnt/share nfs defaults,_netdev,nofail 0 0</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h2>Fixing fstab via a Rescue Instance</h2>
<h3>1. Prepare a Rescue Instance</h3>
<p>Launch a Linux rescue instance in the same availability zone. Stop the original instance, detach the original root volume, and attach it to the rescue instance.</p>
<h3>2. Mount the Original System Root Partition</h3>
<p>If the original system uses LVM, first install the tools and activate the volume group:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> dnf</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> install</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> lvm2</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -y</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> vgscan</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> vgchange</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -ay</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> lvs</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Mount the original root partition:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> mkdir</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -p</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /mnt/rescue</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> mount</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -o</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> nouuid</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /dev/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">&#x3C;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">vg-nam</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">e></span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">&#x3C;</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">root-l</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">v> </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">/mnt/rescue</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><h3>3. Modify fstab</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> vi</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /mnt/rescue/etc/fstab</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>First comment out the risky data volume mount entries so the system can boot. After booting, use <code>lsblk -f</code> to get the UUID and switch to a stable configuration.</p>
<h3>4. Unmount and Reattach to the Original Instance</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> umount</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /mnt/rescue</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> vgchange</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -an</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>Then in the console, reattach the root volume to the original instance, start it, and verify.</p>
<h2>Verification</h2>
<p>After the instance boots, execute:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">lsblk</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -f</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> systemctl</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> daemon-reload</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> mount</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -a</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">df</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -h</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>If <code>mount -a</code> completes without errors, the fstab configuration is essentially correct.</p>
<h2>Summary</h2>
<p>EC2 Linux boot failures should be distinguished at two layers:</p>
<ul>
<li>AWS control plane: KMS, IAM, EBS status, volume attachment relationships.</li>
<li>OS internals: fstab, LVM, filesystem, network mounts.</li>
</ul>
<p>For encrypted volume boot failures, prioritize checking CloudTrail and KMS permissions; for systems stuck in maintenance mode, prioritize checking the console system log and <code>/etc/fstab</code>. For data volume mounts, it is recommended to consistently use UUID + <code>nofail</code> to prevent device name changes from blocking system startup.</p>
]]></content:encoded>
    </item>
    <item>
      <title>EC2 Windows 2019 Cumulative Update Installation Reports &amp;quot;Not Applicable&amp;quot;</title>
      <link>https://blog.checo.cc/en/posts/AWS/8.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/8.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">EC2 Windows 2019 Cumulative Update Installation Reports &amp;quot;Not Applicable&amp;quot;</source>
      <description>When manually installing a Windows Server 2019 cumulative update, if you receive the message &amp;quot;The update is not applicable to your computer&amp;quot;, it does not necessarily m...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Sat, 25 Apr 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>When manually installing a Windows Server 2019 cumulative update, if you receive the message &quot;The update is not applicable to your computer&quot;, it does not necessarily mean a prerequisite SSU is missing. In many cases, the system has already installed a newer cumulative update but hasn't completed the reboot to update the version number.</p>
<!-- more -->
<h2>Symptoms</h2>
<p>When manually installing a specific Windows Server 2019 cumulative update, the installer returns:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>The update is not applicable to your computer</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>The CBS log may contain:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>Higher version found for package ..., superseded.</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>WindowsUpdate.log may show:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>The volatile RebootRequired key exists</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h2>Analysis Approach</h2>
<h3>1. Compare OS Build</h3>
<p>First, check the current system version:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">winver</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Or read from the registry:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Get-ItemProperty</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> |</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">  Select-Object</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> CurrentBuildNumber, UBR</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>If the current Build is already higher than the version corresponding to the target KB, it means the KB content has been superseded by a newer cumulative update, and &quot;not applicable&quot; is the expected result.</p>
<h3>2. Check Whether CBS Has Installed a Newer Package</h3>
<p>The <code>Higher version found</code> entry in CBS.log is critical. Windows cumulative updates have a supersession relationship — a newer LCU already contains the content of older LCUs.</p>
<h3>3. Check Whether a Reboot Is Required</h3>
<p>If <code>RebootRequired</code> appears in WindowsUpdate.log, it means the system may have completed a staged installation, but the Build/UBR values in the registry haven't been updated during the reboot process.</p>
<p>This can cause <code>winver</code> to still show the old version while CBS already shows a newer package exists.</p>
<h2>Solution</h2>
<h3>1. Do Not Repeatedly Install the Old KB</h3>
<p>If CBS already shows a newer package exists, stop trying to install the old KB to avoid wasting maintenance windows.</p>
<h3>2. Reboot During a Maintenance Window</h3>
<p>In production environments, it is recommended to create an AMI backup first, then reboot the instance:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Restart-Computer</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>After rebooting, verify again:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">winver</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Get-HotFix</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> | </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Sort-Object</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> InstalledOn </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Descending | </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Select-Object</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">First </span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">10</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><h3>3. Prioritize Installing the Latest Cumulative Update</h3>
<p>If there is no compliance requirement to install a specific old KB, it is recommended to install the latest LCU directly. Windows cumulative updates typically include all previous update content.</p>
<h2>Summary</h2>
<p>&quot;The update is not applicable to your computer&quot; does not necessarily mean failure. When troubleshooting, don't rely solely on <code>winver</code> — also consider:</p>
<ul>
<li>The OS Build corresponding to the target KB.</li>
<li>Whether CBS.log already shows a newer package exists.</li>
<li>Whether <code>RebootRequired</code> exists in WindowsUpdate.log.</li>
</ul>
<p>If the system has already installed a newer update but hasn't rebooted, the correct action is usually to schedule a maintenance window reboot, rather than repeatedly trying to manually install the old patch.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Windows Server 2019 .NET Cumulative Update Installation Fails: Bypassing WUA Using DISM</title>
      <link>https://blog.checo.cc/en/posts/AWS/9.html</link>
      <guid>https://blog.checo.cc/en/posts/AWS/9.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Windows Server 2019 .NET Cumulative Update Installation Fails: Bypassing WUA Using DISM</source>
      <description>When installing a .NET Framework cumulative update on Windows Server 2019, if double-clicking the .msu or using the wusa.exe path consistently fails and WindowsUpdate.log shows ...</description>
      <category>AWS</category>
      <category>Windows</category>
      <pubDate>Wed, 03 Jun 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>When installing a .NET Framework cumulative update on Windows Server 2019, if double-clicking the <code>.msu</code> or using the <code>wusa.exe</code> path consistently fails and WindowsUpdate.log shows <code>0xC8000402 PopulateDataStore failed</code>, the problem may not be a CBS installation failure but rather a broken WUA scan layer.</p>
<!-- more -->
<h2>Background</h2>
<p>Some .NET cumulative updates are container packages that contain multiple individually applicable <code>.msu</code> files. For example, a parent KB might embed:</p>
<ul>
<li>An MSU for .NET 3.5 + 4.7.2.</li>
<li>An MSU for .NET 3.5 + 4.8.</li>
</ul>
<p>If the system is already running .NET 4.8, only the one corresponding to 4.8 needs to be installed.</p>
<h2>Key Logs</h2>
<p>WindowsUpdate.log repeatedly shows:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>ProtocolTalker  *FAILED* [C8000402] PopulateDataStore failed</span></span>
<span class="line"><span>ProtocolTalker  *FAILED* [C8000402] Sync of Updates</span></span>
<span class="line"><span>Agent           * END * Finding updates ... Exit code = 0xC8000402</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Meanwhile, CBS.log has no trace of the target KB.</p>
<p>This indicates the patch hasn't even entered the CBS installation engine — the failure occurs at the earlier WUA scan stage.</p>
<h2>Root Cause Determination</h2>
<p>The flow of <code>wusa.exe</code> installing an <code>.msu</code> is roughly:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>Double-click .msu -> wusa.exe -> WUA applicability scan -> CBS installation</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If WUA's DataStore is corrupted, or if repeated registration of offline scan sources causes metadata pollution, WUA may fail at the <code>PopulateDataStore</code> stage, ultimately returning &quot;0 updates found&quot; or an installation failure.</p>
<p>At this point, continuing to double-click <code>.msu</code> is pointless, since execution never reaches CBS.</p>
<h2>Solution: Extract and Inject CAB Using DISM</h2>
<p>The core idea is to bypass WUA and let CBS handle the CAB package directly.</p>
<h3>1. Extract the MSU</h3>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">$msu</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> =</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "C:\Patches\windows10.0-kbxxxxx-x64-ndp48.msu"</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">$dst</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> =</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "C:\Patches\Extract"</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">New-Item</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">ItemType Directory </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Force </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Path </span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">$dst</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> | </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Out-Null</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">expand.exe</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> -F</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">:</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">*</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75"> $msu</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75"> $dst</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3>2. Install the CAB Using DISM</h3>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">$cab</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> =</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> Get-ChildItem</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75"> $dst</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Filter </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"Windows10.0-KB*.cab"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> | </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Select-Object</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">First </span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">1</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">DISM.exe</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Add-Package</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">PackagePath:</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"</span><span style="--shiki-light:#CA1243;--shiki-dark:#C678DD">$(</span><span style="--shiki-light:#50A14F;--shiki-dark:#E06C75">$</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">cab.FullName</span><span style="--shiki-light:#CA1243;--shiki-dark:#C678DD">)</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">NoRestart </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">LogPath:C:\Patches\dism.log</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><h3>3. Reboot</h3>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">shutdown </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">r </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">t </span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">30</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h3>4. Verify</h3>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Get-HotFix</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Id KBxxxxx</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">DISM.exe</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> /</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Online </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Get-Packages</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> | findstr </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">/</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">I </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"DotNetRollup"</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>For .NET updates, you can also check whether key .NET file versions have been updated.</p>
<h2>Optional: Repair the WUA Scan Channel</h2>
<p>If you need Windows Update scanning to work normally going forward, you can reset the WUA database:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Stop-Service</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Name wuauserv, BITS, cryptSvc </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Force</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Rename-Item</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> C:\Windows\SoftwareDistribution C:\Windows\SoftwareDistribution.old</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Rename-Item</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> C:\Windows\System32\catroot2 C:\Windows\System32\catroot2.old</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">$svc</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> =</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> New-Object</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">ComObject Microsoft.Update.ServiceManager</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">$svc.Services</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> | </span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Where-Object</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> { $_</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">.IsScanPackageService</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> } |</span></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">  ForEach-Object</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> { </span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">$svc.RemoveService</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">($_</span><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">.ServiceID</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">) }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">Start-Service</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2"> -</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">Name wuauserv, BITS, cryptSvc</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>This is not a required step for installing the patch — it only restores WUA scanning capability.</p>
<h2>Summary</h2>
<p>If the target KB has no trace at all in CBS.log and WindowsUpdate.log points to <code>0xC8000402 PopulateDataStore failed</code>, the issue should be located in the WUA scan layer.</p>
<p>The approach is:</p>
<ol>
<li>Confirm the applicable embedded MSU.</li>
<li>Extract the MSU to obtain the CAB.</li>
<li>Inject it directly using <code>DISM /Add-Package</code>.</li>
<li>Reboot and verify.</li>
</ol>
<p>This method is suitable for scenarios where WUA is corrupted but CBS is still functioning normally.</p>
]]></content:encoded>
    </item>
    <item>
      <title>1Panel Server Docker and new-api MySQL Migration Full Record</title>
      <link>https://blog.checo.cc/en/posts/DevOps/1.html</link>
      <guid>https://blog.checo.cc/en/posts/DevOps/1.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">1Panel Server Docker and new-api MySQL Migration Full Record</source>
      <description>This migration mainly accomplished two things: first fixing the Docker port mapping failure on Debian 12, then migrating new-api from SQLite to MySQL. There were quite a few pit...</description>
      <category>DevOps</category>
      <category>Database</category>
      <pubDate>Wed, 03 Jun 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>This migration mainly accomplished two things: first fixing the Docker port mapping failure on Debian 12, then migrating new-api from SQLite to MySQL. There were quite a few pitfalls along the way, especially iptables/nftables compatibility and SQLite to MySQL syntax differences.</p>
<!-- more -->
<h2>Background</h2>
<p>new-api was originally running in Docker, using an SQLite database by default. As logs, users, and channel data grew, the SQLite database size approached 200MB, making it unsuitable for long-term maintenance in a container data volume.</p>
<p>My goals were:</p>
<ul>
<li>Start a MySQL container on the 1Panel-managed server</li>
<li>Fully import new-api's SQLite data into MySQL</li>
<li>Test with the new container first, then switch reverse proxy traffic</li>
<li>Minimize impact on production services</li>
</ul>
<p>The most important principle in production migration is: don't directly stop the old service. Bring up the new environment first, confirm everything is working, then switch traffic.</p>
<h2>iptables and Docker Port Mapping Issue</h2>
<h3>Error Symptom</h3>
<p>When installing a MySQL container via 1Panel, the container can be created successfully, but fails during startup with an error like:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">iptables:</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> No</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> chain/target/match</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> by</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> that</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> name.</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Looking further at Docker-related logs, you can see the nftables backend incompatibility:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">iptables</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> v1.8.9</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> (nf_tables): chain </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">`</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">DOCKER' in table `filter'</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> is incompatible, use 'nft' tool.</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h3>Root Cause</h3>
<p>Debian 12 bookworm defaults to <code>iptables-nft</code>, which is the nftables backend. Docker maintains its own <code>DOCKER</code> chain in iptables for port mapping, but in this environment, the chain state in the filter table is incompatible with the nft backend.</p>
<p>There's a subtle trap here: existing containers' port mappings may still work normally because the NAT table isn't immediately affected. What actually fails is new containers or newly added port mappings.</p>
<h3>Fix</h3>
<p>First back up the current iptables rules:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">mkdir</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -p</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /root/backup-iptables-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">$(</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">date</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> +%Y%m%d</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">)</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">iptables-save</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> > </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">/root/backup-iptables-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">$(</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">date</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> +%Y%m%d</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">)</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">/iptables-all.txt</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>Then switch iptables and ip6tables to legacy mode:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">update-alternatives</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> --set</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> iptables</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /usr/sbin/iptables-legacy</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">update-alternatives</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> --set</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ip6tables</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /usr/sbin/ip6tables-legacy</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>Finally restart Docker:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">systemctl</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> restart</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> docker</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If containers have <code>restart: always</code> or <code>unless-stopped</code> configured, they will automatically recover after Docker restarts. Containers using host network mode, such as openresty, are generally unaffected by this port mapping issue.</p>
<h2>SQLite to MySQL Migration Challenges</h2>
<p>new-api uses GORM, which can auto-create tables when first connecting to MySQL, but this doesn't mean it will auto-migrate SQLite data. The actual migration requires converting the SQLite dump into MySQL-importable SQL.</p>
<p>Direct conversion encounters several types of problems:</p>
<ol>
<li>SQLite allows <code>TEXT</code> fields in primary keys or indexes; MySQL throws <code>ERROR 1170</code>.</li>
<li>SQLite supports partial indexes, e.g., <code>WHERE deleted_at IS NULL</code>, which MySQL can't directly replicate.</li>
<li>SQLite BLOB byte strings may be written as <code>X'...'</code>, which MySQL JSON columns can't directly accept.</li>
<li>MySQL doesn't allow <code>TEXT</code> or <code>BLOB</code> fields to have default values.</li>
<li>SQLite is case-sensitive by default; MySQL's default collation is usually case-insensitive, which may cause unique key conflicts.</li>
</ol>
<p>So this step can't rely solely on simple search-and-replace; a conversion script is more suitable for handling the structure and data.</p>
<h2>Conversion Script Strategy</h2>
<p>I ultimately used a script to generate MySQL-importable SQL, performing these transformations:</p>
<ul>
<li><code>TEXT</code> fields involved in indexes, primary keys, or unique keys changed to <code>VARCHAR(191)</code></li>
<li>Non-indexed large text fields changed to <code>LONGTEXT</code></li>
<li>SQLite partial indexes converted to MySQL-compatible expression indexes</li>
<li>BLOB JSON byte strings converted to UTF-8 JSON strings</li>
<li>SQLite timestamps with timezone converted to MySQL <code>DATETIME(6)</code> literals</li>
<li>All using <code>utf8mb4_bin</code> collation to preserve SQLite's case-sensitive behavior as much as possible</li>
</ul>
<p>Don't write actual database passwords, root passwords, or DSNs in plaintext in public articles or repositories. Sensitive fields in the commands below are replaced with placeholders.</p>
<h2>Blue-Green Deployment Flow</h2>
<p>The overall process is: import data first, start the new container for testing, then switch the reverse proxy.</p>
<h3>1. Import MySQL Data</h3>
<p>First create the target database and user, and grant permissions:</p>
<div class="language-sql line-numbers-mode" data-highlighter="shiki" data-ext="sql" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-sql"><span class="line"><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD">CREATE</span><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD"> DATABASE</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> `one-api`</span><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD"> CHARACTER</span><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD"> SET</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> utf8mb4 </span><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD">COLLATE</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> utf8mb4_bin;</span></span>
<span class="line"><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD">CREATE</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> USER </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">'one-api'</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">@</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">'%'</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> IDENTIFIED </span><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD">BY</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> '&#x3C;mysql-user-password>'</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">;</span></span>
<span class="line"><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD">GRANT</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> ALL PRIVILEGES </span><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD">ON</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> `one-api`</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">.* </span><span style="--shiki-light:#A626A4;--shiki-dark:#C678DD">TO</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> 'one-api'</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">@</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">'%'</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">;</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">FLUSH PRIVILEGES;</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Then import the converted SQL:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">mysql</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -u</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> one-api</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -p</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> one-api</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> &#x3C; </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">/root/one-api-mysql-importable.sql</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If you've already had new-api connect to an empty MySQL, GORM may have inserted default data. In that case, you need to clear the default data first to avoid primary key or unique key conflicts during import.</p>
<h3>2. Start MySQL Version new-api Container</h3>
<p>The new container listens on <code>3001</code> first, while the old container continues on <code>3000</code>:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">docker</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> run</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -d</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> --name</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> new-api-mysql</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  --network</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> 1panel-network</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  --restart</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> unless-stopped</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  -p</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> 3001:3000</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  -e</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> SQL_DSN="one-api:&#x3C;mysql-user-password>@tcp(&#x3C;mysql-host>:3306)/one-api?charset=utf8mb4&#x26;parseTime=True&#x26;loc=Local"</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  -e</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> TZ=Asia/Shanghai</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  -e</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ERROR_LOG_ENABLED=</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">true</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  -e</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> BATCH_UPDATE_ENABLED=</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66">true</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#986801;--shiki-dark:#D19A66">  -v</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /home/ubuntu/data/new-api-mysql:/app/data</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">  calciumion/new-api:latest</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> --log-dir</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /app/logs</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Two things to note here:</p>
<ul>
<li>The new-api container must join a Docker network that can access MySQL</li>
<li><code>SQL_DSN</code> should include <code>charset=utf8mb4&amp;parseTime=True&amp;loc=Local</code></li>
</ul>
<h3>3. Test the New Container</h3>
<p>First confirm the service status via API:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">curl</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> http://localhost:3001/api/status</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>It should return <code>success: true</code> under normal circumstances. Then check whether the data volume of core tables (users, channels, configurations, logs) matches the SQLite version.</p>
<p>The data volume after my migration was approximately:</p>
<p>| Table | Row Count |<br>
|</p>
]]></content:encoded>
    </item>
    <item>
      <title>Docker iptables and nftables Compatibility Troubleshooting</title>
      <link>https://blog.checo.cc/en/posts/DevOps/2.html</link>
      <guid>https://blog.checo.cc/en/posts/DevOps/2.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Docker iptables and nftables Compatibility Troubleshooting</source>
      <description>When installing Docker applications via 1Panel on a Debian 12 server, I encountered a very typical problem: containers could be created successfully, but port mapping failed at ...</description>
      <category>DevOps</category>
      <pubDate>Wed, 03 Jun 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>When installing Docker applications via 1Panel on a Debian 12 server, I encountered a very typical problem: containers could be created successfully, but port mapping failed at startup. On the surface it looks like a Docker error, but the actual cause is iptables backend and Docker chain incompatibility.</p>
<!-- more -->
<h2>Symptoms</h2>
<p>After Docker container creation completes, the startup phase throws an error:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">Error</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> response</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> from</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> daemon:</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> failed</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> to</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> set</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> up</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> container</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> networking:</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">driver</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> failed</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> programming</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> external</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> connectivity</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> on</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> endpoint</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ...</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">Unable</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> to</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> enable</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> OPEN</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> PORT</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> rule:</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">iptables:</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> No</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> chain/target/match</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> by</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> that</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> name.</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> (exit </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">status</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> 1</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">)</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>This error can be misleading. The container itself isn't failing to create — the port mapping setup is failing during the <code>Starting</code> phase.</p>
<h2>Root Cause</h2>
<p>Debian 12 bookworm defaults to <code>iptables-nft</code>, which is the nftables backend. Docker maintains its own <code>DOCKER</code> chain in iptables for bridge networking and port mapping.</p>
<p>When the <code>DOCKER</code> chain in the filter table is incompatible with the nft backend state, you get errors like:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">iptables</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> v1.8.9</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> (nf_tables): chain </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">`</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">DOCKER' in table `filter'</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> is incompatible, use 'nft' tool.</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>A key detail: the <code>DOCKER</code> chain in the NAT table may still be working normally, so existing port mappings won't necessarily break immediately. What's actually affected is new containers or newly added port mappings.</p>
<h2>Quick Diagnosis</h2>
<p>First check which backend iptables is currently using:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">update-alternatives</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> --query</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> iptables</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> | </span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">grep</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -E</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> 'Status|Value'</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Then check the Docker chain in the filter table:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">iptables</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -L</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> DOCKER</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -n</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If you see <code>incompatible</code> or the chain doesn't exist, check the NAT table status:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">iptables</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -t</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> nat</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -L</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> DOCKER</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -n</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Finally confirm current containers and port mappings:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">docker</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ps</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> --format</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If existing containers are still running normally but new ones won't start, you can pretty much pin it on Docker port mapping and iptables backend compatibility.</p>
<h2>Fix Steps</h2>
<h3>1. Back Up Existing Rules</h3>
<p>Always back up before modifying network rules, so you have something to roll back to:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">mkdir</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -p</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /root/backup-iptables-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">$(</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">date</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> +%Y%m%d</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">)</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">iptables-save</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> > </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">/root/backup-iptables-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">$(</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">date</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> +%Y%m%d</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">)</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">/iptables-all.txt</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">iptables-save</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -t</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> nat</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> > </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">/root/backup-iptables-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">$(</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">date</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> +%Y%m%d</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">)</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">/iptables-nat.txt</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">docker</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ps</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> --format</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> '{{.Names}} {{.Image}} {{.Status}}'</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> > </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">/root/backup-iptables-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">$(</span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">date</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> +%Y%m%d</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">)</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">/containers.txt</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3>2. Switch to Legacy Mode</h3>
<p>Switch both IPv4 and IPv6 iptables to legacy:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">update-alternatives</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> --set</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> iptables</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /usr/sbin/iptables-legacy</span></span>
<span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">update-alternatives</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> --set</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ip6tables</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /usr/sbin/ip6tables-legacy</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><h3>3. Restart Docker</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">systemctl</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> restart</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> docker</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If containers have <code>restart: always</code> or <code>unless-stopped</code> configured, Docker will automatically bring them back up.</p>
<h3>4. Verify</h3>
<p>Check if the <code>DOCKER</code> chain displays correctly:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">iptables</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -L</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> DOCKER</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -n</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Confirm container status:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">docker</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ps</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Check if critical ports are listening:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">ss</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -tlnp</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> | </span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">grep</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -E</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> ':80 |:443 |:3000 '</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If it was an application that failed to install in 1Panel, try reinstalling or restarting the application at this point — it should usually recover.</p>
<h2>Notes</h2>
<ul>
<li>Containers using host network mode are usually unaffected by this issue, e.g., openresty listening directly on host ports.</li>
<li>Containers using bridge network mode rely on iptables for port mapping — MySQL, new-api, and similar containers will be affected.</li>
<li>Before fixing, confirm that important containers have a restart policy to avoid Docker restart leaving services without automatic recovery.</li>
<li>If the system has firewalld enabled, you may also need to check if it has rewritten the rules.</li>
<li>Don't directly flush iptables rules in production — always back up first.</li>
</ul>
<h2>Environment Record</h2>
<p>The environment where this issue occurred was approximately:</p>
<p>| Item | Value |<br>
|</p>
]]></content:encoded>
    </item>
    <item>
      <title>Mac mini M4 In-Depth Hardware Inspection Guide</title>
      <link>https://blog.checo.cc/en/posts/Mac/1.html</link>
      <guid>https://blog.checo.cc/en/posts/Mac/1.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Mac mini M4 In-Depth Hardware Inspection Guide</source>
      <description>Mac mini M4 transparent top-down internal structure viewMac mini M4 transparent top-down internal structure view When I get a new Mac, I like to do a systematic inspection first...</description>
      <category>macOS</category>
      <category>Hardware</category>
      <pubDate>Wed, 03 Jun 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<figure><img src="/assets/images/posts/mac-mini-m4-cutaway.png" alt="Mac mini M4 transparent top-down internal structure view" tabindex="0" loading="lazy"><figcaption>Mac mini M4 transparent top-down internal structure view</figcaption></figure>
<p>When I get a new Mac, I like to do a systematic inspection first: hardware info, SSD health, port status, security configuration, and system stability — all checked through. This way, if any issues come up later, I can tell whether it's a machine problem or caused by the usage environment.</p>
<!-- more -->
<p>This article is based on the actual inspection process for the Mac mini M4. The commands are mainly applicable to Apple Silicon Macs.</p>
<h2>Basic Information</h2>
<p>View hardware overview:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">system_profiler</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> SPHardwareDataType</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Focus on these fields:</p>
<ul>
<li>Model and model identifier</li>
<li>Chip model</li>
<li>Unified memory capacity</li>
<li>Serial number</li>
<li>System firmware version</li>
</ul>
<p>View macOS version:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sw_vers</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>View system uptime:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">uptime</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>View first setup date:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">ls</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -la</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /var/db/.AppleSetupDone</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>The modification time of <code>.AppleSetupDone</code> can usually serve as a reference for when the initial setup was performed.</p>
<h2>Storage System Inspection</h2>
<h3>Built-in SSD Information</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">system_profiler</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> SPNVMeDataType</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>You can also check the <code>diskutil</code> output:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">diskutil</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> info</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> disk0</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Key things to focus on:</p>
<ul>
<li>SSD model</li>
<li>Protocol</li>
<li>TRIM support</li>
<li>SMART status</li>
<li>APFS container and volume status</li>
</ul>
<h3>SMART Health Data</h3>
<p>First install smartmontools:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">brew</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> install</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> smartmontools</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>View the complete SMART data for the built-in SSD:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">sudo</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> smartctl</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -a</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /dev/disk0</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Common metrics can be understood as follows:</p>
<p>| Metric | Meaning | Normal Reference |<br>
|</p>
]]></content:encoded>
      <enclosure url="https://blog.checo.cc/assets/images/posts/mac-mini-m4-cutaway.png" type="image/png"/>
    </item>
    <item>
      <title>Why Did VS Code Mysteriously Disappear on macOS?</title>
      <link>https://blog.checo.cc/en/posts/Mac/2.html</link>
      <guid>https://blog.checo.cc/en/posts/Mac/2.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Why Did VS Code Mysteriously Disappear on macOS?</source>
      <description>A bizarre experience: the VS Code icon in the Dock suddenly turned into a generic app icon, and the original Visual Studio Code.app was gone from Finder. After investigation, th...</description>
      <category>macOS</category>
      <category>Tools</category>
      <pubDate>Fri, 01 May 2026 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>A bizarre experience: the VS Code icon in the Dock suddenly turned into a generic app icon, and the original <code>Visual Studio Code.app</code> was gone from Finder. After investigation, the problem turned out to be caused by VS Code's auto-update, the ShipIt background process, and cross-APFS-volume moves.</p>
<!-- more -->
<h2>Origin</h2>
<p>I opened my Mac mini early in the morning to start working and habitually clicked the VS Code icon in the Dock. The icon turned into a blank macOS generic app icon.</p>
<figure><img src="/assets/images/vscode/vscode-generic-icon.png" alt="VS Code showing as generic icon in Dock or Finder" tabindex="0" loading="lazy"><figcaption>VS Code showing as generic icon in Dock or Finder</figcaption></figure>
<p>Opening Finder to the application directory also showed VS Code in an abnormal state:</p>
<figure><img src="/assets/images/vscode/vscode-missing-finder.png" alt="VS Code not properly recognized in Finder" tabindex="0" loading="lazy"><figcaption>VS Code not properly recognized in Finder</figcaption></figure>
<p>My VS Code wasn't installed in the system default <code>/Applications/</code>, but in the applications directory on an external APFS volume.</p>
<h2>First Reaction: Where Did the App Go?</h2>
<p>First check the application directory:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">ls</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -la</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "/Volumes/&#x3C;external-volume>/applications/"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> | </span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">grep</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -i</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "code\|visual"</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>No output. In other words, the <code>Visual Studio Code.app</code> directory no longer exists.</p>
<p>But the Dock still has the old path saved:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">defaults</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> read</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> com.apple.dock</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> persistent-apps</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> | </span><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">grep</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -A2</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "Visual Studio Code"</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>The output still shows a path like:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>file:///Volumes/&#x3C;external-volume>/applications/Visual%20Studio%20Code.app/</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>The Dock remembered an app that no longer exists, so macOS could only display the generic icon.</p>
<h2>The Real Culprit: VS Code Auto-Update</h2>
<p>Looking further at the system temporary directory, I found traces of VS Code's updater:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">find</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /private/var/folders</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -name</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "*.ShipIt*"</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -maxdepth</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> 4</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Multiple directories like this appeared:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>/private/var/folders/.../T/com.microsoft.VSCode.ShipIt.xxxxxxxx</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Entering one of these directories revealed a complete <code>Visual Studio Code.app</code> package. In other words, the old version had been deleted from the target directory, but the new version was stuck in the temporary directory and never successfully moved back to the installation location.</p>
<p>Checking the version of the app in the temporary directory:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">defaults</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> read</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "/private/var/folders/.../ShipIt.xxxxxxxx/Visual Studio Code.app/Contents/Info.plist"</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> CFBundleShortVersionString</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Confirmed it was the updated new version.</p>
<p>The conclusion was clear: VS Code's auto-updater deleted the old version, but moving the new version back to the original location failed.</p>
<h2>Why Did It Fail?</h2>
<p>VS Code uses Electron's Squirrel.Mac for auto-updates. The core helper process is called ShipIt. The general flow is:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>1. Check for updates and download new version</span></span>
<span class="line"><span>2. Extract to /private/var/folders/.../T/</span></span>
<span class="line"><span>3. Launch the ShipIt helper process</span></span>
<span class="line"><span>4. ShipIt waits for VS Code to exit</span></span>
<span class="line"><span>5. Delete the old Visual Studio Code.app</span></span>
<span class="line"><span>6. Move the new app to the original installation location</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>The problem is that the temporary directory and installation directory are on different volumes.</p>
<p>macOS's temporary directory is typically on the boot volume:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>/private/var/folders/&#x3C;hash>/T/</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>While my VS Code is on an external APFS volume:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>/Volumes/&#x3C;external-volume>/applications/Visual Studio Code.app</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Same-volume moves are usually just directory entry changes, which is fast. Cross-volume moves become copy-then-delete. This process isn't atomic — as long as the copy is interrupted, the target volume has permission issues, disk space is insufficient, or the volume is briefly unavailable, you can end up in a state where &quot;old version deleted, new version didn't arrive.&quot;</p>
<p>This isn't a VS Code-specific problem. Any updater that places the new version in the boot volume's temporary directory and then moves the app to another volume has similar risk.</p>
<h2>Why Did It Disappear Again After Reinstall?</h2>
<p>The first time, I moved the app back from the temporary directory:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">mv</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "/private/var/folders/.../T/com.microsoft.VSCode.ShipIt.xxxxxxxx/Visual Studio Code.app"</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">   "/Volumes/&#x3C;external-volume>/applications/"</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><p>Then disabled auto-update in VS Code settings:</p>
<div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-json"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">{</span></span>
<span class="line"><span style="--shiki-light:#E45649;--shiki-dark:#E06C75">  "update.mode"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">: </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">"none"</span></span>
<span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">}</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>I thought the problem was solved, but after reinstalling via DMG, VS Code was deleted again.</p>
<p>The reason is that ShipIt is an independent background process. The old VS Code had already triggered an update, and ShipIt might still be queued waiting to execute. <code>update.mode: &quot;none&quot;</code> only takes effect when the VS Code main process reads the configuration — it can't stop an already-running ShipIt.</p>
<h2>Final Fix</h2>
<h3>1. Kill the ShipIt Process</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">pkill</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -f</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "ShipIt"</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h3>2. Recover the App from the Latest Temporary Directory</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">mv</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "/private/var/folders/.../T/com.microsoft.VSCode.ShipIt.xxxxxxxx/Visual Studio Code.app"</span><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2"> \</span></span>
<span class="line"><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">   "/Volumes/&#x3C;external-volume>/applications/"</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div><div class="line-number"></div></div></div><h3>3. Disable Auto-Updater Execution Permissions</h3>
<p>The key is to prevent the ShipIt binary from continuing to run:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">chmod</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -x</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "/Volumes/&#x3C;external-volume>/applications/Visual Studio Code.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt"</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Confirm the execute permission has been removed:</p>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">ls</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -la</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "/Volumes/&#x3C;external-volume>/applications/Visual Studio Code.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt"</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>If there's no <code>x</code> in the permissions, it can no longer be directly executed.</p>
<h3>4. Clean Up Temporary Update Directories</h3>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#4078F2;--shiki-dark:#61AFEF">rm</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -rf</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> /private/var/folders/.../T/com.microsoft.VSCode.ShipIt.</span><span style="--shiki-light:#E45649;--shiki-dark:#E5C07B">*</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Be careful with the path here — make sure you only delete VS Code's ShipIt temporary directories.</p>
<h2>Fix Results</h2>
<ul>
<li>VS Code starts normally.</li>
<li>Dock icon is restored.</li>
<li>Can be reopened after quitting.</li>
<li>Auto-update no longer launches ShipIt.</li>
<li>Future updates require manually downloading DMG or using a package manager.</li>
</ul>
<h2>Lessons Learned</h2>
<h3><code>update.mode: &quot;none&quot;</code> Is Not Enough</h3>
<p>It can only prevent the VS Code main process from triggering updates subsequently. It has no effect on an already-running ShipIt background process.</p>
<h3>Installing Apps on Non-System Volumes Increases Update Risk</h3>
<p>If you must put apps on an external volume, it's recommended to disable auto-update and switch to manual updates. Otherwise, every auto-update could trigger a cross-volume copy.</p>
<h3>Temporary Directories Can Be Lifesavers</h3>
<p>When an update fails, the new version of the app is often still intact at:</p>
<div class="language-text line-numbers-mode" data-highlighter="shiki" data-ext="text" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-text"><span class="line"><span>/private/var/folders/.../T/com.microsoft.VSCode.ShipIt.xxxxxxxx/</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>Don't rush to re-download — check the temporary directory first.</p>
<h3>ShipIt Is an Independent Process</h3>
<p>Closing VS Code doesn't mean the updater has stopped. When troubleshooting this type of issue, check and clean up ShipIt separately.</p>
<h2>Technical Notes</h2>
<p>| Item | Details |<br>
|</p>
]]></content:encoded>
      <enclosure url="https://blog.checo.cc/assets/images/vscode/vscode-generic-icon.png" type="image/png"/>
    </item>
    <item>
      <title>Linux Common Scripts Collection</title>
      <link>https://blog.checo.cc/en/posts/VPS/1.html</link>
      <guid>https://blog.checo.cc/en/posts/VPS/1.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Linux Common Scripts Collection</source>
      <description>This article is currently just a script index placeholder. Later it will be organized into a directly copyable and executable command list by purpose, with applicable systems, r...</description>
      <category>VPS</category>
      <category>Linux</category>
      <pubDate>Mon, 20 May 2024 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>This article is currently just a script index placeholder. Later it will be organized into a directly copyable and executable command list by purpose, with applicable systems, risk notes, and rollback methods.</p>
<!-- more -->
<h2>Network Related</h2>
<h2>Benchmark Related</h2>
]]></content:encoded>
    </item>
    <item>
      <title>Finding Triple-Network IPs via FOFA</title>
      <link>https://blog.checo.cc/en/posts/VPS/2.html</link>
      <guid>https://blog.checo.cc/en/posts/VPS/2.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Finding Triple-Network IPs via FOFA</source>
      <description>The Nezha Probe&amp;apos;s triple-network latency feature is great for observing the quality of different ISP routes. You can use network space mapping tools like FOFA to find target IPs...</description>
      <category>VPS</category>
      <pubDate>Thu, 06 Jan 2022 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>The Nezha Probe's triple-network latency feature is great for observing the quality of different ISP routes. You can use network space mapping tools like FOFA to find target IPs, then combine with actual connectivity testing to filter for usable nodes.</p>
<!-- more -->
]]></content:encoded>
    </item>
    <item>
      <title>Installing Kali WSL on Windows 10</title>
      <link>https://blog.checo.cc/en/posts/Windows/kali-wsl.html</link>
      <guid>https://blog.checo.cc/en/posts/Windows/kali-wsl.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Installing Kali WSL on Windows 10</source>
      <description>Kali comes with many security testing tools. If you don&amp;apos;t want to take up C drive space, you can migrate the WSL distribution to the E drive. This article documents the process ...</description>
      <category>Windows</category>
      <category>Linux</category>
      <pubDate>Thu, 11 Dec 2025 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<p>Kali comes with many security testing tools. If you don't want to take up C drive space, you can migrate the WSL distribution to the E drive. This article documents the process of installing Kali WSL, exporting a backup, reimporting to a specified directory, and setting the default login user.</p>
<!-- more -->
<h2>Prerequisites</h2>
<p>Windows system needs WSL enabled first.</p>
<p>If you previously installed Kali WSL, you can uninstall the old instance with the following command:</p>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">wsl </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">--</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">unregister kali</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">linux</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><h2>Procedure</h2>
<ol>
<li>Install Kali, create a user password as prompted, and enter the system.</li>
</ol>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">wsl </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">--</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">install </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">d kali</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">linux</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><figure><img src="https://picgo.checo.cc/20251211022031.png" alt tabindex="0" loading="lazy"><figcaption></figcaption></figure>
<ol start="2">
<li>Package the current Kali system and save it to an intermediate location.</li>
</ol>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">wsl </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">--</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">export kali</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">linux D:\kali</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">backup.tar</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><figure><img src="https://picgo.checo.cc/20251211022321.png" alt tabindex="0" loading="lazy"><figcaption></figcaption></figure>
<ol start="3">
<li>Delete the current Kali system.</li>
</ol>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">wsl </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">--</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">unregister kali</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">linux</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><figure><img src="https://picgo.checo.cc/20251211022909.png" alt tabindex="0" loading="lazy"><figcaption></figcaption></figure>
<ol start="4">
<li>Import a new Kali system on the E drive using the package exported in step 2.</li>
</ol>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">wsl </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">--</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">import kali</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">linux E:\WSL\Kali D:\kali</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">backup.tar</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><figure><img src="https://picgo.checo.cc/20251211022548.png" alt tabindex="0" loading="lazy"><figcaption></figcaption></figure>
<ol start="5">
<li>Log in to the Kali system.</li>
</ol>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">wsl </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">d kali</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">linux</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><p>At this point you'll be logged in as root by default.</p>
<figure><img src="https://picgo.checo.cc/20251215005129.png" alt tabindex="0" loading="lazy"><figcaption></figcaption></figure>
<ol start="6">
<li>Create a configuration file to specify that WSL should log in with the <code>checo</code> user by default.</li>
</ol>
<div class="language-bash line-numbers-mode" data-highlighter="shiki" data-ext="bash" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-bash"><span class="line"><span style="--shiki-light:#0184BC;--shiki-dark:#56B6C2">echo</span><span style="--shiki-light:#986801;--shiki-dark:#D19A66"> -e</span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379"> "[user]\ndefault=checo"</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF"> > </span><span style="--shiki-light:#50A14F;--shiki-dark:#98C379">/etc/wsl.conf</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><figure><img src="https://picgo.checo.cc/20251215005258.png" alt tabindex="0" loading="lazy"><figcaption></figcaption></figure>
<ol start="7">
<li>Exit and restart WSL.</li>
</ol>
<div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">wsl </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">--</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">terminate kali</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">linux</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><div class="language-powershell line-numbers-mode" data-highlighter="shiki" data-ext="powershell" style="--shiki-light:#383A42;--shiki-dark:#abb2bf;--shiki-light-bg:#FAFAFA;--shiki-dark-bg:#282c34"><pre class="shiki shiki-themes one-light one-dark-pro vp-code"><code class="language-powershell"><span class="line"><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">wsl </span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">d kali</span><span style="--shiki-light:#383A42;--shiki-dark:#56B6C2">-</span><span style="--shiki-light:#383A42;--shiki-dark:#ABB2BF">linux</span></span></code></pre>
<div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0"><div class="line-number"></div></div></div><figure><img src="https://picgo.checo.cc/20251215005514.png" alt tabindex="0" loading="lazy"><figcaption></figcaption></figure>
<p>After re-entering, the prompt changes to <code>$</code> and the username becomes <code>checo</code>.</p>
<h2>Summary</h2>
<p>This way you can put Kali WSL on a non-system drive, reducing C drive usage. If I continue writing later, I can add another article on Kali common tools and WSL network configuration.</p>
]]></content:encoded>
      <enclosure url="https://picgo.checo.cc/20251211022031.png" type="image/png"/>
    </item>
    <item>
      <title>Football</title>
      <link>https://blog.checo.cc/en/photos/3.html</link>
      <guid>https://blog.checo.cc/en/photos/3.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Football</source>
      <description>2025.4.19 Beijing Guoan vs Shandong Taishan</description>
      <category>Photography</category>
      <pubDate>Mon, 10 Feb 2025 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<h2>2025.4.19 Beijing Guoan vs Shandong Taishan</h2>
<figure><img src="https://picgo.checo.cc/DSC_4615.JPG" alt tabindex="0" loading="lazy"><figcaption></figcaption></figure>
<!-- more -->
<p><img src="https://picgo.checo.cc/DSC_4616.JPG" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_4626.JPG" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_4628.JPG" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_4637.JPG" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_4640.JPG" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_4692.JPG" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_4696.JPG" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_4698.JPG" alt loading="lazy"></p>
]]></content:encoded>
      <enclosure url="https://picgo.checo.cc/DSC_4615.JPG" type="image/"/>
    </item>
    <item>
      <title>Birds</title>
      <link>https://blog.checo.cc/en/photos/2.html</link>
      <guid>https://blog.checo.cc/en/photos/2.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Birds</source>
      <description>Birds</description>
      <category>Photography</category>
      <pubDate>Mon, 10 Feb 2025 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<figure><img src="https://picgo.checo.cc/DSC_6427-已增强-降噪.jpg" alt tabindex="0" loading="lazy"><figcaption></figcaption></figure>
<!-- more -->
<p><img src="https://picgo.checo.cc/DSC_5916-已增强-降噪.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_6308.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_6359.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_6368-已增强-降噪.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_6364-已增强-降噪.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_6385-已增强-降噪.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_9305-2.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_9122.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_8961-已增强-降噪.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_8729.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_8666-已增强-降噪.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_8668-已增强-降噪.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_8727.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_4839-已增强-降噪.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_4880-已增强-降噪.jpg" alt loading="lazy"></p>
]]></content:encoded>
      <enclosure url="https://picgo.checo.cc/DSC_6427-已增强-降噪.jpg" type="image/jpeg"/>
    </item>
    <item>
      <title>Southern Anhui Scenic Road (Wannan Tibet Line)</title>
      <link>https://blog.checo.cc/en/photos/1.html</link>
      <guid>https://blog.checo.cc/en/photos/1.html</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Southern Anhui Scenic Road (Wannan Tibet Line)</source>
      <description>Photos</description>
      <category>Photography</category>
      <pubDate>Mon, 10 Feb 2025 00:00:00 GMT</pubDate>
      <content:encoded><![CDATA[
<h2>Photos</h2>
<figure><img src="https://picgo.checo.cc/DSC_0180.jpg" alt tabindex="0" loading="lazy"><figcaption></figcaption></figure>
<!-- more -->
<p><img src="https://picgo.checo.cc/DSC_0307-已增强-降噪.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_0076.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_0059.jpg" alt loading="lazy"><br>
<img src="https://picgo.checo.cc/DSC_0085.jpg" alt loading="lazy"></p>
]]></content:encoded>
      <enclosure url="https://picgo.checo.cc/DSC_0180.jpg" type="image/jpeg"/>
    </item>
    <item>
      <title>Photography</title>
      <link>https://blog.checo.cc/en/photos/</link>
      <guid>https://blog.checo.cc/en/photos/</guid>
      <source url="https://blog.checo.cc/en/rss.xml">Photography</source>
      <category>Homepage</category>
      <pubDate>Sun, 02 Feb 2025 09:36:39 GMT</pubDate>
    </item>
  </channel>
</rss>