Step by step guide to Kickstart Centos 7.2 procedure
Steps
Part I
1. Download CEntos 7.2 from centos.org and also netinstaller.
2. Upload it to your existing server and load it to /opt/OS_Image
3. Copy your existing anaconda-ks.cfg file from root home directory to your webserver. Veryfy it is available through http
[root@sam ks]# ksvalidator ks.cfg
The following problem occurred on line 63 of the kickstart file:
Unknown kickstart section: %addon
open your browser and type your address and verify you can see the ks file.
4. Share your os location through nfs and make it available to your network.
[root@sam ks]# cat /etc/exports
/opt/RHEL7.2 *(rw)
5. Edit/change some values of kickstart files.
Part II
1. Create a VM of 2GB ram, 2 core and 25 GB of space.
2. Boot your newly created system with netinstaller
3. On the selection menu, press a TAB key and at the cursor location, press space and specify your kickstart config location
ks=http://192.168.10.8/ks/ks.cfg
4. Now, system will starts the installation process if your kickstart file parameters are good.
[root@sam ks]# cat ks.cfg
#version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
# cdrom
# url --url="http://192.168.10.8/RHEL7.2/"
nfs --server=192.168.10.8 --dir=/opt/RHEL7.2
# Use graphical install
# graphical
text
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
network --bootproto=static --device=enp0s25 --gateway=192.168.10.1 --ip=192.168.10.118 --nameserver=192.168.10.110 --netmask=255.255.255.0 --onboot=off --ipv6=auto
network --hostname=newhost.expanor.local
# Root password
rootpw --iscrypted $6$MYo6p9eCWTfUOsp0$l6kvfwtmNtZpXbSFXjp51Wbdehv2zRZu2l09nWjAJBpvwwdnd/tT/FxVELBO5eI2q2IiQq0m2vJHti2K6pz6o/
# System timezone
timezone America/New_York --isUtc
user --name=kamal --password=$6$cJGpK58UEVOdcRhj$z/Q24bHNiUm./x/drAhR8q49nZk12Nc/kSmtKbpwBq3ZrQvuYgEbtKqT3AO4/GlaX40uUbnbcb4GkYdh7kBQa0 --iscrypted --gecos="kamal"
# X Window System configuration information
xconfig --startxonboot
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
# Partition clearing information
clearpart --none --initlabel
# Disk partitioning information
part pv.316 --fstype="lvmpv" --ondisk=sda --size=19980
part /boot --fstype="xfs" --ondisk=sda --size=500
#part pv.12 --fstype="lvmpv" --noformat --onpart=sda2
#volgroup centos --noformat --useexisting pv.12
volgroup centos00 --pesize=4096 pv.316
#logvol swap --fstype="swap" --noformat --useexisting --name=swap --vgname=centos
logvol swap --fstype="swap" --size=4064 --name=swap01 --vgname=centos00
logvol / --fstype="xfs" --size=12480 --name=root --vgname=centos00
%packages
@base
@core
@desktop-debugging
@dial-up
@dns-server
@fonts
@gnome-desktop
@guest-agents
@guest-desktop-agents
@input-methods
@internet-browser
@multimedia
@print-client
@x11
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
[root@sam ks]#
Issues encountered during installation.
1. Had to change installation location
from cdrom to nfs
2. got error "Members may not be specified for preexisting volgroup" and real quick googled showed that there is an issue with partition table. Modified the partition section from my original anaconda-ks file which you can see of ks file that I commented out.
After that, it was pretty smooth installation.
If you want to see what is going on, press CTRL+ALT + F[123456] keys.
happy kickstarting ... !!!!
Steps
Part I
1. Download CEntos 7.2 from centos.org and also netinstaller.
2. Upload it to your existing server and load it to /opt/OS_Image
3. Copy your existing anaconda-ks.cfg file from root home directory to your webserver. Veryfy it is available through http
[root@sam ks]# ksvalidator ks.cfg
The following problem occurred on line 63 of the kickstart file:
Unknown kickstart section: %addon
open your browser and type your address and verify you can see the ks file.
4. Share your os location through nfs and make it available to your network.
[root@sam ks]# cat /etc/exports
/opt/RHEL7.2 *(rw)
Part II
1. Create a VM of 2GB ram, 2 core and 25 GB of space.
2. Boot your newly created system with netinstaller
3. On the selection menu, press a TAB key and at the cursor location, press space and specify your kickstart config location
ks=http://192.168.10.8/ks/ks.cfg
4. Now, system will starts the installation process if your kickstart file parameters are good.
[root@sam ks]# cat ks.cfg
#version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
# cdrom
# url --url="http://192.168.10.8/RHEL7.2/"
nfs --server=192.168.10.8 --dir=/opt/RHEL7.2
# Use graphical install
# graphical
text
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
network --bootproto=static --device=enp0s25 --gateway=192.168.10.1 --ip=192.168.10.118 --nameserver=192.168.10.110 --netmask=255.255.255.0 --onboot=off --ipv6=auto
network --hostname=newhost.expanor.local
# Root password
rootpw --iscrypted $6$MYo6p9eCWTfUOsp0$l6kvfwtmNtZpXbSFXjp51Wbdehv2zRZu2l09nWjAJBpvwwdnd/tT/FxVELBO5eI2q2IiQq0m2vJHti2K6pz6o/
# System timezone
timezone America/New_York --isUtc
user --name=kamal --password=$6$cJGpK58UEVOdcRhj$z/Q24bHNiUm./x/drAhR8q49nZk12Nc/kSmtKbpwBq3ZrQvuYgEbtKqT3AO4/GlaX40uUbnbcb4GkYdh7kBQa0 --iscrypted --gecos="kamal"
# X Window System configuration information
xconfig --startxonboot
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
# Partition clearing information
clearpart --none --initlabel
# Disk partitioning information
part pv.316 --fstype="lvmpv" --ondisk=sda --size=19980
part /boot --fstype="xfs" --ondisk=sda --size=500
#part pv.12 --fstype="lvmpv" --noformat --onpart=sda2
#volgroup centos --noformat --useexisting pv.12
volgroup centos00 --pesize=4096 pv.316
#logvol swap --fstype="swap" --noformat --useexisting --name=swap --vgname=centos
logvol swap --fstype="swap" --size=4064 --name=swap01 --vgname=centos00
logvol / --fstype="xfs" --size=12480 --name=root --vgname=centos00
%packages
@base
@core
@desktop-debugging
@dial-up
@dns-server
@fonts
@gnome-desktop
@guest-agents
@guest-desktop-agents
@input-methods
@internet-browser
@multimedia
@print-client
@x11
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
[root@sam ks]#
Issues encountered during installation.
1. Had to change installation location
from cdrom to nfs
2. got error "Members may not be specified for preexisting volgroup" and real quick googled showed that there is an issue with partition table. Modified the partition section from my original anaconda-ks file which you can see of ks file that I commented out.
After that, it was pretty smooth installation.
If you want to see what is going on, press CTRL+ALT + F[123456] keys.
happy kickstarting ... !!!!
No comments:
Post a Comment