Debian live-build 首次运行后不会生成 binary-hybrid.iso

Debian live-build 首次运行后不会生成 binary-hybrid.iso

我的电脑:

  • Debian Squeeze amd64
  • live-build该软件包的版本为 2.0.12-2 (Squeeze 中最新版本)

我正在尝试构建一个包含一些自定义文件和其他内容的 Debian Live CD。以下是我所做的:

$ mkdir debianlive
$ cd debianlive
$ lb config
[output omitted]
# lb build
[output omitted]
$ ls -AF
auto/    cache/   config/  binary-hybrid.iso  binary.packages
binary/  chroot/  .stage/  binary.list

但是,比如说,我在 config/chroot_local-includes/ 中添加了一些内容,我想重建 iso。所以我# lb build再次运行,这次它跳过了更新binary-hybrid.iso。具体来说,它输出

 [...]
 P: Begin building binary iso image...
 W: skipping binary_iso
 [...]

那么,是否有任何快速简便的方法让 live-build 重建 iso?我是否遗漏了一些显而易见的东西?

我尝试过的事情:

  • 删除它binary-hybrid.iso并希望 live-build 重新创建它。不是工作。
  • 删除.stage目录。这作品,但这并不是最佳选择,因为# lb build的配置阶段必须重新提取并重新安装每个包。
  • 使用 Sid 的 live-build 版本 3.0~a45-1。工作原理与 2.0.12-2 大致相同。不是解决我的问题。
  • 运行$ sudo lb binary iso,因为手册页声称这是构建 iso 的具体步骤。不是工作。

答案1

确保设置了BINARY_IMAGES=iso-hybrid。默认情况下(至少在 Ubuntu 中)lb不会生成 ISO,只有 squashfs 和引导加载程序。

答案2

我遇到了同样的问题。然后我想起我应该使用lb带有--binary选项的 clean。我将 auto 目录重命名为 _auto,以暂时避开其中的脚本。否则它会运行默认的 lb clean,从而删除整个 chroot 目录。

然后我以 root 身份运行以下命令:

chroot ./chroot
apt-get install packages_that_i_want_to_add
exit
lb clean --binary (this removes the previous iso or img image but keeps chroot dir)
lb build ( first rename your _auto directory to auto, if you have any.)

此外,如果您在期间无法访问互联网chroot apt-get,请将您的 替换/etc/resolv.conf为主 Linux 中的 。

相关内容