How To Hiren Boot by Dnsmasq Server | Hiren Boot CD

Linuxtopic
0


hiren boot cd, hiren boot cd download, hiren boot usb, hiren boot cd 15.2, hiren boot 15.2, dnsmasq, dns, dhcp, pxe, pxe boot, pxe boot server,




Tags: hiren boot cd, hiren boot cd download, hiren boot usb, hiren boot cd 15.2, hiren boot 15.2, dnsmasq, dns, dhcp, pxe, pxe boot, pxe boot server, 





























Q. Configure Dnsmasq as a Pxe Boot Server " hiren boot " ?


Q. How to configure a dnsmasq server in linux centos 6 ?

Q. step by step dnsmasq server configuration in Linux centos 6 ?





IP  - 10.20.2.33



Hostname - khandwa.lokesh.com 



OS  - CentOS 6


Dnsmasq provides network infrastructure for small networks:. dnsmasq is a lightweight DNS, TFTP, PXE,and DHCP server. Its provide coupled DNS and DHCP service to a LAN. It is designed to be lightweight and It has also been widely used for tethering on Smartphone’s and portable hotspots,



domain-needed This tells dnsmasq to never pass short names to the upstream DNS servers. If the name is not in the local /etc/hosts file then “not found” will be returned.



bogus-priv All reverse IP (10.20.x.x) lookups that are not found in /etc/hosts will be returned as “no such domain” and not forwarded to the upstream servers.



no-resolv Do not read resolv.conf to find the servers where to lookup dns.



no-poll Do not poll resolv.conf for changes



server=8.8.8.8 Set one or more DNS servers to use when addresses are not local. These are open DNS servers.



local=/example.com/ Our local domain, queries in these domains are answered from /etc/hosts or the static-hosts files.



address=/doubleclick.net/127.0.0.1 Use this force an address for the specified domains. e.g to block adverts force doubleclck.net to localhost



no-hosts This options stops dnsmasq using the local /etc/hosts file as a source for lookups .



addn-hosts=/etc/dnsmasq.d/static/hosts.conf Force dnsmasq to use this file for lookups. It is in the same format as /etc/hosts.



expand_hosts So we can see our local hosts via our home domain without having to repeatedly specify the domain in our /etc/hosts file.



domain This is your local domain name. It will tell the DHCP server which host to give out IP addresses for.



dhcp-range This is the range of IPs that DHCP will serve: 10.20.2.50 to 10.20.2.150, with a lease time of 12 hours.



dhcp-host=client,10.20.2.10,36h Any machine saying they are hostname = ‘client’ gets this IP address



dhcp-option=option:router,10.20.2.1 When a host is requesting an IP address via DHCP also tell it the gateway to use.



dhcp-option=option:ntp-server,10.20.2.5 When a host is requesting an IP address via DHCP also tell it the NTP to use.


Install Dnsmasq server and


yum install dnsmasq*









yum install syslinux*









Configuration Dnsmasq server as a PXE Boot






Enable configuration directory " conf-dir=/etc/dnsmasq.d "


vi /etc/dnsmasq.conf








Create new pxe.conf file in configuration directory of dnsmasq


vi /etc/dnsmasq.d/pxe.conf


To Enable TFTP Server by adding this section





tftp-root=/khandwa/lokesh.com/pxeboot     

enable-tftp




here "/khandwa/lokesh.com/pxeboot" is path of tftp server you can define according to your configuration.




Dhcp Boot Option





dhcp-boot=pxelinux.0


dhcp-option=vendor:PXEClient,6,2b


dhcp-no-override


dhcp-range=10.20.2.20,proxy




Here i used "proxy" because i have already dhcp server in network if you don't have a dhcp server you can define range of ip by adding following line :  dhcp-range=10.20.2.50,10.20.2.150,12h





set pxe Boot Option





pxe-prompt="Press F8 for boot menu", 3


pxe-service=X86PC, "Boot from local hard disk", 0



pxe-service=X86PC, "Boot from network", pxelinux




Copy syslinux file in tftp server root directory

mkdir /khandwa/lokesh.com/pxebootcp /usr/share/syslinux/menu.c32 /khandwa/lokesh.com/pxebootcp /usr/share/syslinux/pxelinux.0 /khandwa/lokesh.com/pxebootcp /usr/share/syslinux/chain.c32 /khandwa/lokesh.com/pxebootcp /usr/share/syslinux/memdisk /khandwa/lokesh.com/pxebootcp /usr/share/syslinux/mboot.c32 /khandwa/lokesh.com/pxeboot




Create pxelinux.cfg directory




mkdir /khandwa/lokesh.com/pxeboot/pxelinux.cfg



Create "default" file for boot menu



vi /khandwa/lokesh.com/pxeboot/pxelinux.cfg/default






default menu.c32
prompt 0
timeout 300

ONTIMEOUT local




#Menu for Hiren Live Boot


LABEL Hiren # label name of iso
MENU LABEL Hirens BootCD # menu label name
KERNEL memdisk # kernel for ISO image called memdisk

APPEND iso initrd=hiren10.iso raw   
      # path of iso image, here iso image path /khandwa/lokesh.com/pxeboot/hiren10.iso








Restart Service




service dnsmasq restart









If you get error after Restart the Service :



dnsmasq: failed to create listening socket: Address already in use







check port of dns ( 53 ) & kill it


netstat -anlp | grep -w LISTEN

hiren boot cd, hiren boot cd download, hiren boot usb, hiren boot cd 15.2, hiren boot 15.2, dnsmasq, dns, dhcp, pxe, pxe boot, pxe boot server




Kill this process


kill -9 1792

Now Again restart service







Now go to the client maching and boot form network




Note : enable network boot setting in BIOS






Thanks

End of this topic ,  we need your support so i request you to please like and share  this post also comment if something missing by me  or  give me  a suggestion to make more easy/useful. 







www.linuxtopic.com






Post a Comment

0Comments

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Check Now
Ok, Go it!