惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Securelist
V
V2EX
MongoDB | Blog
MongoDB | Blog
量子位
J
Java Code Geeks
GbyAI
GbyAI
Attack and Defense Labs
Attack and Defense Labs
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 叶小钗
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Cloudbric
Cloudbric
Recorded Future
Recorded Future
月光博客
月光博客
Help Net Security
Help Net Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
The Register - Security
The Register - Security
Scott Helme
Scott Helme
Google DeepMind News
Google DeepMind News
W
WeLiveSecurity
G
Google Developers Blog
T
Troy Hunt's Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
I
InfoQ
S
SegmentFault 最新的问题
G
GRAHAM CLULEY
C
Check Point Blog
Project Zero
Project Zero
有赞技术团队
有赞技术团队
B
Blog RSS Feed
大猫的无限游戏
大猫的无限游戏
P
Privacy International News Feed
AI
AI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
F
Full Disclosure
C
CXSECURITY Database RSS Feed - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
H
Hacker News: Front Page
S
Secure Thoughts
罗磊的独立博客
T
Threat Research - Cisco Blogs
aimingoo的专栏
aimingoo的专栏
博客园_首页
宝玉的分享
宝玉的分享
C
Cybersecurity and Infrastructure Security Agency CISA

陈陈菌博客

如何在 podman 容器内使用 systemd 在 podman 运行 GUI 应用的经验总结 管理 podman 容器与镜像的导入或导出 用 xdg-dbus-proxy 解决容器的文件选择器的问题 解决 VSCodium 或 Code-Server 无法安装 GitHub Copilot 问题 不可变发行版 Fedora Silverblue 的体验记录 解决 apt 或 dnf 无法 tab 补全的问题 对 (MPA) 多页面切换实现丝滑动画的探索 让服务在非 Root 权限下使用 80 或 443 端口 AppImage 应用打包快速上手 Flatpak 使用和应用打包快速上手 如何用 webSocket 实现一个实时聊天应用 Linux 内核编译 | 快速上手 | deb 高度可定制的 KDE 窗口装饰器 klassy 有关 docker、podman、nspawn、bwrap 的 Linux 容器图形性能测试 创建任意 Linux 容器并支持 GUI 程序 (Docker) 创建任意 Linux 容器并支持 GUI 程序 (nspawn) 文件同步工具 rsync 的使用 玲珑 (Linyaps) 应用打包 RPM 打包指南 | 精简版 PBR 材质的各种贴图类型入门 APU | Stable-Diffusion 使用记录 如何在 Electron 上启用 WebGPU Grub 主题安装与配置 Fcitx5 主题安装与自定义 不使用 Nginx 的网站开发指南 如何自制一个简易的资源监控程序 SQL 常用 CRUD 语法记录 Debian 打包入门,与需要注意的问题 在 fedora 建立一个 Arch 容器 (bwrap) 在 fedora 上建立一个 debian 容器 (bwrap) i3wm | 自制一个极简的屏幕亮度调节器 在 Linux 下启用内存压缩技术 zram 搭建一个本地轻量级聊天 Ai 我又又又重新上线了博客 如何通过命令行管理 wine 容器 (包括 proton) Btrfs 文件系统创建 swap 文件的方法 如何创建适用于 Linux 桌面的程序启动文件 在 Linux 控制 intel CPU 调度的方法 Arch Linux 的基本安装
使用 debootstrap 构建 Debian 系根文件系统
GlumiStudio@ · 2025-10-09 · via 陈陈菌博客

2025-10-09 01:35:42

分类: Linux 标签: 系统运维,Debian


debootstrap 是一款专为 Debian 系衍生发行版(包括 Ubuntu)设计的命令行工具,用来构建一个基础根文件系统(rootfs)。

快速入门


Debian / Ubuntu 安装方式

sudo apt install debootstrap

使用传参:

sudo debootstrap [选项] <目标版本代号> <rootfs存放路径> [软件源地址]

常用选项参数:

参数作用
--arch=<架构>指定目标系统的架构如:amd64riscv64
--variant=<变体>指定系统的精简程度,minbase: 最小化,base: 标准,buildd: 含编译工具,fakechroot: 非特权(root)构建
--include=<包>额外安装指定软件包,如:sudovim
--exclude=<包>排除指定的软件包
--components=<组件>指定软件源组建,如:maincontribnon-free

ps: 参数可使用 --[选项] [传参]--[选项]=[传参] 两种格式。

参考例子


构建一个 x64 架构的 debian sid

sudo debootstrap --arch amd64 sid /path/to/debian/ https://deb.debian.org/debian

构建一个 x64 架构最小基础的 ubuntu 25

sudo debootstrap --arch amd64 --variant=minbase plucky ./ubuntu25_min/ https://mirrors.ustc.edu.cn/ubuntu/