This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

to remove "INIT: entering runlevel 5 "

Hello Linux champs,


Customer is getting the unwanted log of file system ""INIT: entering runlevel 5" when booting. What should they do to remove this log?


They are getting the unwanted log of File system on screen during boot up "INIT: entering runlevel 5"
and are unable to remove it. Could you give some suggestion on this problem?


Best Regards

Feroz

  • K Md Feroz Irfan said:

    Customer is getting the unwanted log of file system ""INIT: entering runlevel 5" when booting. What should they do to remove this log?

    Which filesystem?

    You should check the init scripts in /etc/init.d to locate the script that prints this (or similar) string(s); edit the scrips and comment/ remove/ put in a conditional depending upon the need.

    If you want to go logically, look for start-up script - usually /etc/inittab. This message would be getting printed from within the script that corresponds to runlevel 5.

  • Hello Sanjeev,

     

    Thank you. 

     

    It is 3rd party provided file system given to customer. Their engineer has solved this problem apprently - similar to your suggested process:

     
    Please have a try as below:
     
    Hardware: Devkit8000
    Software:  Devkit8000 Linux
     
    After getting into file system, please modify below two files:
     
    1.
    vi /etc/inittab
        # 1:2345:respawn:/sbin/getty 38400 tty1

    2.
    vi /etc/init.d/banner
    # "Please wait: booting..." > $vtmaster
    Best Regards,
    Feroz

  • Hello Folks,

     

    The cusotmer has come back saying he already has the changes suggested by our 3rd party in above post and that does not solve the issue.

     

    Could you please recheck and advise on the fix?

     

    Thanks

     

    Best Regards

    Feroz 

  • Feroze,

    Without having file-system to look at I can only suggest to look for the string in start-up scripts and comment all occurrences of the same.

  • Forgot to mention:

    You may want to look the the sources used to build the "init" of the filesystem being generated.

    It could be a 'debug' string in the sources that would required to be removed while building the filesystem itself.

  • I realize this question is marked as "Answered" but thought further information might be of value to anyone searching on how to eradicate all INIT console messages. 

    My approach was to modify the sysvinit-2.86 sources. In particular, sysvinit-2.86/src/init.c. The source builds the message strings throughout, so searching for exact string matches won't result in any matches.

    The function 'initlog' contains the code for printing to the console window. 
    void initlog(int loglevel, char *s, ...){  //line  740

    If you want to completely remove all print output from sysvinit, gut this function of that functionality. 

    Otherwise, the more surgical approach would be finding the specific function calls for specific text and modifying the loglevel so the message is not sent to console.

    Taken from line 87 of sysvinit-2.86/src/init.h
    /* Log levels. */
    #define L_CO    1               /* Log on the console. */
    #define L_SY    2               /* Log with syslog() */
    #define L_VB    (L_CO|L_SY)     /* Log with both. */

     

    Here are the locations of the relevant initlog calls in sysvinit-2.86/src/init.c

    initlog(L_CO, bootmsg, "booting"); //line 2426

    initlog(L_VB,"Entering runlevel: %c", runlevel); //line 2225

     

    Lucas