202: System Startup (Practice)

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

D. Run grub-install after verifying that grub.conf is correct.

A GRUB boot loader installed in the MBR was accidentally overwritten. After booting with a rescue CD-ROM, how can the lost GRUB first stage loader be recovered? A. Use dd to restore a previous backup of the MBR B. Install LILO since there is no easy way to recover GRUB C. Running mformat will create a new MBR and fix GRUB using info from grub.conf D. Run grub-install after verifying that grub.conf is correct. E. Run fdisk --mbr /dev/had assuming that the boot harddisk is /dev/hda.

A. init=/bin/bash

A Linux machine freezes during boot. To boot directly to a shell prompt so that editing of files and manual starting of services is possible which command line must be passed to the kernel for the boot process? A. init=/bin/bash B. 1 C. runlevel=1 D. sh E. /bin/sh

D. telinit 3

A Linux server is running in single user mode, but the problem that existed before is now fixed. What command is most appropriate to restore the server to service? A. reboot B. telinit 2 C. shutdown -r now D. telinit 3 E. shutdown -h now

D. mount -a

A machine is running in single user mode and, as such, not all file-systems are accessible. What command must be run to make all of the other file-systems listed in /etc/fstab accessible? A. mount --all B. mountfs --all C. mountfs -a D. mount -a

linux 1

After a crash, the system needs to be booted into runlevel 1. Which option(s) must be typed at the LILO prompt to achieve this, assuming that the working kernel image is called 'linux'?

B. In the boot loader configuration file

After changing the default runlevel in the init configuration file, the system boots in a different than the intended runlevel. Where else could be this different runlevel be defined? A. Nowhere. The init configuration file wasn't properly modified B. In the boot loader configuration file C. In /etc/ runlevel under default D. In the initrd image file E. In the /etc/rc.d/rc.local file

D. A corresponding link was not created in /etc/rc2.d

An administrator has placed an executable in the directory /etc/init.d, however it is not being executed when the system boots into runlevel 2. What is the most likely cause of this? A. The script has not been declared in /etc/services B. runlevel 2 is not declared in /etc/inittab C. The script has the permissions 700 and is owned by root D. A corresponding link was not created in /etc/rc2.d

/etc/inittab

Configuration of X is complete and now the default runlevel can be changed from runlevel 3 to runlevel 5. In which of the following configuration files should this be done?

mount /dev/fd0

Consider the following /etc/fstab file: /dev/hda1 swap swap defaults 0 0 /dev/hda2 / ext2 defaults 1 1 /dev/hda3 /home ext2 defaults 1 2 none /proc proc defaults 0 0 /dev/fd0 /media/floppy vfat user,noauto 0 0 What command can an ordinary (non-root) user use to mount a floppy disk in this system? (Please enter the command with all parameters and/or options)

C. Hardware initialization and setup

During which stage of the boot process would this message be seen? Ide0: BM-DMA at 0xff00-0xff07, BIOS settings: hda:DMA, hdb:DMA A. Boot loader start and hand off to kernel B. Kernel loading C. Hardware initialization and setup D. Daemon initialization and setup

D. Kernel loading.

During which stage of the boot process would this message be seen? ide_setup: hdc=ide-scsi A. Daemon initialization and setup. B. Boot loader start and hand off to kernel. C. Hardware initializiation and setup. D. Kernel loading.

#!/bin/sh

For interpreting system rc scripts a shell is most commonly used. Please enter the first line found in such scripts.

A. ssh-keygen -t dsa

In order to generate a pair of asymmetric keys to use during an SSH connection, please choose the correct command to use? A. ssh-keygen -t dsa B. ssh-agent C. sshd D. ssh-agent -t dsa E. ssh-keyscan -t dsa

D. update-rc.d apache2 remove

On a Debian based system, which command can be used to stop the apache2 init script from running at boot time once the real script has been removed from /etc/init.d/? A. update-rc.d -d apache2 B. update-rc.d apache2 delete C. update-rc.d remove apache2 D. update-rc.d apache2 remove E. update-rc.d delete apache2

D. /usr

On a system with separate partitions for /, /usr, /var, /tmp, which filesystem[s] can safely be mounted readonly? A. /var, /usr B. /var C. /usr, /, /tmp D. /usr E. /tmp

/etc/inittab

Please enter the complete path to the main init process configuration file.

C. The administrator reboots the system and tells the kernel, through the boot loader prompt, to use /bin/bash as the initial process.

The Linux kernel is loaded successfully by the boot loader. However, straight after the kernel mounts the root filesystem, the boot process stops and an error message regarding init is shown. Which of the following actions is the best one to be used in order to identify and fix the problem? A. The administrator reboots the system with a recovery disk and checks the root file system for errors with fsck. B. The administrator reboots the system with a recovery disk and restores from a backup. C. The administrator reboots the system and tells the kernel, through the boot loader prompt, to use /bin/bash as the initial process. D. The administrator reboots the system with a recovery disk and installs a new kernel. E. The administrator reboots the system and tells init, through the boot loader prompt, to use a different runlevel.

E. shutdown -F -r now

What command is used to force a file-system check, when rebooting? A. reboot-f B. shutdown -f now C. shutdown -c -r now D. fsck -r E. shutdown -F -r now

A. It first reads and executes commands in /etc/bashrc and then does the same for /etc/profile.

When bash is invoked as an interactive login shell, which of the following sentences is true? A. It first reads and executes commands in /etc/bashrc and then does the same for /etc/profile. B. It ignores /etc/profile and only reads and executes commands in ~/.bashrc. C. It first reads and executes commands in /etc/profile and then does the same for ~/.bash_profile, ~/. bash_login and ~/.profile. D. It first reads and executes commands in /etc/profile and then does same for ~/.bash_profile and ~/.bashrc. E. It reads and executes commands in ~/.bashrc only if /etc/profile or another initialisation script calls it.

/etc/init.d/sshd

When using SysV init system, the file /etc/rc3.d/S55sshd is a symbolic link. Type the full path and file name to which this is linked.

A. In the master boot record

Where should the LILO code reside, on a system with only one installation of Linux and no other operating systems? A. In the master boot record B. In the boot sector C. In the /boot directory D. At the start of the kernel

A. gzip D. cpio

Which *TWO* archiving formats are used to create an initramfs image? A. gzip B. tar C. rar D. cpio E. bzip2

chkconfig --list ldap

Which chkconfig command will display whether or not the service ldap is configured to start in each runlevel? (Provide the command and any options or parameters)

update-rc.d

Which command will prevent the service ldap from starting on a Debian system in all runlevels, forcing the removal of all symlinks in /etc/rcX.d? (Provide the command without any options or parameters)

-p

Which e2fsck option is used to automatically repair an ext2 filesystem?

initdefault

Which keyword is used in the /etc/inittab file to define the default system runlevel?

C. ldconfig /usr/local/lib

Which of these commands allows you to use shared libraries that are in /usr/local/lib? A. export LD_PRELOAD=/usr/local/lib B. export LD_LIBRARY_PATH=/usr/local/lib C. ldconfig /usr/local/lib D. ldd /usr/local/lib

-d

Which option, when passed to the hostname command, will return the name of the DNS domain? (Provide only the option)

A. Because if problems with the root file system are detected during the boot, fsck can be run, without risk of damage.

Why is the root file system mounted read-only during boot and remounted with write permission later on? A. Because if problems with the root file system are detected during the boot, fsck can be run, without risk of damage. B. Because this way crackers cannot collect information about root with boot sniffers C. To avoid writing to the disk, unless the root password is known. D. To avoid other operating systems overwriting the Linux root partition E. Because the disk has its own write protection that cannot change by the operating system.

linux s

You have configured a workstation to boot in runlevel 4, but you now find that the X server will not start correctly and the machine will not allow local access. What would be the most effective command to run at the LILO prompt to regain local access to the machine, when the last known working kernel image was linux?

C. Issue the /etc/init.d/autofs reload command

You have elected to use the automounter and the autofs script. Your /etc/auto.master file contains the following: /home /etc/auto.home /project /etc/auto.project /data yp:data.map If you change the contents of /etc/auto.project to include a new source path what must be done to access the new path? A. Shutdown and restart the local NFS client daemons B. Run fsck on the affected mount point C. Issue the /etc/init.d/autofs reload command D. Add the newly mapped path to/etc/fstab E. Nothing Simply access the newly mapped resource

B. chmod 700 /usr/local/bin/startup.sh; cd/etc/init.d/rc3.d/; ln -s /usr/local/bin/startup.sh S99startup.sh

You have written a little startup script (/usr/local/bin/startup.sh) that should automatically execute when entering runlevel 3. According to the standards, how can this best be achieved? A. chmod 700 /usr/local/bin/startup.sh; cd/etc/init.d/rc3.d/; ln -s /user/local/bin/startup.sh B. chmod 700 /usr/local/bin/startup.sh; cd/etc/init.d/rc3.d/; ln -s /usr/local/bin/startup.sh S99startup.sh C. chmod 700 /usr/local/bin/startup.sh; cd/etc/init.d/rc3.d/; ln /user/local/bin/startup.sh D. chmod 700 /usr/local/bin/startup.sh; cd/etc/init.d/rc3.d/; ln -s /user/local/bin/startup.sh /usr/locl/bin/startup.sh E. chmod 700 /usr/local/bin/startup.sh; cp /user/local/bin/startup.sh /etc/init.d/rc3.d/S99Startup.sh


Ensembles d'études connexes

Homework: ASSESS Chapter 6 Homework

View Set

Exam 1 Review (old HW & Quizzes)

View Set

Exs455 Final Study GuideWhich of the following is NOT an example of an instrumental ADL (IADL)?

View Set

foundations Ch. 28: Medications PrepU, foundations med. administration powerpoint 211, foundations CH 28 medications course point

View Set

Splunk Enterprise/Cloud Admin(SV)

View Set

Chapter 14: Nervous System - Spinal Cord and Spinal Nerves

View Set