Enter kernel to boot
Here the boot program is asking you which file on the disk contains the UNIX kernel program youwant to run. Usually this file is called UNIX and is located in the root device. But you can haveany other filename which you want to use to start up. Typically this is done because you haveconfigured a somewhat different kernel tuned to be useful in different situations. Then you canspecify that filename. Sometimes the kernel is assumed to be in UNIX and you have to takespecial action if you want to boot from a different kernel.You do not always need to be starting up UNIX. There will be ways in which you can start upsome special program, for example, a diagnostic utility to check out the hardware. You will needto refer to your system's documentation for learning how to do this. In fact, on many systems, youwill have to be specifying where the kernel program resides, apart from giving its name. Thisallows you to boot from a different physical disk if the usual one has malfunctioned. Thesematters again are highly system dependent.After telling the system which kernel is to be loaded, the machine starts running that kernel andfirst brings you to a system state known as the single user state. In this state only one user canbe working on the machine and only the console is active. No multi user capability will exist at thistime. The person at the console will be super user and will have all the powers of one. Ibis modeis also called system maintenance mode because it is only in this state that some system actionscan be performed.It is usually in this state that the system administrator sets the system date. Usually the date ismaintained with the help of a real time clock which derives its power from a battery so that it doesnot lose its information even if the power is switched off. Thus the date information shouldnormally be correct even if you are starting up the system after a prolonged shutdown. However,if there is some error in the date, it can be set now. It is a good idea not to set the system datewhen it is in multi-user mode because many UNIX utilities can get confused if the date changesmidway. In the single user state you are sure that nobody else is working. You have already seenthat the date command without any arguments displays the current system date. To set the date,say
# date 950328104533
where the first two digits are the year, the next two are the month, the next two the day in themonth, followed by the time in hours, minutes and seconds. There are some variations to theformat in which the date can be set, so please do refer to your documentation.You are now ready to enter multi-user state. The ion from one state to another is achieved byrunning a program called init. This provides for 7 run levels from 0 to 6, and an s or S state for single user mode. The main multi-user mode is level 2, and so when the system asks you
# Enter new run level
you should enter 2 to reach normal multi-user mode. To see what the other levels mean, you canrefer to the documentation. Run level 0 is the down state and readies the machine for poweringoff. The who command with the -r option tells you the current run level of your system, as youhave seen in the second unit.The devices and users available in each run level are controlled by a file called /etc/inittab and italso specifies what action is to be taken when a run level is entered. For example if you want toenable a new terminal, say ttyO6 (assuming the hardware is available), you have to make anentry in the inittab file. Similarly you can disable a terminal serial port even if it is physicallyconnected, by making a change in the inittab file. On some versions of UNIX there will be frontend utilities to enable you to do these things easily.