LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   spacewalk server without the use of dhcp (https://www.linuxquestions.org/questions/linux-newbie-8/spacewalk-server-without-the-use-of-dhcp-4175462778/)

zulkifal 05-20-2013 07:55 PM

spacewalk server without the use of dhcp
 
Hi Experts ! I have been reading about some articles where the writers have used "dnsmasq" instead of dhcp with cobbler as a provisioning server to PXE boot systems.I already have a spacewalk server which comes with a cobbler, xinetd, tftp etc services therefore I dont need to configure a cobbler again but the issue is that I dont have a dhcp , so If I use a dnsmasq , is it possible to configure the cobbler seperately as these writers have done so? or Is there any other way to configure it , if it comes embedded in my spacewalk server ? By the way i dont want to use " Build ISO " method explained in cobbler docs.A little confused here. Your help will highly be appreciated.
Thank you

gdizzle 05-21-2013 06:43 PM

Hi I read this, and was kind of confused so let me know if I am lead a stray. I too use spacewalk in our environment and, however I have no real knowledge on dnsmasq as I use just the standard dhcp with tftp.

From here: http://www.thekelleys.org.uk/dnsmasq/doc.html

Dnsmasq supports static and dynamic DHCP leases and BOOTP/TFTP/PXE for network booting of diskless machines

Here are 2 links I found on dnsmasq as a pxeboot:

http://blogging.dragon.org.uk/index....p-a-pxe-server
http://danielboca.blogspot.com.au/20...g-pxe-and.html

Maybe someone can commnent who has set this up or has experience with dnsmasq.

You claim you don't have dhcp? Is there any reason you have not just installed it?
Code:

yum install dhcp

zulkifal 05-22-2013 07:52 AM

Thanks gdizzle , Actually there is a dhcp in the network but I dont have any control over it to to change its settings. I am open to any suggestions that uses spacewalk server for provisioning new baremetal systems but are not able to use the dhcp to PXE Boot their systems.I saw a couple of threads where they use a bootable cd/dvd to boot their systems but I still am not sure how they point it to spacewalk to pick up the image and kickstart scripts.

gdizzle 05-22-2013 05:31 PM

Ok so you don't control the dhcp server, that fine however you need to find out the range of IP's you can use or IP address you can use. Ask the admin.

For example, if you are told that you can use the address 172.19.11.158.

As you can see below I have limited the range to only give out that single IP therefore because it's not in use I will not break the network.

Also I have designated the IP to go to the host you see below.

Then do a
Code:

yum install dhcp
Code:

vim /etc/dhcp/dhcpd.conf

subnet 172.19.11.0 netmask 255.255.255.0 {
  range 172.19.11.158 172.19.11.158;
  option routers 172.19.11.88;
  next-server 172.19.11.88;
  filename    "/pxelinux.0";
  default-lease-time 600;
  max-lease-time 7200;


Code:

host testspace01 {
  hardware ethernet 00:59:56:92:1f:68;
  fixed-address 172.19.11.158;
}

I have not seen any Kickstart CD's/DVD situations that call the spacewalk server.

zulkifal 05-22-2013 09:31 PM

Thanks again, So it means that I will have another dhcp server but its setting will be restricted to the block of ip's intended for my cluster. Thats pretty understandable.My google search found a thread which has the following info which I want to share with you and other members.This was taken from RHEL Documentation.

6.4.9.1.3. Building Bootable Kickstart ISOs

While you can schedule a registered system to be kickstarted to a new operating system and package profile, it is also useful to be able to kickstart a system that is not registered with RHN, or does not yet have an operating system installed. One common method of doing this is to create a bootable CD-ROM that is inserted into the target system. When the system is rebooted, it boots from the CD-ROM, loads the kickstart configuration from the RHN Servers or your Satellite, and proceeds to install Red Hat Enterprise Linux according to the kickstart profile you have created.

To do this, copy the contents of /isolinux from the first CD-ROM of the target distribution. Then edit the isolinux.cfg file to default to 'ks'. Change the 'ks' section to the following template:

label ks
kernel vmlinuz
append text ks={url} initrd=initrd.img lang= devfs=nomount ramdisk_size=16438 \
{ksdevice}

IP addressed-based kickstart URLs will look something like this:

http://my.sat.server/kickstart/ks/mode/ip_range

The kickstart distribution selected by the IP range should match the distribution from which you are building, or errors will occur. {ksdevice} is optional, but looks like:

ksdevice=eth0

It is possible to change the distribution for a kickstart profile within a family, such as Red Hat Enterprise Linux AS 4 to Red Hat Enterprise Linux ES 4, by specifying the new distribution label. Note that you cannot move between versions (2.1 to 3) or between updates (U1 to U2).

Next, you may customize isolinux.cfg further for your needs, such as by adding multiple kickstart options, different boot messages, shorter timeout periods, etc.

Next, create the ISO as described in the Making an Installation Boot CD-ROM section of the Red Hat Enterprise Linux 3 Installation Guide. Alternatively, issue the command:

mkisofs -o file.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 \
-boot-info-table -R -J -v -T isolinux/

Note that isolinux/ is the relative path to the directory containing the isolinux files from the distribution CD, while file.iso is the output ISO file, which is placed into the current directory.

You may then burn the ISO to CD-ROM. To use the disc (assuming you left the label for the kickstart boot as 'ks'), boot the system and type "ks" at the prompt. When you press Enter, the kickstart should begin.


All times are GMT -5. The time now is 06:46 PM.