Home > LiNuX (based on debian), network boot > Create network boot for concurrent RHEL6.5 installation

Create network boot for concurrent RHEL6.5 installation

Requirement

  1. Installed RHEL6.5
  2. RHEL6.5 x86_64 DVD installer
  3. Services : dhcp, NFS, tftp
  4. Familiar with vi text editor (or nano, etc)

Advantage

  1. Installation can be done concurrently without DVD
  2. Time and Money saving

Disadvantage

  1. Installation speed depend on network bandwidth and sum of concurrent installation
  2. Device Networking must be exist

Installation Steps

  1. Copy RHEL6.5 x86_64 DVD installer to local directory, eg: /home/dvd
  2. [root@server ~]# mkdir /home/RHEL6.5
    [root@server ~]# mount -o loop /dev/sr0 /mnt/cdrom
    [root@server ~]# cp -rp /mnt/cdrom/* /home/RHEL6.5/

    1_mkdir_mount_cp

  3. Install required packages
  4. Required package are dhcp dhcp-common xinetd syslinux tftp-server nfs-utils nfs-utils-lib

    [root@server ~]# yum install dhcp dhcp-common xinetd syslinux tftp-server nfs-utils nfs-utils-lib

    2_yum_install

  5. Configure and start DHCP service
  6. Edit DHCP configuration file /etc/dhcp/dhcpd.conf as below

    [root@server ~]# vi /etc/dhcp/dhcpd.conf
    # dhcpd.conf
    #
    # 150126 LQman: created for network booting purpose
    #
    allow bootp;
    allow booting;
    option domain-name "spectrum.net";
    option ip-forwarding false;
    option mask-supplier false;
    default-lease-time 86400;
    max-lease-time 604800;
    option time-offset -18000;
    authoritative;
    log-facility local7;
    subnet 10.122.1.0 netmask 255.255.255.0 {
    range 10.122.1.101 10.122.1.150;
    option broadcast-address 10.122.1.255;
    option routers 10.122.1.254;
    filename "pxelinux.0";
    next-server 10.122.1.1;

    interface eth0;
    }

    3_dhcp_config

    Start DHCP service and make sure it’s loaded on boot proces.

    [root@server ~]# service dhcpd start
    Starting dhcpd:                                            [  OK  ]
    [root@server ~]# chkconfig dhcpd on
    [root@server ~]# netstat -atupln | grep dhcpd
    udp    0  0 0.0.0.0:67        0.0.0.0:*             4207/dhcpd

    4_dhcp_start

    If dhcpd service failed to start please pay attention to log file /var/log/messages for troubleshooting purpose.

    5_dhcp_var_log_messages

  7. Configure and start NFS service
  8. Edit NFS configuration file /etc/exports as below

    [root@server ~]# vi /etc/exports
    /home 10.122.1.0/24(crossmnt,ro,async,root_squash,no_subtree_check,insecure)

    Start NFS service and make sure it’s loaded on boot proces.

    [root@server ~]# service nfs start
    Starting NFS services: [ OK ]
    Starting NFS mountd: rpc.mountd: svc_tli_create: could not open connection for udp6
    rpc.mountd: svc_tli_create: could not open connection for tcp6
    rpc.mountd: svc_tli_create: could not open connection for udp6
    rpc.mountd: svc_tli_create: could not open connection for tcp6
    rpc.mountd: svc_tli_create: could not open connection for udp6
    rpc.mountd: svc_tli_create: could not open connection for tcp6 [ OK ]
    Starting NFS daemon: rpc.nfsd: address family inet6 not supported by protocol TCP [ OK ]
    Starting RPC idmapd: [ OK ]
    [root@server ~]# chkconfig nfs on

    Don’t worry, it’s safe to ignore about ipv6 (tcp6/udp6) error message on nfs start

    7_start_nfs

  9. Configure and start TFTP service
  10. Edit TFTP configuration file /etc/xinetd.d/tftp as below

    [root@server ~]# vi /etc/xinetd.d/tftp
    # default: off
    # description: The tftp server serves files using the trivial file transfer \
    # protocol. The tftp protocol is often used to boot diskless \
    # workstations, download configuration files to network-aware printers, \
    # and to start the installation process for some operating systems.
    service tftp
    {
    socket_type = dgram
    protocol = udp
    wait = yes
    user = root
    server = /usr/sbin/in.tftpd
    server_args = -sv /var/lib/tftpboot
    disable = no

    per_source = 11
    cps = 100 2
    flags = IPv4
    }

    8_xinet_tftp_conf

    Copy required file(s) for network boot from /usr/share/syslinux

    [root@server ~]# cp -p /usr/share/syslinux/memdisk /var/lib/tftpboot/
    [root@server ~]# cp -p /usr/share/syslinux/menu.c32 /var/lib/tftpboot/
    [root@server ~]# cp -p /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
    [root@server ~]# ls /var/lib/tftpboot/
    memdisk menu.c32 pxelinux.0

    9_pxe_boot_file

    Copy RedHat Enterprise Linux 6.5 kernel & initrd image to TFTP root directory

    [root@server ~]# mkdir /var/lib/tftpboot/RHEL6.5
    [root@server ~]# cp -p /home/RHEL6.5/images/pxeboot/vmlinuz /var/lib/tftpboot/RHEL6.5/
    [root@server ~]# cp -p /home/RHEL6.5/images/pxeboot/initrd.img /var/lib/tftpboot/RHEL6.5/
    [root@server ~]# ls /var/lib/tftpboot/RHEL6.5/
    initrd.img vmlinuz

    10_RHEL_pxeboot

    Create TFTP boot default configuration

    [root@server ~]# mkdir /var/lib/tftpboot/pxelinux.cfg
    [root@server ~]# vi /var/lib/tftpboot/pxelinux.cfg/default
    default menu.c32
    prompt 0
    timeout 200
    menu title ##### PXE Boot Menu #####

    label RHEL6.5
    menu label Install RHEL6.5 via pxeboot & NFS sharing
    kernel RHEL6.5/vmlinuz
    append initrd=RHEL6.5/initrd.img ramdisk_size=9216 xdriver=vesa nomodeset repo=nfs:10.122.1.1:/home/RHEL6.5

    11_mkdir_pxe
    12_pxe_default

    Start TFTP (from xinetd) service and make sure it’s loaded on boot proces.

    [root@server ~]# service xinetd start
    Starting xinetd: [ OK ]
    [root@server ~]# chkconfig xinetd on

Testing

    Use another PC / laptop, make sure it has Network Card and plugged into Network Switch, then Power it ON

    14_boot_request_dhcp
    15_boot_menu
    16_language
    17_keyboard
    18_configure_tcpip
    19_install

    Images above are self explained

    From this point please follow on screen instruction

Reference

  1. http://www.tecmint.com/install-pxe-network-boot-server-in-centos-7/
  2. manual page of dhcp nfs xinet
  3. google.com

Thanks God, at least I update my blog 🙂

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: