Loading AIX kernel extensions on reboot


 
Thread Tools Search this Thread
Operating Systems AIX Loading AIX kernel extensions on reboot
# 1  
Old 08-16-2013
Loading AIX kernel extensions on reboot

Greetings,

Does anyone know how to load AIX kernel extensions on reboot? I know that Oracle loads it's postwait kernel extension via a executable in /etc/inittab. I'm assuming this executable calls the "sysconfig" system call and loads it. What if I wrote my own? What is the proper way in AIX to load it automatically on system reboot? Should I edit the /etc/objrepos/Config_Rules file? I know that file loads the device drivers, which are kernel extensions themselves.

Any assistance would be greatly appreciated.
Thanks,

--Justin
# 2  
Old 08-20-2013
It depends what you mean by a kernel extension and how you propose to write your own. If you are thinking of just starting up a bit of code a boot time, then have a think about using the rc scripts. There will be lines in /etc/inittab something like this:-
Code:
l2:2:wait:/etc/rc.d/rc 2 
l3:3:wait:/etc/rc.d/rc 3 
l4:4:wait:/etc/rc.d/rc 4 
etc.

Each of these calls the script /etc/rc.d/rc with the appropriate run-level value. You can tell the default run-level by looking at the top of /etc/inittab for the record to define initdefault. Mine is:-
Code:
init:2:initdefault:

Never change the script /etc/rc.d/rc or your server may not boot.

Reading through /etc/rc.d/rc, you will see a section that changes to the directory of Run-Control scripts and runs firstly all those starting with K giving them the parameter stop, then every one starting with S, passing the parameter of start.

If you have something to run at boot, you would be better to put it in as a script in /etc/rc.d/rc2.d/S99myscript rather than directly update /etc/inittab. I have had occasion where an OS patch-set replaced /etc/inittab and local changes were lost. It caused a real panic until we worked it out.

The scripts are run in the Bourne shell, so you may have to consider that when coding. Setting up your environment (PATH, TZ, Locale, etc.) will probably not be done either, so it may take a while to get right.




I hope that this helps.

Robin
Liverpool/Blackburn
UK
# 3  
Old 08-20-2013
Robin,

Thank you for your reply. I am not talking about user space programs like a script which starts a db or an app, I'm talking about kernel space extensions, or in Linux speak modules. I know /etc/modules on some Linux distributions is used to load modules on boot, I'm just wondering what the equivalent in AIX is?

Thanks,

--Justin
# 4  
Old 08-23-2013
This is a complex topic - and I was thinking you wanted to write your own extension, so I did not say anything yet.

However, where the information is stored for device driver loads at startup is in the odm class Config_Rules.

AIX starts in three phases:
phase 1: before rootvg is varyon
phase 2: varyon of rootvg
phase 3: rootvg is varyon (and top of /etc/inittab is now active; phase 1 and phase 2 is managed by the script /sbin/rc.boot)

To list the three phases of Config_Rules - coursely
Code:
for i in 1 2 3
do
    opdget -q phase=$i Config_Rules
done

Also study the file /sbin/rc.boot.

Hope this helps - and if so - Enjoy! Smilie
This User Gave Thanks to MichaelFelt For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Update kernel Linux without reboot?!

Hi Is it a way ? When Linux kernel updated that don't want reboot it means without reboot the new kernel performances Thanks (7 Replies)
Discussion started by: mnnn
7 Replies

2. AIX

AIX : Find files ignoring certain file extensions

Hi All, I am scripting a program to find and archive files. There are certain file types that I do not want to archive. Below is the scenario. I have created a lookup file which has details on folders days and file extensions that needs to be ignored I have separated the individual into... (4 Replies)
Discussion started by: kavinmjr
4 Replies

3. Linux

Disable loading kernel modules

Hi, I am running CentOS 6.5 and I want to remove auto loading 8021q and garp modules, but there are no configure files in /etc/modprobe.d define bot modules. I even added both module names to /etc/modprobe.d/blacklist.conf, both of them are still loaded after the reboot. How can I disable... (2 Replies)
Discussion started by: hce
2 Replies

4. Red Hat

Grub is not loading the correct kernel

All I am trying to get RHEL 5.4 to load to the XEN enabled kernel but I am not having much luck. My grub.conf looks like it has 2.6.18-194.11.3.el5xen as the 1st one but when I do a uname -a I get the NON xen enabled kernel. I know I am doing something stupid but if anybody has any... (1 Reply)
Discussion started by: razor3928
1 Replies

5. Solaris

Loading Kernel module at boot

Is there any link/tutorial on loading Solaris kernel modules at boot time?? (0 Replies)
Discussion started by: unisolin
0 Replies

6. Red Hat

Kernel panic after hard reboot and fsck

Could you please help with problem with megaraid controller and Dell PowerEdge 2850, all that I can see on thi screenshot: All drives successfuly passed verifing from LSI controllers (Ctrl+A at startup), also I tried to boot from rescue llive cd and mount all the morrored drives and check... (22 Replies)
Discussion started by: nikkadim
22 Replies

7. UNIX for Dummies Questions & Answers

Script to automatically reboot to newly compiled kernel with fallback

Hi, I'm new here. Just started playing around with kernel compilation. I need a little bit of advice. I'm trying to do a bash script to automatically compile a kernel package and reboot to that new kernel by default, with fallback to the old kernel. So far, I'm getting stuck at the part... (0 Replies)
Discussion started by: tridus_08
0 Replies

8. Red Hat

RHEL5 reboot - error loading shared library

Hi All, I have RHEL 5 installed in my system. Something must has happened because when i reboot the server, it came with many error.. /usr/bin/rhgb-client -- error while loading shared libraries: libpopt.so.0. Can't open shared object files. No such file/directory It finnaly ends with the... (0 Replies)
Discussion started by: c00kie88
0 Replies

9. Linux

problem with kernel module loading

Hi masters, I am new to linux and unix forum and this is my first forum. So please excuse if I am not giving sufficient information. I will give them on request. I have created a bandwidth manager module. I am using a 2.6.9 kernel and in Red Hat 3.4.3 distribution. But when i run make... (1 Reply)
Discussion started by: iamjayanth
1 Replies

10. UNIX for Dummies Questions & Answers

Loading redhat causes system to reboot over and over

Hi folks, I tried to load a copy of redhat from CD to an HP6640C. The system reads the first disk and offers me a choice to use the graphic load or the text load. I selct either one and the system seems to start reading the disk then it reboots. It does not give me any errors and except that... (0 Replies)
Discussion started by: Alkazjazz
0 Replies
Login or Register to Ask a Question