[ Pobierz całość w formacie PDF ]
.delay = 60# Name of the boot loader.No reason to modify this unless you re# doing some serious hacking on LILO.install = /boot/boot.b# This forces LILO to prompt you for the OS you want to boot.# A  TAB key at the LILO: prompt will display a list of the OSs# available to boot according to the names given in the  label=# directives below.prompt# Have LILO perform some optimization.compact# Stanza for Linux root partition on /dev/hda1.image = /vmlinuz # Location of kernel 4.3.Shutting down.191label = linux # Name of OS (for the LILO boot menu)root = /dev/hda1 # Location of root partitionread-only # Mount read only# Stanza for MSDOS partition on /dev/hda2.other = /dev/hda2 # Location of partitiontable = /dev/hda # Location of partition table for /dev/hda2label = msdos # Name of OS (for boot menu)The first operating system stanza is the default operating system for LILO to boot.Alsonote that if you use the  root = line, above, there s no reason to use rdev to set theroot partition in the kernel image.LILO sets it at boot time.The Microsoft Windows  95 installer will overwrite the LILO boot manager.If youare going to install Windows  95 on your system after installing LILO, make sure to createa boot disk first (see Section 4.2).With the boot disk, you can boot Linux and re-installLILO after the Windows  95 installation is completed.This is done simply by typing, asroot, the command/sbin/lilo, as in the step above.Partitions with Windows  95 canbe configured to boot with LILO using the samelilo.confentries that are used to bootthe MS-DOS partition.The Linux FAQ (see Appendix A) provides more information on LILO, including howto use LILO to boot with the OS/2 Boot Manager.4.3 Shutting down.Shutting down a Linux system can be tricky.You should never simply turn off thepower or press the reset switch.The kernel keeps track of the disk read/write data inmemory buffers.If you reboot the system without giving the kernel a chance to write itsbuffers to disk, you can corrupt the file systems.Other precautions are taken during shutdown as well.All processes are sent a signalthat allows them to die gracefully (by first writing and closing all files, for example).Filesystems are unmounted for safety.If you wish, the system can also alert users that thesystem is going down and give them a chance to log off.The easiest way to shut down is with the shutdown command.The format of thecommand isshutdown time warning-messageThe time argument is the time to shut down the system (in the format hh:mm:ss), and 192 System Administrationwarning-message is a message displayed on all user s terminals before shutdown.Alter-nately, you can specify the time as  now , to shut down immediately.The-roption maybe given toshutdownto reboot the system after shutting down.For example, to shut down and reboot the system at 8:00 pm, use the command# shutdown -r 20:00The commandhaltmay be used to force an immediate shutdown without any warningmessages or grace period.haltis useful if you re the only one using the system and wantto shut down and turn off the machine.3 Don t turn off the power or reboot the system until you see the message:The system is haltedIt is very important that you shut down the system,  cleanly, using the shutdown orhalt command.On some systems, pressing Ctrl - Alt - Del will be trapped andcause a shutdown.On other systems, using the  Vulcan nerve pinch will reboot thesystem immediately and cause disaster.4.3.1 The/etc/inittabfile.Immediately after Linux boots and the kernel mounts the root file system, the firstprogram that the system executes is init.This program is responsible for starting thesystem startup scripts, and modifies the system operatiing from its initial boot-up state toits standard, multiuser state.initalso spawns thelogin:shells for all of the tty deviceson the system, and specifies other startup and shutdown procedures.After startup, init remains quietly in the background, monitoring and if necessaryaltering the running state of the system.There are many details that theinitprogram mustsee to.These tasks are defined in the/etc/inittabfile.A sample/etc/inittabfile is shown below.3 Modifying the /etc/inittab file incorrectly can prevent you from logging in toyour system.At the very least, when changing the /etc/inittab file, keep on handa copy of the original, correct file, and a boot/root emergency floppy in case you make amistake.## inittabThis file describes how the INIT process should set up# the system in a certain run-level. The/etc/inittabFile 193## Version: @(#)inittab 2.04 17/05/93 MvS# 2.10 02/10/95 PV## Author:Miquel van Smoorenburg,# Modified by: Patrick J.Volkerding,# Minor modifications by:# Robert Kiesling,## Default runlevel.id:3:initdefault:# System initialization (runs when system boots).si:S:sysinit:/etc/rc.d/rc.S# Script to run when going single user (runlevel 1).su:1S:wait:/etc/rc.d/rc.K# Script to run when going multi user.rc:23456:wait:/etc/rc.d/rc.M# What to do at Ctrl-Alt-Delca::ctrlaltdel:/sbin/shutdown -t5 -rfn now# Runlevel 0 halts the system.l0:0:wait:/etc/rc.d/rc.0# Runlevel 6 reboots the system.l6:6:wait:/etc/rc.d/rc.6# What to do when power fails (shutdown to single user).pf::powerfail:/sbin/shutdown -f +5 "THE POWER IS FAILING"# If power is back before shutdown, cancel the running shutdown.pg:0123456:powerokwait:/sbin/shutdown -c "THE POWER IS BACK"# If power comes back in single user mode, return to multi user mode.ps:S:powerokwait:/sbin/init 5 194 System Administration# The getties in multi user mode on consoles an serial lines.## NOTE NOTE NOTE adjust this to your getty or you will not be# able to login !!## Note: for  agetty you use linespeed, line.# for  getty_ps you use line, linespeed and also use  gettydefsc1:1235:respawn:/sbin/agetty 38400 tty1 linuxc2:1235:respawn:/sbin/agetty 38400 tty2 linuxc3:1235:respawn:/sbin/agetty 38400 tty3 linuxc4:1235:respawn:/sbin/agetty 38400 tty4 linuxc5:1235:respawn:/sbin/agetty 38400 tty5 linuxc6:12345:respawn:/sbin/agetty 38400 tty6 linux# Serial lines# s1:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100s2:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100# Dialup linesd1:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS0 vt100#d2:12345:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS1 vt100# Runlevel 4 used to be for an X-window only system, until we discovered# that it throws init into a loop that keeps your load avg at least 1 all# the time.Thus, there is now one getty opened on tty6.Hopefully no one# will notice.;Æ)# It might not be bad to have one text console anyway, in case something# happens to X.x1:4:wait:/etc/rc.d/rc.4# End of /etc/inittabAt startup, this /etc/inittab starts six virtual consoles, a login: prompt onthe modem attached to /dev/ttyS0, and a login: prompt on a character terminalconnected via a RS-232 serial line to/dev/ttyS1.Briefly, initsteps through a series of run levels, which correspond to various oper-ationing states of the system.Run level 1 is entered immediately after the system boots, The/etc/inittabFile 195run levels 2 and 3 are the normal, multiuser operation modes of the system, run level 4starts the X Window System via the X display managerxdm, and run level 6 reboots thesystem [ Pobierz caÅ‚ość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • szamanka888.keep.pl