Centos

將 kickstart 中可用的配置文件儲存到自定義 Centos ISO 的位置

  • December 17, 2019

語境

  • 700
  • 啟動

問題

根據 RH 文件:

--nochroot:

  Allows you to specify commands that you would like to run outside of the chroot environment.

  The following example copies the file /etc/resolv.conf to the file system that was just installed.

  %post --nochroot
  cp /etc/resolv.conf /mnt/sysimage/etc/resolv.conf
  %end

問題是:我應該將文件儲存resolv.conf在 ISO 樹的什麼位置以便 kickstart 訪問它?

您可以將文件放在任何地方。光碟的根目錄將安裝到/mnt/install/source. 因此,如果您在根目錄下創建了一個名為 的目錄myfiles,您可以/mnt/install/source/myfiles/resolv.conf在 Kickstart 中引用。

引用自:https://serverfault.com/questions/990643