LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-13-2009, 01:02 PM   #1
Rish.Ahm
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Rep: Reputation: 0
Communication over network during Kernel Bootup phase


Hello All,
I am facing a particular question regarding the Networking and TCP-IP modules in Linux system.

In my current study work, i am trying to fetch some data into my local PC from a remote PC while the Kernel is booting. The remote PC is fully functional but local PC is just booting into the kernel. During this time, TCP-IP protocol is not available as i guess it is the part of OS and not the linux Kernel code. So in order to achieve this, I need some kind of barebone network driver which can communicate over the network even when the TCP-IP is not initialized. Is it possible at the first place? Is anything like this available in existing linux kernel or some other open source development?

Please help me out. Thanks in advance.
 
Old 08-14-2009, 07:13 AM   #2
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555Reputation: 555
There are two (or more) methods of debugging early boot stage on a machine before the TCP-IP system is available:

In order of usefulness (to best of my knowledge):

1) Setting a serial port as the default (boot) console, and having the second machine listening on the serial line.

2) Using a USB<>USB debug cable. This is a special hardware device, costs about $80.00 CDN last time I looked at it. It requires a software application running on the second machine, and requires that the booting machine have a built-in "Debug Port" functionality in the USB EHCI controller. (The application is open source as I recall -- don't quote me)

3) Debug via Firewire1394 -- I've not looked at this too much, but the required stuff is part of the kernel. On the second machine, you need an application running (it's open-source as I recall -- don't quote me).

I don't have specific details of how to go about actually implementing these methods; I'm just aware that they exist. From what I have read, the 1394 method is the most effective, and potentially the cheapest, as it doesn't AFAIK require particular hardware, such as the USB Debug Device.

EDIT - I just re-read your post and noted that one of the machines is 'remote' -- so depending on 'how remote it is' maybe these ideas are not ideal... My apology if these do not help in your circumstance

Good luck,
Sasha

Last edited by GrapefruiTgirl; 08-14-2009 at 07:16 AM.
 
Old 08-14-2009, 08:32 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Bootp? Tftp?
 
Old 08-14-2009, 01:32 PM   #4
Rish.Ahm
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by GrapefruiTgirl View Post
There are two (or more) methods of debugging early boot stage on a machine before the TCP-IP system is available:

In order of usefulness (to best of my knowledge):

1) Setting a serial port as the default (boot) console, and having the second machine listening on the serial line.

2) Using a USB<>USB debug cable. This is a special hardware device, costs about $80.00 CDN last time I looked at it. It requires a software application running on the second machine, and requires that the booting machine have a built-in "Debug Port" functionality in the USB EHCI controller. (The application is open source as I recall -- don't quote me)

3) Debug via Firewire1394 -- I've not looked at this too much, but the required stuff is part of the kernel. On the second machine, you need an application running (it's open-source as I recall -- don't quote me).

I don't have specific details of how to go about actually implementing these methods; I'm just aware that they exist. From what I have read, the 1394 method is the most effective, and potentially the cheapest, as it doesn't AFAIK require particular hardware, such as the USB Debug Device.

EDIT - I just re-read your post and noted that one of the machines is 'remote' -- so depending on 'how remote it is' maybe these ideas are not ideal... My apology if these do not help in your circumstance

Good luck,
Sasha



Thanks for ur reply. Actually I am able to debug the linux kernel using Kqemu and Eclipse and so m able to see the full kernel code as it loads...

http://developer-guides.blogspot.com/

But my problem is specific to the Network Communication while Kernel is still booting.

The remote pc, here, is available via LAN. I would like to rephrase my problem again .

Two PCs host-1 and host-2 are connected in a LAN. Host-2 has already booted and running the OS, where as host-1 has just started to boot. While booting the kernel (and at this moment TCP-IP protocol hasn't been initialized as it is a part of OS rather than kernel) in host-1, the host-1 connects with host-2 in order to fetch some configuration settings of host-2. Now my problem here is that as the TCP-IP protocol is not available at this moment in the kernel, which protocol (if any) or driver should I use to connect my host-1 and host-2 over the network while host-1 is just booting.... Both host-1 and host-2 have linux. So do we have any network protocol which is the part of linux kernel?
 
Old 08-14-2009, 05:47 PM   #5
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by Rish.Ahm View Post
While booting the kernel (and at this moment TCP-IP protocol hasn't been initialized as it is a part of OS rather than kernel) ...
Somebody please correct me if I am wrong, but I thought the TCP/IP stack was part of the kernel. Certainly the netfilter firewall code is (as can be seen from the log entries from rules with -j LOG).

EDIT: I believe ethernet devices are usually initialized (assigned IP address, etc) from userland.

Last edited by blackhole54; 08-14-2009 at 05:52 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Kernel Log: Ext4 completes development phase as interim step to btrfs LXer Syndicated Linux News 0 10-18-2008 11:30 PM
Fault in KDE processes communication: Could not read network communication list Magnus Johansson MEPIS 0 03-30-2008 12:50 PM
Network Communication between two systems. ramaprasad.royal Linux - Networking 1 02-29-2008 12:52 AM
Network Communication Issues! jlea9378 Linux - Networking 1 12-11-2007 10:47 AM
openssl is for communication b/w computers on the network. abdullahgee Linux - Networking 1 06-04-2004 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:33 PM.

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