This repository has been archived on 2026-06-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Claude d888a9700e Simplify to kernel-install-only; default to BBR + CAKE + ECN
Strip the project down to installing the BBRv3 kernel and nothing else, and
ship a single standard kernel (x86_64 + arm64, latest stable).

- install.sh: 1413 -> ~490 lines. Menu reduced to install latest / install
  specific / status / uninstall. Removed all qdisc/TCP-tuning/speedtest/
  smart-bandwidth/"madness"/clear-config features, the security (Dirty-Frag)
  mitigations, the profile (standard/max) selection, and the self-installing
  `b` quick command. Map dep command->package (sysctl->procps, awk->gawk) and
  abort clearly when a hard dependency is missing.
- Default network stack: on install write /etc/sysctl.d/99-bbrv3.conf with
  net.core.default_qdisc=cake, net.ipv4.tcp_congestion_control=bbr,
  net.ipv4.tcp_ecn=1 (CAKE has no compile-time default-qdisc option, so it is
  set via sysctl); uninstall removes the drop-in.
- prepare-kernel-config.sh: build sch_cake in (=y) so cake works at boot; drop
  the now-dead build-configs/ output.
- build.yml: matrix is just x86_64 + arm64 standard; tags are <arch>-<version>;
  removed the max profile/steps and the update-config-baseline auto-commit job;
  releases carry only the kernel .deb assets.
- Remove cve_2026_31431_detector.py and the two max-profile helper scripts.
- README rewritten to the 4-action, kernel-only scope.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 14:24:56 +08:00
2026-06-14 03:26:38 +08:00

BBRv3 内核安装脚本

一个用于 Debian/Ubuntu VPS 的 BBRv3 内核安装脚本。脚本会自动识别系统架构,从本仓库的 Gitea Releases 下载匹配的 BBRv3 内核 .deb 包并安装。内核默认启用 BBR 拥塞控制并内置 sch_cake;安装脚本会写入 /etc/sysctl.d/99-bbrv3.conf,把默认队列算法设为 cake 并开启 ECNnet.ipv4.tcp_ecn=1),安装并重启后 BBR + CAKE + ECN 自动生效。

脚本入口:

bash <(curl -fsSL https://git.chilldove.com/icePigeon/linux-kernel-bbrv3/raw/branch/main/install.sh)

支持环境

项目 要求
最低支持系统 Ubuntu 24.04+ / Debian 12+
包管理器 apt-get
架构 x86_64 / aarch64
引导方式 建议使用 GRUB
使用场景 VPS / 云服务器 / 独立服务器

不建议在树莓派、NanoPi 等依赖 U-Boot 或厂商定制内核链路的设备上使用。此类设备的内核安装和启动流程通常与通用 Debian/Ubuntu VPS 不一致。

Debian testing/unstable 如缺少 VERSION_ID,脚本会按 VERSION_CODENAME 识别 bookwormtrixieforkysid。Alpine 等非 Debian 系统不支持安装本项目内核包(产物是 .deb,依赖 Debian/Ubuntu 的包管理与内核安装链路)。

本项目内核主线为 Linux 7.x。安装内核时脚本会按最低支持系统拦截过旧环境,避免因用户态、initramfs 或引导链路过旧导致启动失败或 kernel panic。

菜单功能

运行脚本后进入交互菜单:

1. 安装或更新 BBR v3 内核(最新版)
2. 安装指定版本
3. 检查 BBR v3 状态
4. 卸载 BBR v3 内核

内核与 BBR 策略

本项目的构建目标是:

BBRv3 补丁固定,内核自动跟随 kernel.org 最新 stable 更新。

也就是说,BBR 实现不会在自动构建时偷偷更新;自动更新的是 Linux stable 内核版本。构建流程会把仓库内固定的 BBRv3 patch 应用到最新 stable 内核上。

当前 patch 选择规则:

linux-7.0.y -> patches/bbrv3-linux-7.0.patch
linux-7.1.y -> patches/bbrv3-linux-7.1.patch

同一主线系列内的小版本更新会自动复用同一个 patch,例如 7.0.11 -> 7.0.12。如果内核跳到新的主线系列但仓库内还没有对应 patch,构建会直接失败,避免产出不可验证的内核包。

安装最新版

运行脚本后选择:

1. 安装或更新 BBR v3 内核(最新版)

脚本会:

  • 检查系统是否为 Debian/Ubuntu,架构是否为 x86_64aarch64
  • 从 Gitea Releases 获取当前架构匹配的最新版本。
  • 下载内核 .deb 包,安装并更新引导配置。
  • 提示是否重启。

如果访问私有仓库或遇到 Gitea API 限流,可先设置 token

export GITEA_TOKEN=你的 Gitea Token
bash <(curl -fsSL https://git.chilldove.com/icePigeon/linux-kernel-bbrv3/raw/branch/main/install.sh)

安装指定版本

运行脚本后选择:

2. 安装指定版本

脚本会列出当前架构可用的 release tag,并按编号安装指定版本。

release tag 格式:

x86_64-7.0.11
arm64-7.0.11

检查 BBRv3 状态

运行脚本后选择:

3. 检查 BBR v3 状态

脚本会检查:

  • tcp_bbr 模块版本是否为 3
  • 当前 TCP 拥塞控制算法是否为 bbr
  • 当前默认队列算法是否为 cake

也可以手动检查:

uname -r
sysctl net.ipv4.tcp_congestion_control
sysctl net.core.default_qdisc
sysctl net.ipv4.tcp_ecn
modinfo tcp_bbr 2>/dev/null | grep '^version:'

卸载

运行脚本后选择:

4. 卸载 BBR v3 内核

脚本会卸载由本项目安装的 BBR v3 内核包(包名带 -bbrv3 后缀),删除 /etc/sysctl.d/99-bbrv3.conf,并更新引导配置。卸载后建议重启。

内核包来源

.deb 内核包由 Gitea Actions 构建并发布到本仓库 Releases,提供 x86_64arm64 两种标准 BBRv3 内核(arm64 在同一台 x86_64 runner 上交叉编译)。

构建流程会:

  • 读取 kernel.org 最新 stable 版本。
  • 下载 gregkh/linux 对应 stable 分支。
  • 应用仓库内固定 BBRv3 patch。
  • 默认启用 BBR,并把 sch_cake 编入内核(=y),安装脚本据此把默认队列设为 cake。
  • 关闭 debug info,拒绝发布 *-dbg*.deb / *-dbgsym*.deb

构建不会自动更新 BBR patch 本身。

免责声明

内核升级有风险。安装前建议确认 VPS 控制台、救援模式或旧内核启动项可用。使用本项目构建或安装的内核造成的系统启动失败、网络异常或数据损失,由使用者自行承担。

S
Description
No description provided
Readme
460 KiB
Languages
Shell 100%