v1
v2
v3
100

You are experiencing a problem with a SysV init network server. You want to bring the system down and try reseating the cards within it before restarting it.

Which command completely shuts down the system in an orderly manner?

a. init 0

b. init 1

c. init 5

what is 

a. init 0

Explanation

On a SysV init system, use the init utility to change runlevels.


Runlevel 0 will shut the system completely down and require a manual reboot.


Runlevel 1 places the system in single-user mode.


Runlevel 5 places the system in the X Windows environment.


Runlevel 6 forces an automatic system reboot.


References

TestOut Linux Pro 5.0 - 4.5 System Shutdown

100

Which system component verifies the hardware and passes control of the computer to the boot loader?

a. Init

b. BIOS

c. OS kernel

d. CMOS

what is 

b. bios

Explanation

The BIOS is responsible for verifying system hardware, reading settings from the CMOS, detecting hardware changes, and passing control of the system to the boot loader.

The boot process for a Linux computer includes the following general stages:

  1. BIOS (in the BIOS stage, BIOS is loaded, and the system hardware is identified).

  2. Boot loader (during the boot loader stage, BIOS gives control to the boot loader program to load the kernel into RAM).

  3. OS Kernel (during the OS kernel stage, the Linux kernel takes over).

  4. Init (during the Init stage, the initial [init or system] process determines which other programs to run, such as a login shell).

References

TestOut Linux Pro 5.0 - 4.1 Linux Boot Process

100

Which component is responsible for loading and executing the initial process?

a. BIOS

b. primary boot loader

c. OS kernel

d. initrd image

what is 

c. OS kernel

Explanation

The OS kernel stage loads and executes the initial (init) process. During this stage, the Linux kernel:

  1. Resides in the /boot directory.

  2. Initializes the hardware on the system.

  3. Locates and loads the initrd script to access the linuxrc program which configures the operating system.

  4. Dismounts and erases the RAM disk image (initrd image).

  5. Looks for new hardware and loads the drivers.

  6. Mounts the root partition.

  7. Loads and executes the initial process (init or systemd).

The BIOS is responsible for verifying system hardware, reading settings from the CMOS, detecting hardware changes, and passing control of the system to the boot loader. The initrd image is used to mount the actual file system and loads the kernel into RAM. The primary boot loader takes one of two actions:

  • Examines the partition table marked as bootable and then loads the boot sector from that partition. This boot sector contains a secondary boot loader, which locates an OS kernel.

  • Locates an OS kernel directly, without using a secondary boot loader.

References

TestOut Linux Pro 5.0 - 4.1 Linux Boot Process

200

You need to shut down the system immediately and send a message to logged in users to allow running processes to close gracefully.

Which of the following is the BEST to use?

a. shutdown -h now

b. shutdown -m now

c. shutdown -hk now

d. shutdown -r

what is

a. shutdown -h now

Use the shutdown -h now command. The -h switch tells the system to halt (turn off). The now keyword means to start the process immediately. Regardless of the switches used, shutdown will notify users and terminate processes gracefully.

You must include a time parameter with the shutdown command, or it will not work. -r reboots the system. -k sends a message that the system will shut down, but does not actually turn off the system (even if -k is used with the -h switch).

References

TestOut Linux Pro 5.0 - 4.5 System Shutdown

200

In which boot process stage is the root partition mounted?

a. OS kernel

b. systemd

c. Boot loader

d. BIOS

what is

a. OS kernel

Explanation

The OS kernel stage mounts the root partition. During this stage, the Linux kernel:


Resides in the /boot directory.


Initializes the hardware on the system.


Locates and loads the initrd script to access the linuxrc program, which configures the operating system.


Dismounts and erases the RAM disk image (initrd image).


Looks for new hardware and loads the drivers.


Mounts the root partition.


Loads and executes the initial process, such as SysV init or systemd on newer Linux distributions.


The boot process for a Linux computer includes the following general stages:


BIOS (in the BIOS stage, BIOS is loaded and the system hardware is identified).


Boot loader (during the boot loader stage, BIOS gives control to the boot loader program to load the kernel into RAM).


OS Kernel (during the OS kernel stage, the Linux kernel takes over).


systemd (during the initial stage, the systemd process determines what other programs to run, such as a login shell or configuration files).


References

TestOut Linux Pro 5.0 - 4.1 Linux Boot Process

200

What is the full path and filename of the GRUB 2 file that is used for editing the default behavior of the bootloader menu? 

a. /

b. /root

c. /etc/default/grub

what is 

c. /etc/default/grub 

Explanation

To modify the default behavior of the boot loader menu used by GRUB 2, you can edit the settings in the /etc/default/grub file. After editing this file, you run the grub2-mkconfig -o /boot/grub2/grub.cfg command to write the changes to the grub.cfg file.

You should not edit the /boot/grub2/grub.cfg file directly.

References

TestOut Linux Pro 5.0 - 4.2 Bootloaders

300

You have just finished installing an updated kernel on your email server that has been patched to solve a security vulnerability and wish to reboot as soon as possible. This is a busy time of day, and you do not want the server down any longer than necessary.

Which option prevents fsck from running after the reboot and allows the system to boot faster?

a. shutdown -k

b. shutdown -F

c. shutdown -f

d. shutdown -h

what is

c. shutdown -f

Explanation

Use the -f option of shutdown to tell the system to skip the fsck (file system check) on reboot, speeding up the reboot time.

The -F option forces fsck to run on reboot. The -h option halts the server. The -k option sends out a warning message to all users (without rebooting).

References

TestOut Linux Pro 5.0 - 4.5 System Shutdown

300

Which of the following has a process ID (PID) of 1?

a. The boot loader

b. The BIOS

c. The initial process

what is

c. The initial process

Explanation

The initial process have the process ID (PID) of 1 because it is the first process to run on the system. On a SysV init Linux system, the name of the initial process is init. On a systemd Linux system, the initial process is named systemd.

The BIOS, boot loader, and OS kernel do not receive PIDs.

References

TestOut Linux Pro 5.0 - 4.1 Linux Boot Process

300

Which directory contains the configuration file for GRUB 2? (Choose two.)

a. /etc/

b. /etc/default/

c. /etc/grub.d/

d. /boot/

e. /boot/grub2/

what is

b. /etc/default/

&

e. boot/grub2/

Explanation

The configuration files for GRUB2 are /boot/grub/grub.cfg or /boot/grub2/grub.cfg (depending upon the distribution). Depending on the distribution, the update-grub or grub2-mkconfig commands generate the /boot/grub2/grub.cfg or /boot/grub/grub.cfg files. Specifically, these commands use the /etc/default/grub file and the scripts in the /etc/grub.d/ directory to generate the /boot/grub2/grub.cfg or /boot/grub/grub.cfg configuration files.

The /etc/grub.d/ directory holds script files that are read when the update-grub or the grub2-mkconfig commands are used.

/boot/ and /etc/ does not contain the GRUB2 configuration file.

References

TestOut Linux Pro 5.0 - 4.2 Bootloaders

400

You have a system with more than one Linux operating system installed. During the system's bootup process, which component loads a splash screen, allowing you to choose which operating system you want to run?

a. The primary boot loader

b. The initial program

c. The secondary boot loader

d. BIOS

what is

c. the secondary boot loader

Explanation

The secondary boot loader provides a splash screen that allows you to choose which operating system you want to load. This occurs in the boot loader stage of the boot process. Specifically, during the boot loader stage, the following steps take place:

  1. BIOS searches the boot sector which contains a Master Boot Record (MBR).

  2. BIOS loads the primary boot loader code from the MBR.

  3. The primary boot loader takes one of two actions:

    • Examines the partition table marked as bootable and then loads the boot sector from that partition. This boot sector contains a secondary boot loader, which locates an OS kernel.

    • Locates an OS kernel directly, without using a secondary boot loader.

  4. When the secondary boot loader is in RAM and executing, a splash screen is commonly displayed, and an optional initial RAM disk, initrd image, is loaded into memory. The initrd image:

    • Has root permissions and can be used to access the actual /root file system regardless of whether it exists on the local computer or an external device. Without the permissions, the computer could not access the file systems without being able to read information that only exists on those file systems.

    • Is used to mount the actual file system and load the kernel into RAM.

  5. With the images ready, the secondary boot loader invokes the kernel image.

The BIOS is responsible for verifying system hardware, reading settings from the CMOS, detecting hardware changes, and passing control of the system to the boot loader. The initial (init or systemd) process is the first process on the Linux system to run. Init determines which other programs to run, such as a SysV init login shell or systemd configuration files.

References

TestOut Linux Pro 5.0 - 4.1 Linux Boot Process

400

You are editing the /etc/default/grub file. Which option should you use to set the default operating system?

a. GRUB_DEFAULT=

b. GRUB_SAVEDEFAULT=

c. GRUB_TIMEOUT=

what is

a. GRUB_DEFAULT

Explanation

The GRUB_DEFAULT option sets the default menu entry (operating system) in the /etc/default/grub file. Typical GRUB_DEFAULT entries include:

  • Numeric (0, 1, 2, etc.)

  • Complete menu entry quotation ("Ubuntu, Linux 2.6.31-9-generic")

References

TestOut Linux Pro 5.0 - 4.2 Bootloaders

400

If an attacker boots into single user mode, they are logged in automatically as the root user without being required to enter the root password. 

Which of the following is the BEST measure should you take to prevent this event from happening?

a. Change the file and directory permission of /boot to only allow root access.

b. Set a bootloader password.

c. Encrypt the /boot partition.

d. Encrypt the root user's password with md5crypt.

what is 

b. Set a bootloader password. 

Explanation

Setting a bootloader password will prevent a non-root user from changing the boot menu.


The other options will not prevent a user from changing the boot menu.


References

TestOut Linux Pro 5.0 - 4.2 Bootloaders

500

You have GRUB2 installed on your Linux workstation. You need to make changes to the boot menu.

Which files and scripts can you edit to modify the menu entries and behavior of the boot menu? (Select TWO.)

a. /etc/lilo.conf

b. /etc/default/grub

c. /boot/grub.conf

d. /etc/grub.d/40_custom

what is

b. /etc/default/grub

&

d. /etc/grub.d/40_custom

Explanation

You should never edit /boot/grub2/grub.cfg directly. You can make changes to /etc/default/grub and to the scripts in the /etc/grub.d directory. After making changes to these files and scripts, you write the changes to /boot/grub2/grub.cfg with the grub2-mkconfig -o /boot/grub2/grub.cfg command.


References

TestOut Linux Pro 5.0 - 4.2 Bootloaders

500

DOUBLE JEOPARDY
Which of the following commands will help you to determine which version of GRUB is installed on your Linux system?

a. update-grub

b. grub-install -v

c. grub2-install --version

d. grub1.98-install -V

what is

b. grub-install -v

&

c. grub2-install --version

Explanation

Use the grub-install -v command for GRUB Legacy versions and the grub2-install --version command for GRUB 2 versions to determine which version is installed. GRUB 2 is any version of GRUB 1.98 or later.

References

TestOut Linux Pro 5.0 - 4.2 Bootloaders

500

If a systemd system is configured to use multi-user.target as the default boot target, which file has a symbolic link (symlink) to the multi-user.target file?

a. /etc/systemd/system/multi-user.target

b. /etc/systemd/system/default.target

c. /usr/lib/systemd/system/multi-user.target

d. /etc/inittab

what is

b. /etc/systemd/system/default.target

Explanation

The default boot target is configured by creating a symbolic link, or symlink, from the /etc/systemd/system/default.target file to the desired target file. The target files are all found in the /usr/lib/systemd/system directory.

For example, when you enter the command systemctl set-default graphical.target, the system creates a symlink from the /etc/systemd/system/default.target file to the /usr/lib/systemd/system/graphical.target file.

References

TestOut Linux Pro 5.0 - 4.3 systemd Boot Targets