I want to install Redhat 5.6 on my system. I don't want to use the actual DVD but I want to install it using the ISO image stored on one of our server's hard disks.
How can I do that?
I want to install Redhat 5.6 on my system. I don't want to use the actual DVD but I want to install it using the ISO image stored on one of our server's hard disks.
How can I do that?
Here is the full procedure to setup your PXE server in RHEL 6 and it is working great for me. Also please refer to Red Hat official document before you start.
My simpler kickstart method using FTP server instead of HTTP service for installing RHEL 6:
PART 1 : Make ks.cfg file for kickstart configuration
# yum install system-config-kickstart
Run the kickstart utility as root:
# system-config-kickstart
Open file anconda-ks.cfg from /root and edit in that.
My Final file looks like this after editing:
# vim /root/anconda-ks.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use network installation
url --url="ftp://192.168.3.222/pub/el6x64/"
repo --name="Red Hat Enterprise Linux" --baseurl=ftp://192.168.3.222/pub/el6x64/ --cost=100
# Root password
rootpw --plaintext XXXXXX
# Network information
#network --bootproto=dhcp --device=eth0 --onboot=on
# System authorization information
auth --passalgo=sha512
# Use text mode install
#text
# Run the Setup Agent on first boot
firstboot --enable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Installation logging level
logging --level=info
# Reboot after installation
reboot
# System timezone
timezone Asia/Kolkata
# System bootloader configuration
bootloader --append="crashkernel=auto rhgb quiet" --location=mbr --driveorder="sda"
# Partition clearing information
clearpart --none
%packages
@additional-devel
@base
@basic-desktop
@MORE IMPORTANT PACKAGES
....
....
ImageMagick
abrt-gui
ant
certmonger
desktop-file-utils
fence-virtd-libvirt
fence-virtd-multicast
fence-virtd-serial
MORE IMPORTANT PACKAGES
....
....
%end
This is basic file, you can modify above file with respect to your own needs, many examples are also available over internet:
PART 2: Install and configure tftp, dhcp, vsftpd
# yum install –y syslinux xinetd tftp-server dhcp vsftpd
a) FTP Server:
# service vsftpd start
# chkconfig vsftpd on
b) DHCP Server:
# vi /etc/dhcp/dhcpd.conf
________________________________________________________________________________
# Global Options
Allow booting;
Allow bootp;
authoritative;
# Subnet definition
subnet 192.168.3.0 netmask 255.255.255.0 {
# Parameters for the local subnet
option routers 192.168.3.222;
option subnet-mask 255.255.255.0;
option domain-name "cms.wesee.org";
option domain-name-servers 192.168.3.222;
default-lease-time 21600;
max-lease-time 43200;
# Client IP range
range dynamic-bootp 192.168.3.15 192.168.3.95;
filename "pxelinux.0";
next-server 192.168.3.222;
}
# service dhcpd restart
# chkconfig dhcpd on
c) TFTP server:
# service xinetd start
# chkconfig xinetd on
# vi /etc/xinetd.d/tftp
disable = no
# service xinetd restart
PART 3 : Copy necessary files to respective locations and modify them accordingly:
# cp /root/anaconda-ks.cfg /var/ftp/pub/el6x64/ks.cfg
# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
# mkdir /var/lib/tftpboot/rhel6
insert rhel dvd in dvd drive to copy data to respective locations:
# cp -ivr /media/<mount dir>/* /var/ftp/pub/el6x64/
# cp /var/ftp/pub/el6x64/images/pxeboot/vmlinuz /var/lib/tftpboot/rhel6
# cp /var/ftp/pub/el6x64/images/pxeboot/initrd.img /var/lib/tftpboot/rhel6
# cp /usr/share/syslinux/menu.c32 /var/lib/tftpboot/
# mkdir /var/lib/tftpboot/pxelinux.cfg
# vi /var/lib/tftpboot/pxelinux.cfg/default
_____________________________________________________________________________________________
timeout 100
default menu.c32
menu title $$$$$$Boot Menu$$$$$$
label 1
menu label ^ 1) RHEL6
kernel rhel6/vmlinuz
append initrd=rhel6/initrd.img ks=ftp://192.168.3.222/pub/el6x64/ks.cfg ksdevice=eth0
________________________________________________________________________________
Now your server is ready.
You need PXE installation for it.
This is not possible in general: you will need to boot the installer, so you will need to load a bootloader. Either from CD/DVD or using PXE.
That said, most server hardware supports IPMI or related technology (such as HP iLO4), that will make the IPMI card mount the iso image as a virtual DVD drive even before booting, which would make this possible.