rhel7 kickstart 参考[备忘]

参考下面 ananconda.cfg  原生, 直接进行分区方法

#version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512

# Use CDROM installation media
cdrom
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sdc
# Keyboard layouts
keyboard --vckeymap=cn --xlayouts='cn'
# System language
lang zh_CN.UTF-8

# Network information
network  --bootproto=dhcp --device=em1 --onboot=off --ipv6=auto
network  --bootproto=dhcp --device=em2 --onboot=off --ipv6=auto
network  --hostname=localhost.localdomain
# Root password
rootpw --iscrypted $6$0ZzjObEc6uDUkEH8$sx9urpyhnzSzSL3S5ggSBgbiqxmB/vP3.xq8UFc95sMFqjTxpQFzBGYL8bHbiMCCULJ8E3dPKmDUz4WHHh9/P1
# System timezone
timezone Asia/Shanghai --isUtc
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sdc
# Partition clearing information
clearpart --all --initlabel --drives=sdc
# Disk partitioning information
part swap --fstype="swap" --ondisk=sdc --size=14080
part / --fstype="xfs" --ondisk=sdc --size=939288
part /boot --fstype="xfs" --ondisk=sdc --size=500

%packages
@core
kexec-tools

%end

%addon com_redhat_kdump --enable --reserve-mb='auto'

%end

参考使用 lvm 方法

#version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512

# Use CDROM installation media
cdrom
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=cn --xlayouts='cn'
# System language
lang zh_CN.UTF-8

# Network information
network  --bootproto=dhcp --device=em1 --onboot=off --ipv6=auto
network  --bootproto=dhcp --device=em2 --onboot=off --ipv6=auto
network  --bootproto=dhcp --device=p2p1 --onboot=off --ipv6=auto
network  --bootproto=dhcp --device=p2p2 --onboot=off --ipv6=auto
network  --hostname=localhost.localdomain
# Root password
rootpw --iscrypted $6$rcWbii9qAGO/qSXH$llQ1kLUvzNUBS8kIEKal1WOAqsaHON0SRKLfFtbMp.rOxbPjZUUY3fpRaT42VyFjEzqT44y21Qek4YWGgV7u51
# System timezone
timezone Asia/Shanghai --isUtc
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
# Partition clearing information
clearpart --all --initlabel --drives=sda
# Disk partitioning information
part pv.1173 --fstype="lvmpv" --ondisk=sda --size=5721410
part /boot/efi --fstype="efi" --ondisk=sda --size=200 --fsoptions="umask=0077,shortname=winnt"
part /boot --fstype="xfs" --ondisk=sda --size=500
volgroup centos --pesize=4096 pv.1173
logvol swap  --fstype="swap" --size=4096 --name=swap --vgname=centos
logvol /  --fstype="xfs" --size=5717312 --name=root --vgname=centos

%packages
@core
kexec-tools

%end

%addon com_redhat_kdump --enable --reserve-mb='auto'

%end


你可能感兴趣的:(RHEL)