β

使用 kickstart include 指令遇到的问题

nosa.me 256 阅读

先说一下 ksverdiff 这个命令可用来确认 kickstart 大版本之间的差异,比如看 Centos7 和 Centos6 的差异用:

ksverdiff -f RHEL6 -t RHEL7

还有一个命令 ksvalidator 用来确认 ks 语法是否有问题。

这两个命令都是来自 pykickstart 包,安装:

yum -y install pykickstart

我遇到的第一个问题

在安装 Centos 7 的时候,在 ks 文件中通过 include 文本的方式来包含下面 url 配置的时候,会报错,报错如下面 截图。

# Use Net Install installation 

url –url http://pxe.hy01.wandoujia.com/iso/centos_7.0_x64

报错原因 可能和 「执行顺序」 有关,具体待查。

1

直接把 url 那行配置写在 ks 文件里,貌似可以正常装机,只是报下面的错。

222

第二个问题

Centos6 和 Centos7 貌似不太一样,我把 url 这行配置写在 ks 文件中,然后下面的 keyboard 和 lang  通过 include 引入。

# System keyboard
keyboard us

# System language
lang en_US.UTF-8

然后就报了下面的错,说明 Centos6 的 keyboard 和 lang 还是应该直接写在 ks 文件里。

3333

RHEL7 的 kickstart 语法参考链接:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html#sect-kickstart-commands

下面写一下 kickstart 主要版本之间的差异,方便查看。

RHEL6 和 RHEL7 的语法差别。

# ksverdiff -f RHEL6 -t RHEL7

The following commands were removed in RHEL7:

monitor interactive

The following commands were deprecated in RHEL7:

upgrade

The following commands were added in RHEL7:

btrfs realm eula liveimg

The following options were added to the logvol command in RHEL7:

–metadatasize –thin –thinpool –chunksize –label –resize –poolname

The following options were removed from the logvol command in RHEL7:

–bytes-per-inode

The following options were added to the firewall command in RHEL7:

–remove-service

The following options were removed from the firewall command in RHEL7:

–telnet

The following options were added to the clearpart command in RHEL7:

–list

The following options were added to the keyboard command in RHEL7:

–vckeymap –switch –xlayouts

The following options were added to the timezone command in RHEL7:

–nontp –ntpservers

The following options were added to the network command in RHEL7:

–ipv6gateway –teamslaves –teamconfig –interfacename –wpakey

The following options were added to the autopart command in RHEL7:

–type –nolvm

The following options were added to the raid command in RHEL7:

–label

The following options were removed from the raid command in RHEL7:

–bytes-per-inode

The following options were added to the method command in RHEL7:

–mirrorlist

The following options were added to the part command in RHEL7:

–resize

The following options were removed from the part command in RHEL7:

–end –start –bytes-per-inode

The following options were added to the user command in RHEL7:

–gid

The following options were added to the bootloader command in RHEL7:

–boot-drive –extlinux –leavebootorder

The following options were removed from the bootloader command in RHEL7:

–lba32

The following options were added to the lang command in RHEL7:

–addsupport

The following options were removed from the zfcp command in RHEL7:

–scsilun –scsiid

The following options were removed from the xconfig command in RHEL7:

–driver –resolution –depth –videoram

The following options were added to the url command in RHEL7:

–mirrorlist

The following options were added to the partition command in RHEL7:

–resize

The following options were removed from the partition command in RHEL7:

–end –start –bytes-per-inode

The following options were added to the volgroup command in RHEL7:

–reserved-percent –reserved-space

The following options were removed from the driverdisk command in RHEL7:

–type

The following options were added to the fcoe command in RHEL7:

–autovlan

———————————————我是美丽的分割线———————————————

RHEL5 和 RHEL6 的语法差别。

# ksverdiff -f RHEL5 -t RHEL6 

The following commands were removed in RHEL6:

langsupport mouse

The following commands were deprecated in RHEL6:

monitor

The following commands were added in RHEL6:

sshpw rescue updates group unsupported_hardware fcoe

The following options were added to the logvol command in RHEL6:

–hibernation –escrowcert –fsprofile –backuppassphrase –cipher

The following options were deprecated from the logvol command in RHEL6:

–bytes-per-inode

The following options were added to the firewall command in RHEL6:

–smtp –ssh –http –service –telnet

The following options were deprecated from the firewall command in RHEL6:

–telnet

The following options were removed from the firewall command in RHEL6:

–high –medium

The following options were added to the upgrade command in RHEL6:

–root-device

The following options were added to the autopart command in RHEL6:

–escrowcert –backuppassphrase –cipher

The following options were added to the ignoredisk command in RHEL6:

–interactive

The following options were added to the iscsi command in RHEL6:

–reverse-password –reverse-user –iface

The following options were added to the raid command in RHEL6:

–escrowcert –fsprofile –backuppassphrase –cipher

The following options were deprecated from the raid command in RHEL6:

–bytes-per-inode

The following options were added to the rootpw command in RHEL6:

–plaintext –lock

The following options were removed from the vnc command in RHEL6:

–connect

The following options were added to the repo command in RHEL6:

–cost –excludepkgs –noverifyssl –includepkgs –proxy –ignoregroups

The following options were added to the part command in RHEL6:

–cipher –hibernation –escrowcert –backuppassphrase –fsprofile

The following options were deprecated from the part command in RHEL6:

–end –start –bytes-per-inode

The following options were added to the user command in RHEL6:

–plaintext –gecos –lock

The following options were added to the bootloader command in RHEL6:

–disabled –default –timeout –iscrypted

The following options were deprecated from the bootloader command in RHEL6:

–lba32

The following options were removed from the bootloader command in RHEL6:

–hvargs

The following options were added to the network command in RHEL6:

–vlanid –ipv6 –nodefroute –ipv6gateway –bondopts –activate –bondslaves –domain

The following options were deprecated from the zfcp command in RHEL6:

–scsilun –scsiid

The following options were deprecated from the xconfig command in RHEL6:

–driver –resolution –depth –videoram

The following options were removed from the xconfig command in RHEL6:

–monitor –card –hsync –noprobe –vsync

The following options were added to the partition command in RHEL6:

–cipher –hibernation –escrowcert –backuppassphrase –fsprofile

The following options were deprecated from the partition command in RHEL6:

–end –start –bytes-per-inode

The following options were added to the volgroup command in RHEL6:

–reserved-percent –reserved-space

The following options were deprecated from the driverdisk command in RHEL6:

–type

The following options were added to the install command in RHEL6:

–root-device

作者:nosa.me
未来不会有sa
原文地址:使用 kickstart include 指令遇到的问题, 感谢原作者分享。

发表评论