Find the answer to your Linux question:
Results 1 to 8 of 8
hello, 1.Why the system must never be switched off without first shutting it down? 2.How can we shutdown the system using ‘init’? What is the command line for this to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2003
    Posts
    6

    Linux Administration-Shutdown problems


    hello,

    1.Why the system must never be switched off without first shutting it down?

    2.How can we shutdown the system using ‘init’? What is the command line for this to happen

    3.What are the changes to be made to boot the system without network services being activated.

    4.What is the relationship between the scripts kept in ‘/etc/rc.d’ and the run-levels?

    Thanks


    __________________
    regards
    pongsu

  2. #2
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    The quiestion Nr1 i dont understand...Of course the system is not turned of if you dont execute the shutdown command.

    To see how the initcommand and structures are working see man init. But here is a short brief how the runlevels are working in redhat.

    Code:
    # Default runlevel. The runlevels used by RHS are:
    #   0 - halt (Do NOT set initdefault to this)
    #   1 - Single user mode
    #   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
    #   3 - Full multiuser mode
    #   4 - unused
    #   5 - X11
    #   6 - reboot (Do NOT set initdefault to this)
    The /etc/inittab are controling which defaultrunlevels to use and which programs to be started by init. Depending on which runlevel to goto init are using /etc/rc<runlevel>.d/* scripts to shutdown and start services.

    With
    Code:
    chkconfig --list
    You can see which services that are starting i resp runlevel. To disable and enable services use this command
    Code:
    chkconfig --level 0123456 network off to turn off and chkconfig --level 3 network on to turn on
    Regards

    Andutt

  3. #3
    Linux Newbie
    Join Date
    Aug 2001
    Location
    USA, Texas
    Posts
    217

    Re: Linux Administration-Shutdown problems

    Quote Originally Posted by pongsu
    1.Why the system must never be switched off without first shutting it down?
    You should never just power off a system without using the shutdown, reboot, init 0, or init 6 command because you could potentially lose important data.

    From my understanding ... when you save a change to a text file the change is not immediately written to disk. The change is cached ( buffered ) so that they can be written later when the system has more available resources.
    [ [ SykkN alloc ] initWithThePowerTo: destroyYouAll ];
    /* Don\'t make me use it! */

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer
    Join Date
    Jan 2003
    Location
    Lebanon, pa
    Posts
    994
    Sounds like somebodies homework questions.

  6. #5
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Yeah Genlee now that you saying it, it seems obvious....
    Regards

    Andutt

  7. #6
    Linux Newbie
    Join Date
    Aug 2003
    Posts
    113

    Re: Linux Administration-Shutdown problems

    Quote Originally Posted by pongsu
    hello,


    2.How can we shutdown the system using ‘init’? What is the command line for this to happen?
    Answer:

    "man shutdown"

    You'll want to read up on this. Pretty short read actually.

    Example below: (read man shutdown first though)

    Code:
    shutdown -ah now
    JB

  8. #7
    Linux User Allblack's Avatar
    Join Date
    May 2003
    Location
    Godzone
    Posts
    416
    I never used to get homework like that. Probably because I left school before Linux was released
    I am on a journey to mastering Linux and I got a bloody long way to go!!!

  9. #8
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    So.. shutdown before poweroff... well the theory certainly makes sense.
    The best things in life are free.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •