Bootup Options

Booting up is a process through which the operating system is loaded into the computer's main memory or random access memory (RAM). The boot-up process starts when you turn on your computer. During this process, the BIOS takes control of your computer and decides where to look for software on the computer and in which order. Based on the BIOS settings of your computer, it is decided whether your computer will first check the hard disk or a floppy disc, CD, DVD or flash memory to start the booting-up process. In case you have multiple operating systems installed on your computer, the BIOS configuration decides which operating system will be loaded first at boot-up.

Only after all system files have been loaded into the main memory, is the operating system given control of the computer. The operating system performs the requested initial commands and then waits for the first interactive user input.

However, as a superuser or user with administrative privileges, it is possible for you to change the boot-up configuration to define the computer's boot order, change the default operating system to boot-up or make a system command run automatically at boot-up.

One way to change or check your BIOS setting is to restart your computer, and press a key to enter the setup function before it starts to load any operating system. Generally, you can do this by pressing F1, F2, ESC or DELETE. Once you are inside the BIOS setup, you can make the desired changes by following the instructions for using the setup. However, you need to be very cautious when making any changes in the BIOS settings because a wrong setting can prevent your computer from booting-up properly.

You can also perform these configuration changes by using a command line on your computer's terminal.

11.3.1 Running a System Command Automatically at Start-Up

At times, you may wish to add a custom command for the start-up process so that your computer executes this command every time it boots up. To run a system command automatically at start-up:

1. On the Terminal, type the following command to open the rc.local file:

$ sudo nano /etc/rc.local

lai ^■imisffiRnEflnsmmsffiRnEmBnsiflfflHi^H

QSB

File Edit View Terminal Tabs Help

charleswindï[email protected]:-î cat newbackup

Figure 11.20: Terminal Window

The rc.local file contains a script that is executed after all the other initial scripts. You can insert your own initialisation scripts in this file if you want some services to be executed automatically during the start-up process.

2. The rc.local file opens in the Terminal window. Type the command that you want to run at system start-up before the line, exit 0.

$ date > /home/oem/newbackup

Eijij/JaaijlijiJau/^'iijrlaaulijdanr-iJyal-tijp:

File Edit View Terminal Tabs Help

GNU nano 2.0.6

File: /etc/rc.local

# rc.local

# This script 15 executed at the end of each multiuser runlevel.

# Hake sure that the script will "exit 0" on success or any other

# value on error.

# In order to enable or disable this script just change the execution

# Rv default this srrint does nothing.

# By default this script does S |date ¡- /home/oem/newbackup|

exiTTT

Get Help

ffi WriteOut

Read File g

j Prev Page j

S Cut Text ¡

I Exit

] Justify

B Where Is ¡

J Next Page |

J UnCut TextE

Figure 11.21: Making Settings for rc.local File 3. After you enter the command you want executed at system start-up, press CTRL+X to save and exit the edited file.

Applications Places System I ->! ^

charleswlndsor , gl sat 20 Oct. 6:59 PM 0

Figure 11.22: Services Window charleswlndsor , gl sat 20 Oct. 6:59 PM 0

Applications Places System I ->! ^

fJl| ;; | [Lll_Partitioning_an,.~ |[ ^ [charleswind

Figure 11.22: Services Window

4. When you reboot the system, the rc.local file executes. If you want to display the output of the above command, type the following command in the Terminal:

$ cat newbackup

The following image shows the output of the above command:

11.3.2 Changing the Default Operating System at Boot

When multiple operating systems are installed on a computer, this is referred to as a multi-boot configuration. Typically, the operating system that is listed on top in the configuration file is loaded on the computer. To choose the operating system that starts when you turn on your computer, edit the grub configuration file.

1. Back up the configuration file, and open it in a text editor, as follows:

Replace this line with the following line: default X

Replace X with a number based on the order in which your operating systems appear in the configuration file. You should start counting from 0. For example, if you wish the default operating system to be the first in the list, replace X with 0; and if you wish the default operating system to be the second in the list, replace X with 1.

3. Point to saved and save default to reboot the last OS chosen.

$ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup $ sudo gedit /boot/grub/menu.lst

2. Find the line written below to change the default sequence:

default 0

11.3.3 Configuring Start-Up Services

When Ubuntu starts up, many services are started for your convenience. Some services are mandatory for Ubuntu to work properly on your computer. Others can include services that you'll probably never need or want, either because you just do not want them (for example, ntpdate, which sets your system time from a time server) or you simply don't have the device (for example, the HP printing and scanning system, which is of no use if you don't own a HP device).

Although these services are harmless, they increase your computer's start-up time. By de-activating some of these services, you should get a slightly faster start-up time.

Caution:

Read the service information before you disable any service because disabling some services may stop your system from booting-up or running properly.

To configure the start-up services, you need to have administrative privileges. Then, perform the following steps:

1. On the System menu, point to Administration and then click Services.

2. Type your administrative password. The Services settings window opens.

3. Select the services you want running by selecting or clearing the respective check boxes and click OK.

Figure 11.23: Services Settings Window

Instructor Notes:

If you want greater control over the boot-up services, install Boot-up Manager (bum). You can install bum from the Universe repository. You need to click the System menu, point to Administration and click Boot-up Manager.

Was this article helpful?

0 0

Post a comment