为什么我的 Linux 在构建 .ISO 时报告允许的大小错误?

Nei*_*eil 13 linux iso-image

我玩过 Linux 自定义,当我想构建 .ISO 时,我收到此错误:

$ mkisofs -r -o rhel.iso -b isolinux/isolinux.bin -c isolinux/boot.cat ./
INFO: UTF-8 character encoding detected by locale settings.
Assuming UTF-8 encoded filenames on source filesystem,
use -input-charset to override.
Unknown file type (unallocated) ./.. - ignoring and continuing.
Using RELEA000.HTM;1 for /RELEASE-NOTES-pt_BR.html (RELEASE-NOTES-U1-pt_BR.html)

Size of boot image is 20 sectors -> mkisofs: Error - boot image './isolinux/isolinux.bin' has not an allowable size.
Run Code Online (Sandbox Code Playgroud)

我没有更改isolinux.bin... 为什么我会收到上述错误信息?

Boo*_*eus 23

您应该将这些参数添加到命令中:

-no-emul-boot -boot-load-size 4 -boot-info-table
Run Code Online (Sandbox Code Playgroud)

参数是:

  • no-emul-boot:指定用于创建“El Torito”可启动 CD 的启动映像是“无仿真”映像。系统将加载并执行此映像而不执行任何磁盘模拟

  • boot-load-size:指定要在非仿真模式下加载的“虚拟”(512 字节)扇区数。默认是加载整个引导文件。如果这不是 4 的倍数,某些 BIOS 可能会出现问题。

  • boot-info-table: 指定将在引导文件中的偏移量 8 处修补包含 CD-ROM 布局信息的 56 字节表。如果给出此选项,则源文件系统中的引导文件会被修改,因此如果无法轻松重新生成此文件,请确保进行复制!有关此表的说明,请参阅 EL TORITO 启动信息表部分。

有关更多信息,请参阅man mkisofs