Latest Entries »

It is always easy to Install GUI during the Initial Linux Installation by selecting respective “KDE” , “GNOME”, “Desktop” packages. At times I wanted to see how we can do this post basic OS installation when you have not selected the above packages during your Initial installation. But, I always kept on delaying this experiment until yesterday when i sat down to try something else and  was badly in need of getting the Linux GUI up.

So, yesterday  I was working with my Redhat Guest Virtual Machine and for some reason I wanted to see the GUI. I initially ran commands like startx and xclock which didn’t work as they don’t seem to exist at all.

I was thinking of lot of permutations and combinations as why it didn’t work.

At first  I ran the command “who -r” to see the run-level where I was sitting, which basically said I was in Run-level 3. Tried switching to “init5” didn’t work.

Now I thought might be I should persist the run-level by making the changes to the /etc/initab. When i verified the current level it showed it as “3” as default

Before :

[root@redhat-test1 ~]# cat /etc/inittab

id:3:initdefault:

After changing run level:

[root@redhat-test1 ~]# cat /etc/inittab

id:5:initdefault:

I then changed it to run-level 5 by making changes as shown above and rebooted the system. The system was coming up but not the GUI. Redhat was showing “Blue”hanging progress bar instead of its usual red and white progress bar. The Login from Putty to shell though was working fine, its just that the GUI was not up. I knew then something was still not right.

I started thinking if the issue is due to possible missing RPMs related to the desktop/kde/gnome. So it was time for me to wakeup “Google Baba” the omni present:P and ask him as how others have solved this. I checked couple of URLs but there was no straightforward answer for this but atleast they gave me some good pointers. So instead of showing my experiments and how I got this up with reverse engineering, I would rather try to give direct and simple steps as how you can do this. Simple and Straightforward// I hope so 😛

  • First mount your local ISO Image/CD on your server
  • Try to use the ISO /CD as your YUM repository ( as you need several dependency packages for the GUI environment to get installed)
  • Once you successfully mount the ISO image or if you have your local repository already on the system install the below RPMS using “yum”

[root@redhat6 Server] yum -y groupinstall “Desktop”
[root@redhat6 Server] yum -y groupinstall “KDE Desktop”
[root@redhat6 Server] yum -y groupinstall “X Window System

“X Window System” – which installs all your xorg-x11 and xorg-x11-server rpms along with their their deps.

At the prompt now run the command “init 5” and the desktop will try to start up slowly

[root@redhat6 Server] init 5

If the GUI/Desktop has come up but if it is hanging or not displaying properly don’t mind giving once nice “init 6” reboot kick. Finally you can see the GUI.

Now for people  ( Including me ) who struggle to set the CDROM as the REPO for installing all the dependency RPMS please follow the below steps.

Create local dir and mount Cdrom 

Note in my case it is /dev/cdrom as I am using this from VMware, locate and mount respective cdrom device.

[root@redhat-test1 ~]# mkdir /mnt/Redat_CD

[root@redhat-test1 ~]# mount /dev/cdrom    /mnt/Redhat_CD/
mount: block device /dev/sr0 is write-protected, mounting read-only

Creating CD yum repository and adding it yum repo file. 

In this case I selected to append the new Redhat CD/DVD repo config “[REDHAT-CD-REPO]” to the existing ” rhel-source.repo” file present in /etc/yum.repos.d directory. However, this is  not mandatory. You can create your own <filename>.repo file and create an entry for “[REDHAT-CD-REPO]” in the new repo file.

[root@redhat-test1 yum.repos.d]# pwd
/etc/yum.repos.d

[root@redhat-test1 yum.repos.d]# more rhel-source.repo

[REDHAT-CD-REPO]

name=Redhat cd repo
baseurl=file:///mnt/Redhat_CD/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Note: For some reason Redhat doesn’t like space in the [  ] TAG when you enter name. So make sure you either add underscore or dash like the one I did.

Still not working … Give me a shout … ! I would def try to solve it .. 🙂

Luckily I have got 2 systems one with  RHEL6 and one OEL4  for me to test, thanks to my new company:). So the command that I would like to share today is SS, “socket stats” similar to the netstat command which I got to know only recently ( might be bcos i was sleeping all the while [smiley] )when I was short of work one day @ office.

I don’t want to duplicate the entire man page here  Iam just giving couple of output lines. My humble suggestion to any learner is to always refer the MAN page of the command as it would have lot many options for you to experiment. Well I should say that one option I liked most in this command is –memory. So explore this command now !

 

[root@TestPC ~]# ss -pl

Recv-Q Send-Q Local Address:Port Peer Address:Port
0 0 *:nfs *:*
0 0 *:844 *:* users:((“rpc.rquotad”,9144,4))
0 0 *:32943 *:*
0 0 *:sunrpc *:* us

 

[root@TestPC ~]# ss -o state established
Recv-Q Send-Q Local Address:Port Peer Address:Port
0 0 127.0.0.1:6009 127.0.0.1:32769

 

 

 

 

From last couple of days I am behind understanding OPEN LDAP and struggled  to set it up in my Linux test environment. My experience in configuring most of the applications on Linux so far has been relatively easy but this one seemed to be a beast.

I wanted to run away from this beast and never look back agian, but thanks to my recent Interview that I attended when the recruiter asked me if I knew LDAP. Thank God ! it was telephonic Interview or else It would have been difficult to hide those blank expressions on my face.

Well, it is not necessary that everyone should know all the things in Linux but it would have been really nice to talk few lines and answer few Q’s about LDAP. 

so what prompted me to take on this beast is my Job hunt, while hunting for any job you always have to leave less chances to the recruiter to say “NO” to you, isn’t.  So I thought even if I can’t defeat the beast I have to face the beast and so the journey started.

Tomorrow I would share a wonderful link of this amazing person who made my life easy with his LDAP installation link. 100% credit goes to him. Along with the link I would try to explain some common mistakes that we make in the installation & config process and how to get over them.

TTFN. See you in next blog! Relief Relief I can now sleep peacefully for 2day !

Some time back I was using a command called meminfo in Solaris to find the memory information in Solaris. It is indeed a nice script written by schmidt  http://www.4schmidts.com/memconf.html .

Later, I moved my role from supporting Solaris systems to Linux systems and I was struggling to get the same piece of info in Linux about the memory bank/slot and how memory is present in each memory bank. Today I got an audit work to validate the system data that someone has filled about Linux servers. So, this time I couldn’t escape and I had to find a way out. I always knew that there should be info in dmidecode command, but as usual my laziness was stopping me from looking in to the output.

So finally I had to push my lazy attitude and dive in to the Info which dmidecode was giving.  I was really surprised to see that there is enough info that we can grab from the dmidecode output. So here is my analysis.

  • First check the actual memory Info from the either “top” or “free -m” command.
  • Check the “dmidecode” output for the DIMM slot and each RAM size

FREE COMMAND OUTPUT

So the below command shows that we have around 2GB of memory installed in the system.

[root@bravo]# free -m
total used free shared buffers cached
Mem: 2026 1585 440 0 222 551
-/+ buffers/cache: 811 1215
Swap: 4094 0 4094

TOP COMMAND OUTPUT

Let’s verify our understanding of memory available using the TOP command which also shows that we have approx 2GB memory approx.

[root@bravo]# top

top – 13:18:56 up 216 days, 4:12, 3 users, load average: 0.14, 0.11, 0.09
Tasks: 199 total, 1 running, 198 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.8% us, 1.4% sy, 0.0% ni, 97.4% id, 0.3% wa, 0.0% hi, 0.0% si
Mem: 2074900k total, 1623648k used, 451252k free, 227816k buffers
Swap: 4192924k total, 296k used, 4192628k free, 565160k cached

DMIDECODE COMMAND

Run the DMIDECODE command and look for the data where the word “Physical Memory Array” starts and go through each line to get detailed information. In some new systems you can also use the command dmidecode –s  memory and dmidecode –t 17 , where “s” means string and “t” means type. Let’s just use dmidecode here for now.

Summary of the memory data

——————————————————————————————-

Maximum memory that the ON BOARD memory slots can accept is = 8GB

Type of memory = DDR

Error Correction Type: Single-bit ECC

Size of each DIMM = 1024 MB (1GB)

DIMM Speed = 333 MHz (3.0 ns)

Number of DIMM slots = Total 4 DIMM slots and only 2 DIMM slots are filled with 1GB memory each

Note: where ever the Memory module is not installed the “Size” would show as “Size: No Module Installed”

——————————————————————————————-

[root@bravo]# dmidecode | more

So here is the summary of the Info that we are looking from the  Important Information we have from the dmidecode  data

Handle 0x1000
DMI type 16, 15 bytes.
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: Single-bit ECC
Maximum Capacity: 8 GB
Error Information Handle: Not Provided
Number Of Devices: 4

Handle 0x1100
DMI type 17, 23 bytes.
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 1024 MB
Form Factor: DIMM

Set: 1
Locator: DIMM 01
Bank Locator: Not Specified
Type: DDR
Type Detail: Synchronous
Speed: 333 MHz (3.0 ns)
Handle 0x1101
DMI type 17, 23 bytes.
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 1024 MB
Form Factor: DIMM
Set: 1
Locator: DIMM 02
Bank Locator: Not Specified
Type: DDR
Type Detail: Synchronous
Speed: 333 MHz (3.0 ns)

Handle 0x1102
DMI type 17, 23 bytes.
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed
Form Factor: DIMM
Set: 2
Locator: DIMM 03
Bank Locator: Not Specified
Type: DDR
Type Detail: Synchronous
Speed: 333 MHz (3.0 ns)

Handle 0x1103
DMI type 17, 23 bytes.
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed
Form Factor: DIMM
Set: 2
Locator: DIMM 04
Bank Locator: Not Specified
Type: DDR
Type Detail: Synchronous
Speed: 333 MHz (3.0 ns)

So here is my learning for the day. So I am signing of for the day looking forward to learn something new tomorrow. Infact there are couple of things that I have learnt today and I would try to either share it today or tomorrow in my new post.

Also, one thing that I started believing these days is that there is no job which is small or waste of time. We just have to look at the learning that we can grab from it. I am sure every job teaches us something  might not be technical always but I am sure we would have some thing to learn from it directly or in directly.

Adios ! Amigos !

The desire to write grows with writing.Desiderius Erasmus

So today I would share a small tip on how to check the version of the RPMs that you have already installed on your servers. So, when I mean version it means to find whether the RPM is a 32,64 bit or noarch version. Thanks to the doubt from my friend I always get to learn something new J

So the command is “rpm -qa -qf <QUERY TAGS>

Where the Query tags are

n – name

arch – architecture

v-version

r- release

[root@redhat6pc ~]# rpm -qa –qf “%{n}-%{arch}\n” | grep -i libaio

libaio-x86_64

[root@redhat6pc ~]# rpm -qa –qf “%{n}-%{v}-%{r}.%{arch}\n” | less

Or

rpm -qa –queryformat “%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})

[root@redhat6buildpc~]  rpm -qa –qf “%{n}-%{v}-%{r}.%{arch}\n”

plymouth-plugin-label-0.8.3-24.el6.x86_64

nano-2.0.9-7.el6.x86_64

tzdata-2011l-4.el6.noarch

liberation-fonts-common-1.05.1.20090721-4.el6.noarch

perl-URI-1.40-2.el6.noarch

If you want you can redirect the output to a file and save the Info as below in a file

[root@redhat6pc ~]# rpm -qa –queryformat “%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n” > /tmp/rpmlist.txt

[root@redhat6pc ~]# more /tmp/rpmlist.txt

plymouth-plugin-label-0.8.3.24.el6 (x86_64)

perl-Module-Load-0.16.119.el6_1.1 (x86_64)

xorg-x11-drv-rendition-4.2.4.1.el6 (x86_64)

cdparanoia-10.2.5.1.el6 (x86_64)

nano-2.0.9.7.el6 (x86_64)

tzdata-2011l.4.el6 (noarch)

Linux History Command options

This is the most common command that many of the sysadmins use day in day out;  “History” command. I am sure that so far i should have typed this command some 1000 odd times on the linux console.

So this is how I  got interested to know more about the “History” command.  One day one of my colleague’s came to me asked  do you know anyway if history command shows the time stamp of each entry. Well my Immediate answer was not sure but ..but.. I am sure there should be a way as the same question should have come to many sysadmin’s mind. So I called the “God father” of search engine “Google” for help and viola thanks to “Geek Stuff” I found what I was looking for. I don’t want to copy paste and take the credit of some guys work. So here is the link below which has really helped me. I am sure you would love it too.

http://www.thegeekstuff.com/2008/08/15-examples-to-master-linux-command-line-history/

 

Back from my Techie sleep :)

It’s Thursday of Feb2012  and finally after 3 years and my lazzie approach to procrastinate things I have decided that from today onwards I would share at least one new topic, a new command or something that I have missed learning in my last few years and learning it now.. mm .. say 9 years. Well the reason is not that I was running away from learning   but I kept on saying to myself,  yes I would share it and haven’t done it so far. I would also try to share my technical and non technical experience and few points that u might want to ponder.

It’s quite possible that the topics, commands that I will be sharing in the days to come is already there in the net some where but I am posting it here incase my page would be of any help to you guys and save your time and effort.

The first and foremost thing that I would like to say to all my friends who happen to see my blog is ” Pls Share …” knowledge grows with sharing . Helping someone might take your time but the time you spent is for sure not a waste of time. It helps you to learn more and try to understand things at more depth and in a different way.

So its 11:16 PM today and finally i broke the chain of laziness. Hope to keep this blog rolling. But please do leave a comment or link my blog if that might help some more ppl to share thier knowledge to us.

Time for ZZZ ..zz but will try to share my experience as often as possible in the days to come.

 

 

 

 

Linux Channel Bonding


So what is this Channel Bonding all about?

Imagine you have a Multi NIC server in your environment and once you are done with the setup of this server in the network   you have realized that one of the NIC cards is sitting Idle and you are not aware how you can use it?

Or you have come across the situation where you are trying to reach the 100% uptime in you server environment. When you have tried all the fail over techniques for Load Balancer, Switches, Router and you still see some possibility of failure at the server end.

Or you are looking for an In-expensive way of improving your system UP time in the server environment.

Or when you don’t want to waste 2-3 Ip’s for Two NICs  in trying to achieve the failover or high availability at the server end.

Well the answer to the above? Is Channel Bonding

Channel Bonding is an Inexpensive way to Utilize you existing Idle Network Interface Card(NIC) to reap the benefits of Failover, Increasing the Data transfer speed ,using both the NIC cards to receive the data.

You can get a better mileage with your existing NIC cards with less investment of time and mney.

So what do we need to achieve this?

  • Linux OS that supports Bonding module (Check if the Linux Kernel Supports bonding driver).
  • Linux OS containing mii-tool or ethtool which can be used to view/change/modify the speed of NIC card (Note: mii-tool supports configuration of 10/100 NIC while ethtool can support above 100baseT).
  • Two NIC (network Interface card) Cards.
  • A switch that supports IEEE 802.3ad Dynamic Link Aggregation.


Well the best part is your bonding options are not limited to two Interfaces it could be ‘N’ of interfaces, you can even bond Gigabit Ethernet Cards.

For now lets look at how bonding works for Stand alone servers. The Bonding configuration/details given below is tried and tested on Red Hat Enterprise Linux AS release 4.

Verification:

Let’s first verify if the OS has the bonding module

By looking at the Kernel Config file we can verify if the  bonding is enabled as a module

# grep -i bonding /boot/config-2.6.9-34.EL

CONFIG_BONDING=m (Implies bonding is configured/enabled as a module)

Let’s verify if the module is present in the system (if kernel has loaded it properly)

#modprobe –list | grep -i bonding

/lib/modules/2.6.9-34.ELsmp/kernel/drivers/net/bonding/bonding.ko

Generally you can use mii-tool to check if the network interface s are up and their status.

# mii-tool

eth0: negotiated 100baseTx-FD, link ok

eth3:negotiated 100baseTx-FD, link ok

In the above case the two NIC card’s link status is okay.

Configure Interfaces:

In order to configure the bonding lets assume ” bond0″ is the new logical bonded Interface name. This would be configured the same way as interfaces eth0& eth3.

Edit/Create the “ifcfg-bond0” config file in the following path with the following values, Note that bond0 would be acting as a Master while the other Interfaces would be the slave for this bonding channel.

Configure ifcf-bond0 as Master Interface

# vi /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0

BOOTPROTO=static

ONBOOT=yes

USERCTL=no

IPADDR=x.x.x.x

NETMASK=255.255.255.0

GATEWAY=x.x.x.x

Configure the Interfaces eth0 and eth3 as Slave

Configuration for eth0

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=none

ONBOOT=yes

USERCTL=no

MASTER=bond0

SLAVE=yes

ETHTOOL_OPTS=”autoneg on”

Configuration for eth3

# vi /etc/sysconfig/network-scripts/ifcfg-eth3

DEVICE=eth3

BOOTPROTO=none

ONBOOT=yes

USERCTL=no

MASTER=bond0

SLAVE=yes

ETHTOOL_OPTS=”autoneg on”

Let’s try to understand some of the variables defined above in the Interface file.

BOOTPROTO=<protocol>, where <protocol> is one of the following:

none — No boot-time protocol should be used.

bootp — The BOOTP protocol should be used.

dhcp — The DHCP protocol should be used.

ETHTOOL_OPTS=<options>, where <options> are any device-specific options supported by ethtool. For example, if you wanted to force 100Mb, full duplex:

ETHTOOL_OPTS=”autoneg off speed 100 duplex full”

Note that changing speed or duplex settings almost always requires

disabling autonegotiation with the autoneg off option. This needs to be stated first, as the option entries are order dependent.

ONBOOT=<answer>, where <answer> is one of the following:

yes — This device should be activated at boot-time.

no — This device should not be activated at boot-time.

SLAVE=<bond-interface>,where <bond-interface> is one of the following:

yes — This device is controlled by the channel bonding interface specified in the MASTER directive.

no — This device is not controlled by the channel bonding interface specified in the MASTER directive.

This directive is used in conjunction with the MASTER directive.

USERCTL=<answer>, where <answer> is one of the following:

yes — Non-root users are allowed to control this device.

no — Non-root users are not allowed to control this device.

Refer

http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/ref-guide/s1-networkscripts-interfaces.html

for more details on the various variables that can be used to configure Ethernet Interfaces in Redhat.
Configure Kernel Module Configuration file:

Once the Interfaces ifcfg-bond0, ifcfg-eth0, ifcfg-eth3 are configured, configure the kernel modules configuration file to load the required bonding module while booting.

Options for the bonding driver are supplied as parameters to the bonding module at load time. Module options may be given as command line arguments to the insmod or modprobe command, but are usually specified in either the /etc/modules.conf or /etc/modprobe.conf configuration file.

# vi /etc/modprobe.conf


alias eth0 e1000

alias eth3 e1000

alias bond0 bonding

options bonding miimon=100 mode=1

The parameters miimon=100 and mode=1 are passed to the bonding driver.

miimom specifies the MII link monitoring frequency in milliseconds. This determines how often the link state of each slave is checked for link failures. A value of zero disables MII link monitoring.

mode =1,a value of “0” specifies that  the bonding mode is a round robin mode providing load balancing and fault tolerance and a value of “1” specifies that only one slave in a bond is active and the interface is in a fault tolerance mode.

Once the Configuration of all the 3 interfaces ifcfg-bond0, ifcfg-eth0, ifcfg-eth3 is done restart the network services on the Linux box.

# service network restart

Now run the ifconfig -a command on the Shell to check if bonding is done and how the Interfaces are displayed. The output would be similar to the one shown below.

# ifconfig –a

bond0 Link encap:Ethernet  HWaddr 00:14:4F:20:91:78

inet addr:82.132.154.49  Bcast:82.132.154.255  Mask:255.255.255.0

inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link

UP BROADCAST RUNNING MASTER MULTICAST MTU:1500  Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

eth0 Link encap:Ethernet  HWaddr 00:14:4F:20:91:78

inet6 addr: fe80::214:4fff:fe20:9178/64 Scope:Link

UP BROADCAST NOARP SLAVE MULTICAST MTU:1500  Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Base address:0x9c00 Memory:fbfe0000-fc000000


eth1      Link encap:Ethernet  HWaddr 00:14:4F:20:91:79

BROADCAST MULTICAST  MTU:1500  Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Base address:0x9800 Memory:fbfc0000-fbfe0000

eth3 Link encap:Ethernet  HWaddr 00:14:4F:20:91:78

inet6 addr: fe80::214:4fff:fe20:9178/64 Scope:Link

UP BROADCAST NOARP SLAVE MULTICAST  MTU:1500  Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Base address:0x9000 Memory:fbf80000-fbfa0000

If you observe the output above you can see that the interface “bond0″acts as a MASTER and Interfaces “eth0&eth3″ act as SLAVE. Once the Channel bonding is setup run the following command to verify the Channel bonding created.

# ls -l /proc/net/bonding/

total 0

-r–r–r–  1 root root 0 Jul 21 15:02 bond0

For every channel bond created there would be one such file present in this directory.

# more /proc/net/bonding/bond0

Ethernet Channel Bonding Driver: v2.6.1 (October 29, 2004)

Bonding Mode: fault-tolerance (active-backup)

Primary Slave: None

Currently Active Slave: eth0

MII Status: up

MII Polling Interval (ms): 100

Up Delay (ms): 0

Down Delay (ms): 0

Slave Interface: eth0

MII Status: up

Link Failure Count: 0

Permanent HW addr: 00:14:4f:20:91:78

Slave Interface: eth3

MII Status: up

Link Failure Count: 0

Permanent HW addr: 00:14:4f:20:91:7f

From the output of the “/proc/net/bonding/bond0″ you can see that configured bonding is fault -tolerance (active-backup) and other details.

Errors and Trouble Shooting:

Sometimes if bonding is not working after server reboot check for the following to identify as what is causing the Issue.

  • Check if the /var/log/messages for error messages like

ifup: bonding device bond0 does not seem to be present, delaying initialization.

ifup: bonding device bond0 does not seem to be present, delaying initialization.

ifup: bonding device bond0 does not seem to be present, delaying initialization.

  • Check if the bonding module is loaded after the system booted up

# lsmod

bonding                64180  0

md5                     5697  1

  • If you have manually added anything to modules.dep remove those entries and let depmod handle the proper linking of modules, the modules.dep file is there to ensure the modules are loaded, unloaded and linked in the proper order. Remove your manual entries and run your depmod -a

# depmod –a

  • Now run modprobe for the required module (in this case its bond0)

# modprobe bond0

  • Kernel modules are usually loaded directly by the facility that requires them, which is given correct settings in the /etc/modprobe.conf file. However, it is sometimes necessary to explicitly force the loading of a module at boot time. Red Hat Enterprise Linux checks for the existence of the /etc/rc.modules file at boot time, which contains various commands to load modules. The rc.modules should be used, and not rc.local because rc.modules is executed earlier in the boot process.
  • For example, the following commands configure loading of the bond0 module at boot time (as root):

# echo modprobe bond0  >> /etc/rc.modules

# chmod +x /etc/rc.modules