<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Lsyz]]></title><description><![CDATA[哈喽~欢迎光临]]></description><link>https://ashuo.site</link><image><url>https://ashuo.sitehttps://ashuo.site/avatars/touxiang-1.jpg</url><title>Lsyz</title><link>https://ashuo.site</link></image><generator>Shiro (https://github.com/Innei/Shiro)</generator><lastBuildDate>Thu, 17 Sep 2026 18:44:05 GMT</lastBuildDate><atom:link href="https://ashuo.site/feed" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 Sep 2026 18:44:05 GMT</pubDate><language><![CDATA[zh-CN]]></language><item><title><![CDATA[CentOS 7 救援模式修复 /boot 分区]]></title><description><![CDATA[<div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://ashuo.site/posts/default/linux">https://ashuo.site/posts/default/linux</a></blockquote><div><h1 id="centos-7--boot-">CentOS 7 救援模式修复 /boot 分区操作手册</h1><h2 id="">适用场景</h2><ul><li>系统：CentOS 7，标准分区（非 LVM）</li><li>故障：<code>/boot</code> 分区（<code>/dev/vda1</code>）内容被清空，系统无法引导</li><li>环境：已通过 ISO 镜像进入救援模式，处于 <code>sh-4.2#</code> 提示符下</li></ul><p>请严格按以下顺序执行。</p><h2 id="">第一阶段：挂载原系统</h2><pre class="language-bash lang-bash"><code class="language-bash lang-bash"># 1. 挂载根分区（vda2）
mount /dev/vda2 /mnt/sysimage

# 2. 挂载已清空的 boot 分区（vda1）
mount /dev/vda1 /mnt/sysimage/boot

# 3. 验证挂载成功（应能看到 etc、var、usr 等目录）
ls /mnt/sysimage</code></pre><blockquote><p><strong>排错提示：</strong></p><ul><li>若第 1 步报错 <code>wrong fs type</code>，先执行 <code>xfs_repair -L /dev/vda2</code> 修复文件系统后再挂载；</li><li>若报错 <code>unknown filesystem type &#x27;ext4&#x27;</code>，改用 <code>mount -t ext4 /dev/vda2 /mnt/sysimage</code> 显式指定文件系统类型。</li></ul></blockquote>
<h2 id="chroot-">第二阶段：chroot 进入原系统</h2><pre class="language-bash lang-bash"><code class="language-bash lang-bash">mount --bind /dev /mnt/sysimage/dev
mount --bind /proc /mnt/sysimage/proc
mount --bind /sys /mnt/sysimage/sys
mount --bind /run /mnt/sysimage/run
chroot /mnt/sysimage</code></pre><blockquote><p><strong>成功标志：</strong> 命令行提示符变为 <code>[root@localhost /]#</code>。</p></blockquote>
<h2 id="-yum-">第三阶段：配置本地 YUM 源</h2><pre class="language-bash lang-bash"><code class="language-bash lang-bash"># 1. 挂载 ISO 光驱
mkdir -p /mnt/cdrom
mount /dev/sr0 /mnt/cdrom

# 2. 备份旧源，创建本地源
mkdir -p /etc/yum.repos.d/backup
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/backup/ 2&gt;/dev/null

cat &gt; /etc/yum.repos.d/local.repo &lt;&lt; &#x27;EOF&#x27;
[local-base]
name=Local ISO Base
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=0
EOF

# 3. 刷新缓存
yum clean all &amp;&amp; yum makecache</code></pre><h2 id="-grub">第四阶段：重装内核与 GRUB（核心修复）</h2><pre class="language-bash lang-bash"><code class="language-bash lang-bash"># 1. 重装内核（恢复 vmlinuz 与 initramfs）
yum reinstall kernel -y
# 若提示找不到包，改用：yum install kernel -y

# 2. 重装 GRUB2
yum reinstall grub2 grub2-tools -y

# 3. 将引导程序写入 MBR
grub2-install /dev/vda

# 4. 生成启动菜单
grub2-mkconfig -o /boot/grub2/grub.cfg</code></pre><blockquote><p><strong>成功标志：</strong></p><ul><li>第 3 步输出 <code>No error reported</code>；</li><li>第 4 步输出 <code>Found linux image: /boot/vmlinuz-...</code>。</li></ul></blockquote>
<h2 id="">第五阶段：退出并重启</h2><pre class="language-bash lang-bash"><code class="language-bash lang-bash">exit
reboot</code></pre><blockquote><p><strong>重启前必做：</strong> 在虚拟机设置中将启动顺序改回硬盘优先，或卸载 ISO 镜像，否则将再次进入救援模式。</p></blockquote>
<h2 id="">关键检查点速查</h2><table><thead><tr><th>步骤</th><th>预期结果</th><th>失败处理</th></tr></thead><tbody><tr><td><code>mount /dev/vda2</code></td><td>无报错</td><td>执行 <code>xfs_repair -L /dev/vda2</code> 后重试</td></tr><tr><td><code>chroot</code></td><td>提示符变化</td><td>检查各 bind mount 是否全部成功</td></tr><tr><td><code>yum makecache</code></td><td>显示 repo 信息</td><td>检查 <code>/dev/sr0</code> 是否正确挂载</td></tr><tr><td><code>grub2-install</code></td><td><code>No error reported</code></td><td>确认目标为 <code>/dev/vda</code> 而非 <code>/dev/vda1</code></td></tr><tr><td><code>grub2-mkconfig</code></td><td><code>Found linux image</code></td><td>检查 <code>yum reinstall kernel</code> 是否成功</td></tr></tbody></table></div><p style="text-align:right"><a href="https://ashuo.site/posts/default/linux#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://ashuo.site/posts/default/linux</link><guid isPermaLink="true">https://ashuo.site/posts/default/linux</guid><dc:creator><![CDATA[Lsyz]]></dc:creator><pubDate>Tue, 25 Aug 2026 09:07:08 GMT</pubDate></item><item><title><![CDATA[2026-08-20]]></title><description><![CDATA[<div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://ashuo.site/notes/1">https://ashuo.site/notes/1</a></blockquote><span>有点困</span><p style="text-align:right"><a href="https://ashuo.site/notes/1#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://ashuo.site/notes/1</link><guid isPermaLink="true">https://ashuo.site/notes/1</guid><dc:creator><![CDATA[Lsyz]]></dc:creator><pubDate>Thu, 20 Aug 2026 07:36:35 GMT</pubDate></item><item><title><![CDATA[文章测试]]></title><description><![CDATA[<div><blockquote>该渲染由 Shiro API 生成，可能存在排版问题，最佳体验请前往：<a href="https://ashuo.site/posts/default/wz">https://ashuo.site/posts/default/wz</a></blockquote><div><h1 id="linux--mihomoclash-meta">Linux 使用 mihomo（Clash Meta）</h1><h2 id="">下载安装</h2><p>根据系统架构下载对应版本：</p><pre class="language-bash lang-bash"><code class="language-bash lang-bash"># x86_64 系统
wget https://github.com/MetaCubeX/mihomo/releases/download/v1.19.8/mihomo-linux-amd64-compatible-v1.19.8.gz

# 解压并赋予执行权限
gzip -d mihomo-linux-amd64-compatible-v1.19.8.gz
mv mihomo-linux-amd64-compatible-v1.19.8 mihomo
chmod +x mihomo

# 移动到系统目录
mv mihomo /opt/mihomo</code></pre><h2 id="">创建配置目录</h2><pre class="language-bash lang-bash"><code class="language-bash lang-bash">mkdir -p /etc/mihomo</code></pre><h2 id="-systemd-">配置 systemd 服务</h2><p>创建服务文件 <code>/etc/systemd/system/mihomo.service</code>：</p><pre class="language-ini lang-ini"><code class="language-ini lang-ini">[Unit]
Description=mihomo Daemon
After=network.target

[Service]
Type=simple
ExecStart=/opt/mihomo -d /etc/mihomo
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target</code></pre><p>启动服务：</p><pre class="language-bash lang-bash"><code class="language-bash lang-bash">systemctl daemon-reload
systemctl start mihomo
systemctl enable mihomo</code></pre><h2 id="">配置代理节点</h2><p>编辑 <code>/etc/mihomo/config.yaml</code>：</p><pre class="language-yaml lang-yaml"><code class="language-yaml lang-yaml">mixed-port: 7890
external-controller: 0.0.0.0:9091
secret: &quot;&lt;YOUR_SECRET&gt;&quot;

proxy-providers:
  my-sub:
    type: http
    url: &quot;http://&lt;YOUR_SUBSCRIBE_DOMAIN&gt;/api/v1/client/subscribe?token=&lt;YOUR_SUBSCRIBE_TOKEN&gt;&quot;
    interval: 3600
    path: ./proxy-provider.yaml
    health-check:
      enable: true
      url: http://www.gstatic.com/generate_204
      interval: 300

proxy-groups:
  - name: &quot;Proxy&quot;
    type: select
    use:
      - my-sub
    proxies:
      - DIRECT

rules:
  - GEOIP,CN,DIRECT
  - MATCH,Proxy

dns:
  enable: true
  listen: 0.0.0.0:1053
  enhanced-mode: fake-ip
  nameserver:
    - 223.5.5.5
    - 119.29.29.29
log-level: info</code></pre><blockquote><p>请将 <code>&lt;YOUR_SECRET&gt;</code>、<code>&lt;YOUR_SUBSCRIBE_DOMAIN&gt;</code>、<code>&lt;YOUR_SUBSCRIBE_TOKEN&gt;</code> 替换为自己的值。</p></blockquote>
<p>重启服务使配置生效：</p><pre class="language-bash lang-bash"><code class="language-bash lang-bash">systemctl restart mihomo</code></pre><h2 id="">管理面板</h2><ol start="1"><li>打开 <a href="https://metacubexd.pages.dev">Metacubexd 面板</a></li><li>连接地址：<code>http://10.192.53.55:9091</code>（按本机实际 IP 修改）</li><li>输入 Secret：见上方 <code>&lt;YOUR_SECRET&gt;</code> 占位</li></ol></div><p style="text-align:right"><a href="https://ashuo.site/posts/default/wz#comments">看完了？说点什么呢</a></p></div>]]></description><link>https://ashuo.site/posts/default/wz</link><guid isPermaLink="true">https://ashuo.site/posts/default/wz</guid><dc:creator><![CDATA[Lsyz]]></dc:creator><pubDate>Thu, 20 Aug 2026 07:35:45 GMT</pubDate></item></channel></rss>