Infastructure to netboot ngw100 (linuxgw for pxe, tftp, nfs)

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

I'm thinking about upgrading my network/infrastructure so that I can use netboot for my ngw100 (and other computers) with netboot/pxe/tftp/nfs etc etc

Anyhow, I'm thinking about using a old pc with 2 network cards and run some "linux based firewall/gw distribution" on it.
And put this firewall/gw between my workplace and the rest of the world. And then put som dhcp, tftp and nfs on it.
The goal is to have a short turn around time when doing some fun work on the ngw100.

So I looked at http://www.smoothwall.org/ but it turns out that the free version don't have any tftp!

Do you have any other good tips on what to run on this firewall/gw?

Note: I know that I can probably take a debian and create one my self, but I would rather spend my time hacking some code for the ngw :roll: I'm really looking for something easy and stable, that does only this.

Thanks
Johan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I changed track since my home network was isolated enough,
but I don't seem to get the big picture...

And to clear my mind I started to write a tutorial:
* https://www.avrfreaks.net/wiki/index.php/Documentation:Tutorials_Infastructure_for_NetBoot_NGW100

And my problems right now is the dhcp server don't seem to tell the NGW what address to find the tftp server at.

So the step after what I have written in the wiki is that I added a "next-server" line in dhcpd.conf.

host ngw100 {
        hardware ethernet 00:04:25:1C:88:C4;
        fixed-address 192.168.0.41;

        next-server 192.168.0.4; 
        filename "test.img";
}

(At this point I don't have a valid test.img,
but I figure that I would get a file not found error at that point.)

And the in Uboot I select the "bootp" command,
since it seems to be right???

bootp	- boot image via network using BootP/TFTP protocol

And I get something like this:

Uboot> bootp

macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0x45e1)
BOOTP broadcast 1
DHCP client bound to address 192.168.0.41
Using macb0 device
TFTP from server 192.168.0.106; our IP address is 192.168.0.41
Filename 'test.img'.
Load address: 0x10200000
Loading: T T 
Abort
Uboot> 

I can clearly see that it knows about test.img,
but what is bugging me write now is the line that tells me TFTP from server 192.168.0.106.
My tftp server is 192.168.0.4...

And after looking at 192.168.0.106 for some time,
since no computer have that ip-adress.
The dhcp server have shared addresses up to 105,
so 106 is the next free address.

How strange.

/Johan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Type printenv and check that no variables like tftpip, serverip, etc. are set.

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hce wrote:
Type printenv and check that no variables like tftpip, serverip, etc. are set.

Jackpot, found this:

Uboot> printenv
...
serverip=192.168.0.106
tftpip=192.168.0.106
...

How did those get in there?

Thanks
Johan

-----
Update:
I removed them with

Uboot> setenv serverip=
Uboot> setenv tftpip=

And then I got this

TFTP from server 192.168.0.4; our IP address is 192.168.0.41

And that is ok.

However after a powerdown, and then right into uboot again they are back... :shock:

Where do they come from?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Perhaps try typing

Uboot> saveenv

at the Uboot prompt. The environment variables will be saved into flash.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And to erase the variables, type set , i.e. skip the =.

The variables are there from fab, when they got programmed.

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hce wrote:
And to erase the variables, type set , i.e. skip the =.

The variables are there from fab, when they got programmed.

Thanks, set and saveenv fixed my problem :D

And if I got this correctly,
I could also reflash uboot itself with new default values.
(even if that would have been harder)?

BR
Johan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
And if I got this correctly,
I could also reflash uboot itself with new default values.
(even if that would have been harder)?

Yes, but you should also have erased the environment part of the flash, i.e. the last flash block in the flash. This is where U-Boot stores the variables.

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hce wrote:
Quote:
And if I got this correctly,
I could also reflash uboot itself with new default values.
(even if that would have been harder)?

Yes, but you should also have erased the environment part of the flash, i.e. the last flash block in the flash. This is where U-Boot stores the variables.

Thanks good to know.