static dhcp and pxeboot on 0.4.4

Support section for FREESCO v0.4.x

static dhcp and pxeboot on 0.4.4

Postby AntiC » Mon May 26, 2014 2:57 am

Hi,

I am using freesco 0.4.4 as static dhcp server. Its a virtual machine without hdd on my esx server.

Sometimes I want a client to do pxeboot from another server. So I edit "/mnt/bootdev/router/etc/dhcp.cfg" and reboot the freesco server.
After that my client can do a pxeboot and still get his static ip.

for example:
Code: Select all
host HW12345 {   
   fixed-address 10.12.11.5;   
   hardware ethernet 00:0f:fe:0e:f7:5e;   
   next-server 10.12.12.87;   
   filename "pxeboot.com";
}


Now my question is, how can I configure the freesco server to allow this pxeboot for all connecting clients?

regards AntiC
AntiC
Newbie
 
Posts: 9
Joined: Thu May 22, 2014 7:51 am

Re: static dhcp and pxeboot on 0.4.4

Postby Lightning » Mon May 26, 2014 2:31 pm

The simple solution is to install v0.4.5 which has this functionality built in when the PXE package is installed. It will automatically reconfigure it's self to allow PXE booting from the dynamic DHCP range. It also comes with INETD and a TFPD binary built into the base system.

If this is not an option let me know and v0.4.4 can be modified to do what you are asking.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: static dhcp and pxeboot on 0.4.4

Postby AntiC » Tue May 27, 2014 4:26 am

Hi,

if its possible I want to stay with my floppy based freesco installation, without hdd and without additional packages.

I dont have/want a dynamic dhcp range. Only computers with a static dhcp entry should be able to access my network and to get an ip-address.
I just need the pxeboot options as global parameters, so I dont have to add "next-server" and "filename" lines to each static dhcp entry.

regards AntiC
AntiC
Newbie
 
Posts: 9
Joined: Thu May 22, 2014 7:51 am

Re: static dhcp and pxeboot on 0.4.4

Postby Lightning » Tue May 27, 2014 11:32 am

I need to know for what version of FREESCO in order to tell you exactly how.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: static dhcp and pxeboot on 0.4.4

Postby AntiC » Wed May 28, 2014 12:28 am

Hi,

I want to know how to change my installation with version 0.4.4.

regards AntiC
AntiC
Newbie
 
Posts: 9
Joined: Thu May 22, 2014 7:51 am

Re: static dhcp and pxeboot on 0.4.4

Postby Lightning » Wed May 28, 2014 6:43 pm

I often speculate on a variety of things, but not on how to upgrade versions of FREESCO without knowing every detail. Such as we have been talking about 0.4.4 running on ESX and I think even from the floppy version. So tell me exactly how the system is currently installed and what forms of access you are going to be using and or have with the current system. Every customization that has been made to the current system will also help. In essence every detail of how the current system got installed and what changes you have made. Otherwise there is no way to answer your question.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: static dhcp and pxeboot on 0.4.4

Postby AntiC » Mon Jun 02, 2014 6:58 am

ok,

my freesco server is version 0.4.4, running on an esx 5.1 cluster. Its a floppy version with ramdisk, no hdd, 1 network card, 1 cpu core, 64mb ram.
for installationen I renamed freesco.044 to freesco.flp and the virtual machine is mounting this floppy from my san. In esx-options I only changed cpu virtualisation from "automatic" to "hardware (cpu)".

Active services I have ftp, ssh, http and static dhcp. Firewall is deactivated, see screenshot.
http://picload.org/image/lcwclia/dhcp_001.jpg

In my dhcp.cfg there are about 420 static dhcp entries.

If you need more informations pls let me know.

regards AntiC
AntiC
Newbie
 
Posts: 9
Joined: Thu May 22, 2014 7:51 am

Re: static dhcp and pxeboot on 0.4.4

Postby Lightning » Mon Jun 02, 2014 10:54 am

Ok, you have a very simple installation that should not be difficult to upgrade. I recommend copying the /etc/dhcp.cfg file to another machine and then make a "report" and copy the report.txt for reference. The take the freesco.045 floppy image and installing it in your ESX system. Once you go through the basic installation configuration using your old report.txt as a reference you can copy the dhcp.cfg file back to in in TWO locations. /etc/ and /boot/etc/ and restart the dhcp server with "rc_dhcpd restart" and the machine will will be operational.

At that point how you want it to PXE boot other system will need to be explained so I can hep reconfigure the system. However it will boot PXE systems if they are configured manually by default.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: static dhcp and pxeboot on 0.4.4

Postby AntiC » Tue Jun 03, 2014 2:44 am

Hi,

I did a new installation with the freesco.045 floppy image and I did all the settings using report.txt from my 0.4.4 installation.
But I cant copy my old dhcp.cfg to /boot/etc. There is only 12kb free space and my dhcp.cfg is almost 38kb.

In my 0.4.4 Installation there is like 60kb free space in /boot/etc without the dhcp.cfg file.

regards AntiC
AntiC
Newbie
 
Posts: 9
Joined: Thu May 22, 2014 7:51 am

Re: static dhcp and pxeboot on 0.4.4

Postby Lightning » Tue Jun 03, 2014 2:50 am

Unfortunately there is a lot less free space in 0.4.5, however I am wondering how big the dhcp.cfg file is if you gzip it?

Because there is a way to do it if it will fit compressed,

cat /etc/dhcp.cfg | gzip >/dhcp.gz
ls -l /dhcp.gz
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: static dhcp and pxeboot on 0.4.4

Postby AntiC » Tue Jun 03, 2014 3:06 am

Hi,

dhcp.gz is 6.8kb

regards AntiC
AntiC
Newbie
 
Posts: 9
Joined: Thu May 22, 2014 7:51 am

Re: static dhcp and pxeboot on 0.4.4

Postby Lightning » Tue Jun 03, 2014 10:46 am

In the $boot) section of the /rc/rc_user script add this line
edit /rc/rc_user
Code: Select all
$boot)
        zcat /etc/dhcp.gz >/etc/dhcp.cfg
        ;;


Then copy your existing dhcp.gz to the /boot/etc/ directory. The system will copy it to /etc/ at each boot and then the script will uncompress it so the rest of the system can use it.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: static dhcp and pxeboot on 0.4.4

Postby AntiC » Wed Jun 04, 2014 5:39 am

Hi,

update: the edited rc_user file now works and is copying my dhcp.cfg to /etc.

I have a problem with the webgui. If I click on list static dhcp clients it takes some minutes and then I get an empty page without any static dhcp entry.
Is there a limitation of how many static dhcp entries the webgui can show? With a 50% reduced dhcp.cfg (only 200 static dhcp entries) it works.

The dhcpd.conf looks good anyway. Maybe there is only some display problem with the webgui. I guess you cant add any more dhcp clients over the webgui, because with my compressed dhcp.cfg the added clients will not survive next reboot, right?

So what are the next steps to do?

Until now I edited an entry in my dhcp.cfg with the lines "next-server" and "filename", as you can see in my first post.
After reboot of my freesco-server the client was able to pxe-boot from my tftp-server (that is another virtual machine in my system).
But I want that parameters (next-server and filename) as global options for all static dhcp clients, so I dont have to edit dhcp.cfg anymore.


regards AntiC
AntiC
Newbie
 
Posts: 9
Joined: Thu May 22, 2014 7:51 am

Re: static dhcp and pxeboot on 0.4.4

Postby Lightning » Wed Jun 04, 2014 2:53 pm

What you are doing would be really easy if you had just a small amount more space. However I think that you still have enough to copy the /rc/rc_dhcpd to the /pkg/rc/ directory. Then make these changes.
cp /rc/rc_dhcpd /pkg/rc/
edit /pkg/rc/rc_dhcpd
Line #77 find this code
Code: Select all
        if [ -x /pkg/rc/rc_pxe ]
        then    cat >>$h <<-~
                allow bootp;
                filename "/usr/share/tftpboot/pxelinux.0";
                ~
        fi

# Change it to this
Code: Select all
   cat >>$h <<-~
                allow bootp;
                # Any extra Global parameter you want each on a separate line ending in ;
                ~
rc_dhcpd restart

With regards to having to manually make updates to the dhcp.cfg file because it is compressed, you are correct. However as this sort of thing might become an issue. I am considering making this type of compression a permanent addition to the system. I may work on doing it this weekend and I will let you know.

The control panel issue is most likely due to so many entries and I will look into what the problem could be.
If you are afraid that you might make a mistake. The chances are high that you will never learn anything.
User avatar
Lightning
FREESCO GOD !!
 
Posts: 12079
Joined: Wed Nov 14, 2001 6:50 am
Location: Oregon, USA

Re: static dhcp and pxeboot on 0.4.4

Postby AntiC » Thu Jun 05, 2014 7:45 am

Hi,

unfortunately there wasnt enough space to copy the file rc_dhcpd.

I tried it with a smaller dhcp.cfg and then its technically working.
With all that limitations, low disk space, cant add more clients per webgui, display bug in webgui the 0.4.5 version is not really useful as a productive system for me.

So I tried to copy the rc_dhcpd file on my old 0.4.4 dhcp server and changed following part:
Code: Select all
str(){   [ "$NDHCP" = $n ] && exit
   runchk dhcpd
   [ "$?" = 0 ] && return
   $E -n "$SR dhcpd...$HT"
   set -- `$E $LZTM | sed s/,/\ /g`
   cat >dhcpd.conf <<-EOF
      authoritative;
      server-name "$HOSTNAME.$DOMAIN";
      option domain-name "$DOMAIN";
      default-lease-time ${1:-345600};
      max-lease-time ${2:-345600};
      use-host-decl-names on;
      one-lease-per-client on;
      allow bootp;
      next-server 10.12.12.87;
      filename "pxeboot.com";
   
   EOF
   for i in 0 $ct


Looks like that is working too and all my static dhcp clients can now pxe-boot from my tftp-server.

regards AntiC
AntiC
Newbie
 
Posts: 9
Joined: Thu May 22, 2014 7:51 am


Return to FREESCO Support for v0.4.x

Who is online

Users browsing this forum: No registered users and 1 guest

cron