在 anaconda-ks.cfg 文件中的哪里添加 %pre 脚本?
Where to add %pre script in anaconda-ks.cfg file?
指定 %pre 脚本时,它是否位于 kickstart 文件中的特定位置?我认为它应该在开头,以便稍后您可以使用 %include 标记来包含脚本文件创建的配置。
或者它可能在其他任何事情之前自动处理?
没关系。如果愿意,您可以将 %include 标记 放在 %pre 脚本之前。
根据 Red Hat 7 Installation Guide: 23.3.4. Pre-installation Script:
You can add commands to run on the system immediately after the Kickstart file has been parsed, but before the installation begins. This section must be placed towards the end of the Kickstart file, after the Kickstart commands described in Section 23.3.2, “Kickstart Commands and Options” ...
但是,我不确定为什么它说 "must be placed towards the end",因为我只是在我的 Kickstart 文件的最顶部放置了一个 %pre 脚本,没有任何问题。
另外值得注意的是:
The pre-installation script section of Kickstart cannot manage multiple install trees or source media. This information must be included for each created Kickstart file, as the pre-installation script occurs during the second stage of the installation process.
指定 %pre 脚本时,它是否位于 kickstart 文件中的特定位置?我认为它应该在开头,以便稍后您可以使用 %include 标记来包含脚本文件创建的配置。
或者它可能在其他任何事情之前自动处理?
没关系。如果愿意,您可以将 %include 标记 放在 %pre 脚本之前。
根据 Red Hat 7 Installation Guide: 23.3.4. Pre-installation Script:
You can add commands to run on the system immediately after the Kickstart file has been parsed, but before the installation begins. This section must be placed towards the end of the Kickstart file, after the Kickstart commands described in Section 23.3.2, “Kickstart Commands and Options” ...
但是,我不确定为什么它说 "must be placed towards the end",因为我只是在我的 Kickstart 文件的最顶部放置了一个 %pre 脚本,没有任何问题。
另外值得注意的是:
The pre-installation script section of Kickstart cannot manage multiple install trees or source media. This information must be included for each created Kickstart file, as the pre-installation script occurs during the second stage of the installation process.