change to linux-6.14.9

This commit is contained in:
zj
2025-12-06 16:50:31 +08:00
parent bcc08707b9
commit 6fe36a9aad
5 changed files with 53 additions and 11 deletions

View File

@@ -0,0 +1,24 @@
#!/bin/bash
# 更新 pacman 数据库,确保能找到本地仓库的包
pacman -Sy
# 安装本地仓库的 linux 和 linux-headers
# 由于 [custom] 仓库优先级最高pacman 会从这里安装
pacman -S --noconfirm linux linux-headers
# 重新生成 initramfs确保新内核能启动
# 这通常在安装内核时由 pacman 自动处理,但手动安装后最好确认一下
mkinitcpio -P
# 清理 pacman 缓存
pacman -Scc --noconfirm
# 删除本地仓库的数据库文件,避免在最终系统上占用空间
# rm -rf /localrepo/custom.db.tar.gz /localrepo/custom.files.tar.gz
# rm -rf /localrepo/*.pkg.tar.zst
# rmdir /localrepo
# 如果你希望在安装完成后移除本地仓库的定义,可以编辑 pacman.conf
# 但对于 livecd 或安装介质,通常不需要这样做,因为它是临时环境
# sed -i '/^\[custom\]/,/^Server = file:\/\/\/localrepo/d' /etc/pacman.conf