Avstenging/Omstart Introduksjon _L_i_n_u_x er et fleroppgavekjørende/flerbruker operativsystem. Å bare skru "av" pc'en når du er ferdig med den er ikke akseptabelt hvis man er ute etter pålitelig drift. Dette gjelder selv om du er den eneste brukeren, og maskinen ikke er koblet til noe nettverk. Det er flere forskjellige måter å stenge ned eller starte om en linux maskin, lin­ uxconf har en menydrevet versjon. 11.. PPrriinncciipplleess Selv på en alenestående (ikke nettverk) enbruker _L_i_n_u_x arbeidsstasjon, skjer det forskjellige ting i bakgrunnen. Å bare skru datamaskinen av kan avbryte viktige operajoner og etterlate datamaskinen i en problematisk tilstand (eller i det undersystemene). Å skru av datamaskinen kan forårsake problemer, men vil i de fleste tilfeller ikke gjøre det. Det hele kommer an på hva som skjer i det øyeblikk strømmen fjernes. Her er en liten liste: · Some editors or office applications are running in different windows or virtual consoles. Unless you tell them, they won't save the current document. · You have just saved a large document. Linux has not yet written the document to disk even if the editor was told that the document was saved. This _w_r_i_t_e _b_e_h_i_n_d facility greatly enhances disk performance at some price: turn the computer off at an improper time and you may lose data. · Some databases are updated by a cron job: Turning the computer off may leave the databases unusable. 22.. TThhee ddiiaalloogg Here is a description of each field of the dialog. 22..11.. RReebboooott oorr sshhuuttddoowwnn A radio button lets you select between a reboot or a shutdown. A shutdown performs the same operations as reboot except that it brings the machine to a complete endless stop. The only alternative left after that is to turn off the power or use the reset button to restart it. A reboot will end all of the processes, but once all of them are shut down, will launch the startup sequence again. 22..22.. DDeellaayy bbeeffoorree sshhuuttddoowwnn On a multi-user system or a server, it may be wise to give people some time to finish their current task before shutting down the computer. If you just want to shutdown or reboot _N_O_W, then enter 0 here. The number is the amount of minutes between the message broadcast and the effective shutdown. 22..33.. MMeessssaaggee Currently the shutdown feature of _L_i_n_u_x can send a message (a small explanation) on terminals. It is expected that this message will be sent to users of other services (samba for one). Place whatever you want broadcast here including nothing. It is simply written to the tty of every user currently logged in. 33.. AAlltteerrnnaattiivveess ttoo tthhiiss ddiiaalloogg There are different ways to shutdown or reboot a linux computer. All are front-ends to the /sbin/shutdown command (This is also true for _L_i_n_u_x_c_o_n_f). 33..11.. ccttrrll--aalltt--ddeell Depress those three magic keys on the console keyboard to reboot your system. This is controlled by /sbin/init and the file /etc/inittab. 33..22.. //ssbbiinn//rreebboooott /sbin/reboot is an alias (indeed a symlink) for /sbin/shutdown -r NOW. 33..33.. //ssbbiinn//hhaalltt /sbin/halt is an alias (also a symlink) for /sbin/shutdown -h NOW. 44.. AAuuttoo ffiillee ssyysstteemm cchheecckk Once the shutdown is done properly, all file systems are unmounted (umount'ed in fact). The root file system is placed in read-only mode. For each file system including the root, a _c_l_e_a_n flag is set. This flag is checked for each file system at next boot to decide if it needs a thorough check before completing the boot process. This insures that at least the structure of the file systems is usable after a hard crash (power failure for one). It does not protect from data loss: A clean shutdown is always a good thing.