LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-17-2016, 10:35 AM   #1
mrigendra
LQ Newbie
 
Registered: Dec 2014
Posts: 22

Rep: Reputation: Disabled
How to use tftp when the host do not have IP address


I am trying to use tftp for update images on my BBB. For that I read tftp tutorials http://processors.wiki.ti.com/index....l_using_U-Boot

It says that I have to connect one ethernet cable from host pc to BBB, and then use

/sbin/ifconfig

to get the IP of the host. But I have only one ethernet port on PC that is connected to internet via LAN. If I remove internet connection and connect other end of cable to BBB I see this

eth0 Link encap:Ethernet HWaddr b8:97:5a:bf:d7:79
inet6 addr: fe80::ba97:5aff:febf:d779/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5637926 errors:0 dropped:0 overruns:0 frame:0
TX packets:3011756 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8323844259 (8.3 GB) TX bytes:205728188 (205.7 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:27842 errors:0 dropped:0 overruns:0 frame:0
TX packets:27842 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2756628 (2.7 MB) TX bytes:2756628 (2.7 MB)

So there is no IP address shown. How then I can get server IP?
 
Old 07-17-2016, 11:44 AM   #2
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 509

Rep: Reputation: 203Reputation: 203Reputation: 203
Hi there,

You have two options here as far as I can see, namely:

1. If you have a free Ethernet port on your LAN switch/router, you can connect the BBB to that instead of connecting it directly to your server. Presumably there is already a DHCP server on the LAN too, which also means you don't need to configure an IP in U-Boot manually.

2. If you do want to use a direct connection like you mentioned above, you will need to assign an IP address to your Ethernet adapter manually. Something like this should do the trick:

Code:
sudo ip address add 192.168.42.1/24 dev eth0
Good luck!
 
Old 07-17-2016, 12:29 PM   #3
mrigendra
LQ Newbie
 
Registered: Dec 2014
Posts: 22

Original Poster
Rep: Reputation: Disabled
I took the second option. Kept a uImage in /tftpboot folder and in uBoot Did this
>setenv autoload no
>setenv ipaddr 192.168.1.4
>setenv serverip 192.168.42.1
>setenv bootfile uImage
>tftp

it showed T T T T T T T T for some time and then said timeout.
 
Old 07-18-2016, 08:38 AM   #4
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 509

Rep: Reputation: 203Reputation: 203Reputation: 203
Hi,

The client and server don't seem to be in the same subnet, so they can't talk to each other without a router. Try changing the server's IP from 192.168.42.1 to 192.168.1.1 (in both the "sudo ip .." command and in "setenv serverip".
 
Old 07-18-2016, 10:30 AM   #5
mrigendra
LQ Newbie
 
Registered: Dec 2014
Posts: 22

Original Poster
Rep: Reputation: Disabled
I will write what ever I am doing.
I have kept uImage in /tftpboot directory, one gtkterm window where I am stopping uboot. I have a terminal on host opened where I am setting this command
sudo ip address add 192.168.1.1/24 dev eth0

Then boot the BBB, stop uboot
>setenv autoload no
>setenv ipaddr 192.168.1.4
>setenv serverip 192.168.1.1
>setenv bootfile uImage
>tftp

do I have to first send uImage from host, or I can just run tftp on uboot and it will fetch the uImage from uImage?


Now one thing I observed is that the network connection on my host is constantly getting diconnected. If it is not connected that means BBB is not connected to PC via ethernet?

http://imgur.com/d0ZFZxE
shared my desktop screenshot.
 
Old 07-24-2016, 10:06 AM   #6
mrigendra
LQ Newbie
 
Registered: Dec 2014
Posts: 22

Original Poster
Rep: Reputation: Disabled
I tried the first method and it works.
Thanks.
 
  


Reply

Tags
beaglebone, boot, ethernet, tftp



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Address maps to host, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT! NotionCommotion Linux - Newbie 3 03-08-2016 01:42 AM
[SOLVED] slackware pxe/tftp server to host windows/iso installation slugman Slackware 4 12-04-2012 06:35 PM
Convert guest logical address to host physical address hmd429 Linux - Virtualization and Cloud 1 10-07-2011 03:44 AM
Convert guest logical address to host physical address hmd429 Linux - Kernel 0 10-07-2011 02:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration