live build ----lb config参数说明

版本:20230502

APT/包管理相关

参数 可选值 默认值 说明
--apt apt, apt-get, aptitude apt 定义构建镜像时使用哪个包管理器安装包
--apt-http-proxy URL 设置HTTP连接的代理,建议使用http_proxy环境变量代替
--apt-indices true, false true 定义生成的镜像是否包含apt索引
--apt-options 选项字符串 '--yes' 定义在chroot中构建镜像时附加到每个apt调用的选项
--apt-pipeline 0-5 未设置 设置apt管道深度,用于处理非RFC兼容的服务器
--apt-recommends true, false true 定义apt是否自动安装推荐的包
--apt-secure true, false true 定义apt是否检查仓库签名
--apt-source-archives true, false true 定义是否在live镜像的apt sources.list中包含deb-src条目
--aptitude-options 选项字符串 '--assume-yes' 定义在chroot中构建镜像时附加到每个aptitude调用的选项

架构与基础配置

参数 可选值 默认值 说明
-a, --architecture ARCHITECTURE 主机架构 定义要构建镜像的架构,不能跨架构构建除非主机支持
--archive-areas 逗号或空格分隔的列表 main 定义Debian包存档区域(如main, contrib, non-free)
--backports true, false false 定义是否在镜像中包含Debian backports包存档
--binary-filesystem fat16, fat32, ext2, ext3, ext4, ntfs fat32 定义镜像中使用的文件系统类型(仅适用于支持选择的镜像类型)
-b, --binary-image iso, iso-hybrid, netboot, tar, hdd iso-hybrid(syslinux)或iso(非syslinux) 定义要构建的镜像类型

引导配置

参数 可选值 默认值 说明
--bootappend-install 参数字符串 设置debian-installer特有的引导参数
--bootappend-live 参数字符串 设置debian-live特有的引导参数
--bootappend-live-failsafe 参数字符串 设置debian-live安全模式引导参数
--bootloaders grub-legacy, grub-pc, syslinux, grub-efi 根据架构而定 定义生成镜像中使用的引导加载器,可指定多个(逗号或空格分隔)

引导程序与QEMU

参数 可选值 默认值 说明
--bootstrap-qemu-arch ARCH 设置用于跨架构引导的架构
--bootstrap-qemu-exclude 包名列表 设置跨架构引导期间要排除的包
--bootstrap-qemu-static PATH 设置用于跨架构引导的静态qemu二进制文件路径

构建系统与缓存

参数 可选值 默认值 说明
--breakpoints 无参数 未启用 在镜像生成过程中插入断点(开发用途)
--build-with-chroot true, false true 定义是否使用chroot内的工具构建镜像(禁用可能危险)
--cache true, false 根据子选项 全局定义是否使用任何缓存
--cache-indices true, false false 定义是否缓存下载的包索引和列表
--cache-packages true, false true 定义是否缓存下载的包文件
--cache-stages 阶段列表 bootstrap 设置哪些阶段应该被缓存(逗号或空格分隔)

校验和与文件系统

参数 可选值 默认值 说明
--checksums md5, sha1, sha224, sha256, sha384, sha512, none 未指定 定义镜像是否包含校验和文件,用于完整性检查
--chroot-filesystem ext2, ext3, ext4, squashfs, jffs2, none, plain 未指定 定义根文件系统镜像使用的文件系统类型
--chroot-squashfs-compression-level LEVEL mksquashfs默认值 定义squashfs根文件系统使用的压缩级别
--chroot-squashfs-compression-type gzip, lzma, lzo, lz4, xz, zstd xz 定义squashfs根文件系统使用的压缩算法

清理与压缩

参数 可选值 默认值 说明
--clean 无参数 未启用 通过自动移除未使用的空子目录来最小化配置目录
--color 无参数 未启用 在消息中启用颜色
--compression bzip2, gzip, lzip, xz, none none 定义用于压缩tarball的压缩程序
-c, --conffile FILE 标准配置文件 定义用户指定的替代配置文件
--config GIT_URL::GIT_BRANCH 从git仓库引导配置树
--debconf-frontend dialog, editor, noninteractive, readline noninteractive 定义chroot中debconf前端的设置
--debconf-priority low, medium, high, critical critical 定义chroot中debconf优先级的设置

Debian安装器

参数 可选值 默认值 说明
--debian-installer cdrom, netinst, netboot, businesscard, live, none none 定义是否以及包含哪种类型的debian-installer
--debian-installer-distribution daily, git, CODENAME 与live系统相同 定义debian-installer文件的来源分发版
--debian-installer-gui true, false true 定义是否提供图形化debian-installer
--debian-installer-preseedfile FILE或URL config/binary_debian-installer/preseed.cfg 设置debian-installer的预置文件
--debootstrap-options 选项字符串 未设置 传递给debootstrap设置基础系统的选项
--debootstrap-script SCRIPT 未设置 告诉debootstrap使用替代的引导脚本

调试与分发

参数 可选值 默认值 说明
--debug 无参数 未启用 启用调试信息消息
-d, --distribution CODENAME buster 定义生成的live系统的分发版
--distribution-binary CODENAME --distribution相同 定义在生成的live系统中启用的分发版
--distribution-chroot CODENAME --distribution相同 定义用于构建live系统的分发版

设备映射器验证

参数 可选值 默认值 说明
--dm-verity 无参数 未启用 为根文件系统启用dm-verity支持
--dm-verity-fec 2-24 未设置 为dm-verity启用前向纠错
--dm-verity-sign SIGN_SCRIPT 未设置 签名dm-verity设备的根哈希

其他功能

参数 可选值 默认值 说明
--dump 无参数 未启用 准备当前live系统配置和live-build版本的报告
--firmware-binary true, false true 在debian-installer中包含固件包
--firmware-chroot true, false true 在live镜像中包含固件包
--force 无参数 未启用 强制重新执行已运行的阶段
--gzip-options 选项字符串 '--best' 定义构建镜像时附加到gzip调用的选项
--hdd-label LABEL DEBIAN_LIVE 定义HDD目标的标签
--hdd-partition-start START 设置HDD目标的分区起始位置
--hdd-size SIZE auto 定义HDD目标的大小(MB)
--ignore-system-defaults 无参数 未启用 忽略系统默认设置
--image-name NAME live-image 设置镜像的基本名称
--initramfs none, live-boot live-boot 设置包含live系统特定initramfs修改的包名称
--initramfs-compression bzip2, gzip, lzma gzip 定义用于压缩initramfs的压缩程序
--initsystem sysvinit, systemd, none systemd 定义初始化系统
--interactive true, shell, x11, xnest, false false 定义是否在chroot中启动交互式shell进行手动定制

ISO镜像设置

参数 可选值 默认值 说明
--iso-application NAME Debian Live 设置CD/DVD镜像头中的APPLICATION字段
--iso-preparer NAME 自动生成 设置CD/DVD镜像头中的PREPARER字段
--iso-publisher NAME Debian Live项目信息 设置CD/DVD镜像头中的PUBLISHER字段
--iso-volume NAME 自动生成 设置CD/DVD镜像头中的VOLUME字段
--jffs2-eraseblock SIZE 64 KiB 设置JFFS2文件系统的擦除块大小

内核与密钥环

参数 可选值 默认值 说明
--keyring-packages 包列表 debian-archive-keyring 设置密钥环包或附加密钥环包
-k, --linux-flavours 内核风味列表 未指定 设置要安装的内核风味(空格分隔)
--linux-packages 包列表 linux-image 定义部分内核包名的列表

内存测试与镜像源

参数 可选值 默认值 说明
--loadlin true, false false 设置是否包含loadlin(x86_64或i386包含debian-installer时除外)
--memtest memtest86+, memtest86, none memtest86+ 定义是否包含内存测试器(仅amd64和i386)
--mirror-binary URL http://deb.debian.org/debian/ 设置最终镜像中配置的包镜像位置
--mirror-binary-security URL http://security.debian.org/ 设置最终镜像中配置的安全包镜像位置
--mirror-bootstrap URL http://deb.debian.org/debian/ 设置用于引导的Debian包镜像位置
--mirror-chroot URL --mirror-bootstrap相同 设置用于构建live系统的包镜像位置
--mirror-chroot-security URL http://security.debian.org/ 设置用于构建live系统的安全包镜像位置
--mirror-debian-installer URL --mirror-chroot相同 设置用于获取debian-installer镜像的镜像位置

模式与网络

参数 可选值 默认值 说明
--mode debian debian 定义全局模式以加载项目特定默认值
--net-tarball true, false true 定义是否创建压缩的tarball
--no-color 无参数 未启用 关闭消息中的颜色

ONIE支持

参数 可选值 默认值 说明
--onie true, false false 定义是否生成ONIE.bin镜像
--onie-kernel-cmdline 选项字符串 定义ONIE系统引导镜像时使用的附加内核命令行选项

父发行版配置(衍生版本)

参数 可选值 默认值 说明
--parent-archive-areas 存档区域列表 未设置 定义衍生live系统的存档区域
--parent-debian-installer-distribution daily, git, CODENAME 未设置 定义衍生live系统的父debian-installer分发版
--parent-distribution CODENAME 未设置 定义衍生live系统的父分发版
--parent-distribution-binary CODENAME 未设置 定义衍生live系统中启用的父分发版
--parent-distribution-chroot CODENAME 未设置 定义用于构建live系统的父分发版
--parent-mirror-binary URL --mirror-binary相同 设置衍生版本最终镜像中配置的包镜像位置
--parent-mirror-binary-security URL --mirror-binary-security相同 设置衍生版本最终镜像中配置的安全包镜像位置
-m, --parent-mirror-bootstrap URL --mirror-bootstrap相同 设置衍生版本用于引导的包镜像位置
--parent-mirror-chroot URL --parent-mirror-bootstrap相同 设置衍生版本用于构建live系统的包镜像位置
--parent-mirror-chroot-security URL --mirror-chroot-security相同 设置衍生版本用于构建live系统的安全包镜像位置
--parent-mirror-debian-installer URL --parent-mirror-chroot相同 设置衍生版本用于获取debian-installer镜像的镜像位置

输出控制

参数 可选值 默认值 说明
--quiet 无参数 未启用 减少lb build输出的消息详细程度
--verbose 无参数 未启用 增加lb build输出的消息详细程度

安全与源镜像

参数 可选值 默认值 说明
--security true, false 未指定 定义是否使用安全镜像选项中指定的安全仓库
--source true, false false 定义是否构建与二进制镜像对应的源代码镜像
-s, --source-images iso, netboot, tar, hdd tar 定义源代码镜像的类型,可指定多个

系统配置

参数 可选值 默认值 说明
--swap-file-path PATH 未设置 定义在二进制镜像中创建的交换文件路径
--swap-file-size MB 512 定义交换文件的大小(MB)
--system live, normal live 定义生成的系统镜像应该是live系统还是普通系统

UEFI与时间

参数 可选值 默认值 说明
--uefi-secure-boot auto, enable, disable auto 使用grub-efi时启用或禁用安全启动支持
--updates true, false 未指定 定义是否在镜像中包含Debian更新包存档
--utc-time true, false false 定义时间戳是否使用UTC

验证与Windows支持

参数 可选值 默认值 说明
--validate 无参数 未启用 仅验证配置,不进行更改
--win32-loader true, false false 定义是否在二进制镜像中包含win32-loader

分发支持

参数 可选值 默认值 说明
--zsync true, false true 定义是否生成用于zsync格式分发镜像的文件
相关推荐
周杰伦的稻香5 天前
Debian 9 (Stretch)仓库无法使用
运维·debian
MaoSource5 天前
Debian 12 安装 FFmpeg 命令
服务器·ffmpeg·debian
weixin_462446236 天前
一键安装单节点 Zookeeper 3.8.5(附完整 Bash 脚本)
zookeeper·debian·bash
胖好白6 天前
【RK3588开发】Debian系统的驱动开发配置
驱动开发·debian
网硕互联的小客服9 天前
Debian系统提示“Media change...”如何处理?
运维·debian
shhpeng10 天前
Debian packages 的签名与验证
运维·debian
shhpeng10 天前
Debian 包的制作与安装完整指南
运维·debian
shhpeng10 天前
如何制作一个简单的 .deb Debian 包 ?
运维·debian
weixin_4307509312 天前
OpenMediaVault debian Linux安装配置企业私有网盘(三) 静态ip地址配置
linux·服务器·debian·nas·网络存储系统
零意@12 天前
debian如何把新编译的内核镜像替换原来的内核
运维·debian·更新内核版本·linux内核版本更新·debian更新内核