Skip to main content

Installing linux over network using kickstart

What is required?
  • LAN infrastructure for network communication.
  • NFS, FTP or HTTP Service for data transfer.
  • DHCP service for ip distribution.
  • TFTP service for booting from network.
  • Linux OS kernel image.
  • Bootloader binary.
  • Linux installation tree should be accessible from nfs,http or ftp.


LAN infrastructure:
  • Client must have pxe supported NIC.
  • Network devices on the LAN have to carry bootp packages


HTTP service (we can use http service):
  • DocumentRoot /var/www/html (contains linux installation tree and repository)
  • ServerName <Server Name>
  • url might be like http://192.168.1.10/rhrepos/6.2-x86_64/


DHCP service:
ddns-update-style interim;
ignore client-updates;
authoritative;
allow booting;
allow bootp;
subnet    <ip subnet>    netmask    <ip netmask>
{
option routers       <router ip>;
option subnet-mask      <ip netmask>;
option domain-name      "<domain name>";
option domain-name-servers     <dns server ip>;
range dynamic-bootp <starting address for ip distribution block> <ending address for ip distribution block> ;
default-lease-time   21600;
max-lease-time   43200;
next-server   <tftp server ip>;
filename  "pxelinux.0";
}


TFTP Service (required files should be copied to /tftpboot directory):
  • menu.c32 (menu binary for displaying menu list)
  • initrd.img (bootloader image)
  • vmlinuz (Linux kernel image)
/tftpboot/pxelinux.cfg/default should look like:
Main Menu
DEFAULT menu.c32
MENU TITLE Red Hat Enterprise Linux Installation
TIMEOUT 200
ALLOWOPTIONS 0
NOESCAPE 1
PROMPT 0
LABEL RHEL-6.2-x86_64
      MENU   LABEL Redhat EL 6.2 64-bit
      kernel vmlinuz-RHEL6.2-x86_64
      append initrd=initrd-RHEL6.2-x86_64.img ks=http://192.168.1.10/rhrepos/6.2-x86_64/ks-RHEL-6.2-x86_64.cfg
MENU END

Kickstart Answer File (you can use kickstart configurator system-config-kickstart):
#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth  --useshadow  --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
# Use graphical install
graphical
# Skip installation key
key --skip
# Firewall configuration
firewall --disabled
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard trq
# System language
lang en_US
# Installation logging level
logging --level=info
# Use network installation
url --url=http://192.168.1.10/rhrepos/6.2-x86_64/
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# Reboot after installation
reboot
#Root password
rootpw --iscrypted sdfDßggasd'3$#>£.


# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# System timezone
timezone  Europe/Istanbul
# Install OS instead of upgrade
install
# Disk partitioning information
part /boot --fstype="ext3" --size=200
part swap --fstype="swap" --recommended
part /tmp --fstype="ext3" --size=2048
part / --fstype="ext3" --grow --size=1


%packages
@ X Window System
@ Desktop
nfs-utils
samba-client


%post
groupadd -g 1453 <normal user>
useradd -d /home/<normal user> -g <normal user> -u 1071 -s /bin/bash -p sdfDßggasd'3$#>£. <normal user>


pxe booting

kickstart menu

loading vmlinuz

configuring eth

retrieving install.img

formatting disks

installing redhat linux 6

Comments

Popular posts from this blog

Creating Multiple VLANs over Bonding Interfaces with Proper Routing on a Centos Linux Host

In this post, I am going to explain configuring multiple VLANs on a bond interface. First and foremost, I would like to describe the environment and give details of the infrastructure. The server has 4 Ethernet links to a layer 3 switch with names: enp3s0f0, enp3s0f1, enp4s0f0, enp4s0f1 There are two bond interfaces both configured as active-backup bond0, bond1 enp4s0f0 and enp4s0f1 interfaces are bonded as bond0. Bond0 is for making ssh connections and management only so corresponding switch ports are not configured in trunk mode. enp3s0f0 and enp3s0f1 interfaces are bonded as bond1. Bond1 is for data and corresponding switch ports are configured in trunk mode. Bond0 is the default gateway for the server and has IP address 10.1.10.11 Bond1 has three subinterfaces with VLAN 4, 36, 41. IP addresses are 10.1.3.11, 10.1.35.11, 10.1.40.11 respectively. Proper communication with other servers on the network we should use routing tables. There are three

3 Node (Master Slave Slave) Redis Cluster with Sentinel

It is possible to make your Redis cluster Fault Tolerant and Highly Available by building a replica set and then monitor these nodes using sentinel for automatic failover. I am going to give an example setup to explain it. The structure is built with three nodes running one as a master and two as slaves. Master Node: (Centos 7.2) 192.168.1.11 Slave1 Node: (Centos 7.2) 192.168.1.12 Slave2 Node: (Centos 7.2) 192.168.1.13 Edit System settings on each node: /etc/sysctl.conf Disable transparent hugepage (transparent_hugepage=never) on each node: /etc/default/grub Apply grub config and reboot each node: Master Node: /etc/redis/6379.conf Slave1 Node: /etc/redis/6379.conf Slave2 Node: /etc/redis/6379.conf Master Node: /etc/redis/sentinel.conf Slave1 Node: /etc/redis/sentinel.conf Slave2 Node: /etc/redis/sentinel.conf Each Node: /etc/systemd/system/multi-user.target.wants/redis-server.service Each Node: /etc/