Follow the steps in the link below till 2. and in the third step do as..
http://kernel2kernel.blogspot.com/2007/03/
ethernet-device-setup-in-linuxexubuntu.html
step 3:
bash$cd /etc/network
bash$sudo vi interfaces
and type down as
auto eth0
iface eth0 inet static
address 192.168.X.X(The IP you want to setup)
netmask 255.255.255.0
gateway 192.168.1.1
save and exit
and
bash$sudo /etc/init.d/networking restart
bash$sudo dhclient eth0
About
Information is always Worth to save ...
Saturday, March 24, 2007
Ethernet device setup in Linux(Ex:UBUNTU)
When we Install the Linux(I used UBUNTU) It may or may not have the supported Ethernet device drivers for the particular computer or system.We don't get any problems connecting to the Internet when the Installation CD has the drivers, but what should we do when it doesn't have the particular drivers?
I came through this problem and searched in different forums and sites and finally I got it solved, I wrote down the steps involved in setting up the Ethernet Device below
1.Find the Ethernet device in the system
for this you can use commands
bash$ dmesg
and in the list you can find the devices and for example realtek RTL8139 or Atlansic.I did this for Atlansic device on M5N-MX machine.
2.Now you can use the installation in two ways
a.You can download drivers in another machine and copy them to the machine where you require the device to be setup
In this the steps involved are:
copy drivers to the /home/user/LAN
and then
bash$ cd /home/user/LAN
cd src
sudo make
sudo make install
sudo modprobe atl1(for atlansic)
b.Another way is to compile the drivers in another system, for this follow the steps in 'a' till sudo make
and then
cd /lib/modules/2.6.17-11-generic(Your kernel)/kernel/drivers/net/atl1
then copy the .ko file to CD or Memorystick
and put this .ko file in the system where device to be setup in the same location(/lib/modules/2.6.17-11-generic(Your kernel)/kernel/drivers/net/atl1)
and then enter bash$sudo modprobe atl1
bash$lsmod
bash$ifconfig -a thats it your ethernet device drivers are installed
3.The above two steps is for installing the drivers but whenever you restart the machine you are required to enter bash$depmod to work the device, To avoid this open
bash$cd /etc/modprobe.d
bash$sudo vi aliases
In this aliases file type down "alias eth0 atl1"
Now open
bash$cd /etc/network/
bash$sudo vi interfaces
in the file type down
auto eth0
iface eth0 inet dhcp
(use either eth0 or eth1)
and now in the bash prompt
bash$sudo dhclient eth0
Thats it your ethernet device is ready and you can use internet,ftp, ssh e.t.c enjoy and have fun with the commands and devices.
I came through this problem and searched in different forums and sites and finally I got it solved, I wrote down the steps involved in setting up the Ethernet Device below
1.Find the Ethernet device in the system
for this you can use commands
bash$ dmesg
and in the list you can find the devices and for example realtek RTL8139 or Atlansic.I did this for Atlansic device on M5N-MX machine.
2.Now you can use the installation in two ways
a.You can download drivers in another machine and copy them to the machine where you require the device to be setup
In this the steps involved are:
copy drivers to the /home/user/LAN
and then
bash$ cd /home/user/LAN
cd src
sudo make
sudo make install
sudo modprobe atl1(for atlansic)
b.Another way is to compile the drivers in another system, for this follow the steps in 'a' till sudo make
and then
cd /lib/modules/2.6.17-11-generic(Your kernel)/kernel/drivers/net/atl1
then copy the .ko file to CD or Memorystick
and put this .ko file in the system where device to be setup in the same location(/lib/modules/2.6.17-11-generic(Your kernel)/kernel/drivers/net/atl1)
and then enter bash$sudo modprobe atl1
bash$lsmod
bash$ifconfig -a thats it your ethernet device drivers are installed
3.The above two steps is for installing the drivers but whenever you restart the machine you are required to enter bash$depmod to work the device, To avoid this open
bash$cd /etc/modprobe.d
bash$sudo vi aliases
In this aliases file type down "alias eth0 atl1"
Now open
bash$cd /etc/network/
bash$sudo vi interfaces
in the file type down
auto eth0
iface eth0 inet dhcp
(use either eth0 or eth1)
and now in the bash prompt
bash$sudo dhclient eth0
Thats it your ethernet device is ready and you can use internet,ftp, ssh e.t.c enjoy and have fun with the commands and devices.
BOOT Sequence
When I am studying the system architecture, I had a small doubt about how the Boot sequence works and what are the steps involved,So I read in detail about the Boot sequence,but It varies among the systems,Usually They are divided in to the following steps
1.Hardware Boot:When we Power on the system the control goes to the Program stored in ROM(Usually PROM:Programmable Read only Memory) which is BIOS in PC'S, It does self-test of Machine and access Non-volatile Memory to read further. This Memory is Battery Backed CMOS Memory and also called NVRAM(Non Volatile Random Access Memory). The parameters stored in NVRAM vary between systems. The Boot Programe Know what is boot device (or) How to probe boot devices, Now the control Accesses boot device and loads OS loader which is at fixed position on boot device and control transfers to it.[Booting from Network is Different].
2.OS Loader: This is in the first sector of Boot device(known as MBR:Master Boot Record), In Most systems(Even on Non -PC's), There is some limitations to size and complexity of this loader. The PC MBR(512 Bytes) size makes it impossible to sqeeze a full OS Loader in it. So most OS's make primary loader call and from it calls secondary OS loader which is in disk partition.
In Linux: OS loader is normally lilo or grub, Both of them may be secondary loaders(DOS as primary(MBR)) or as two part loader where they provide special MBR containing bootstrap code to load second part of loader from Root system. Most of the Os loaders allow interactive use to enable specification of alternative kernel and to pass optional parameters to the kernel. From the core the main job of OS loader is to locate kernel on the disk ->load it-->Run it.
3.Kernel Startup: When the kernel is loaded --> Initialises the devices(via drivers)--> starts swapper-->Mounts root file system[/] which is the kernel process.
Only then the kernel creates the first (user land) process[numbered 1]. This process executes program /sbin/init, passing any parameters that werent handeled by kernel already.
4.Init and Inittab:When Init starts It reads /etc/inittab for further instructions.This file defines what should be run in different run levels.Admin can change the current runlevel via init and query the current runlevel.Inittab only bootstraps set of scripts that actually start/stop individual services.
5.Boot scripts:For major linux distributions and HPUX,SOLARIS e.t.c the each managed services(NFS,mail,cron e.t.c) the startup script is located in /etc/init.d directory. Each of theese scripts accepts single argument with
'start'--causing to start the service
'stop'--causing to stop the service
optional--'restart','status'.
-->What are sequencing directories and why do we need them?
To make specific scripts start/stop at specific runlevels and in specific order.There are sequencing directories in /etc/rc[0-6s].d, In each of theese directories there are links to the scripts in the init.d directory.
A primary script (usually /etc/rc) is called from inittab and calls service scripts via the links in the sequencing directories, All links with names that begin with 's'->start, 'k'->stop argument, and each have the order number to start or stop in the same runlevel.[Ex:link /etc/rc2.d/s80sendmail starts send mail service on runlevel2 this happens after rc2.d/s12syslog and before rc2.d/s90 xfs]
Boot Configuration:To change the parameters without editing bootscripts we can edit configuration files located in /etc/sysconfig
source:--If u are using linux type man boot in bash
1.Hardware Boot:When we Power on the system the control goes to the Program stored in ROM(Usually PROM:Programmable Read only Memory) which is BIOS in PC'S, It does self-test of Machine and access Non-volatile Memory to read further. This Memory is Battery Backed CMOS Memory and also called NVRAM(Non Volatile Random Access Memory). The parameters stored in NVRAM vary between systems. The Boot Programe Know what is boot device (or) How to probe boot devices, Now the control Accesses boot device and loads OS loader which is at fixed position on boot device and control transfers to it.[Booting from Network is Different].
2.OS Loader: This is in the first sector of Boot device(known as MBR:Master Boot Record), In Most systems(Even on Non -PC's), There is some limitations to size and complexity of this loader. The PC MBR(512 Bytes) size makes it impossible to sqeeze a full OS Loader in it. So most OS's make primary loader call and from it calls secondary OS loader which is in disk partition.
In Linux: OS loader is normally lilo or grub, Both of them may be secondary loaders(DOS as primary(MBR)) or as two part loader where they provide special MBR containing bootstrap code to load second part of loader from Root system. Most of the Os loaders allow interactive use to enable specification of alternative kernel and to pass optional parameters to the kernel. From the core the main job of OS loader is to locate kernel on the disk ->load it-->Run it.
3.Kernel Startup: When the kernel is loaded --> Initialises the devices(via drivers)--> starts swapper-->Mounts root file system[/] which is the kernel process.
Only then the kernel creates the first (user land) process[numbered 1]. This process executes program /sbin/init, passing any parameters that werent handeled by kernel already.
4.Init and Inittab:When Init starts It reads /etc/inittab for further instructions.This file defines what should be run in different run levels.Admin can change the current runlevel via init and query the current runlevel.Inittab only bootstraps set of scripts that actually start/stop individual services.
5.Boot scripts:For major linux distributions and HPUX,SOLARIS e.t.c the each managed services(NFS,mail,cron e.t.c) the startup script is located in /etc/init.d directory. Each of theese scripts accepts single argument with
'start'--causing to start the service
'stop'--causing to stop the service
optional--'restart','status'.
-->What are sequencing directories and why do we need them?
To make specific scripts start/stop at specific runlevels and in specific order.There are sequencing directories in /etc/rc[0-6s].d, In each of theese directories there are links to the scripts in the init.d directory.
A primary script (usually /etc/rc) is called from inittab and calls service scripts via the links in the sequencing directories, All links with names that begin with 's'->start, 'k'->stop argument, and each have the order number to start or stop in the same runlevel.[Ex:link /etc/rc2.d/s80sendmail starts send mail service on runlevel2 this happens after rc2.d/s12syslog and before rc2.d/s90 xfs]
Boot Configuration:To change the parameters without editing bootscripts we can edit configuration files located in /etc/sysconfig
source:--If u are using linux type man boot in bash
Thursday, March 22, 2007
About Blog
Hi Guyz
When I started working on the linux kernel,
I thought why should I create a blog and share the problems I faced on Debugging,Devoloping and so.....
When I started working on the linux kernel,
I thought why should I create a blog and share the problems I faced on Debugging,Devoloping and so.....
Subscribe to:
Posts (Atom)