Sec. 39. System INIT Flashcards
What is the first user-level process/task run on the system?
/sbin/init
where is the int file located ?
/sbin/int
init works with the kernel to clean up processes
when they have ____________.
ended/terminate
init _____________ the later stages of the boot process .
coordinates
what are two startup alternatives?
- Upstart
- systemd
Instead of bash scripts, systemd uses _____________.
.service files.
systemd
Swap units
Swap units,
are very similar to mount units and encapsulate memory swap partitions or files of the operating system.
the _____ program is emutated to work with runlevels .
telinit
systemd
socket units
Socket units,
which encapsulate local IPC or network sockets in the system, useful for socket-based activation.
Name some features of systemd and session manager:
- boots faster than previous init systems
- provides aggressive parallelizationcapabilities
- uses socket and D-bus activation for starting services
- Replaces shell script with programs
- Offers on-demand starting of deamons
- keeps tracks of processes using cgroups
- Maintains mount and automount points
Systemd sorts all ________ into their own Linux cgroups(control groups)
deamons
systemd
device units
Device units,
expose kernel devices in systemd and may be used to implement device-based activation.
systemd
Path units
Path units,
may be used to ativate other services when file system objects change or are modified.
With systemd what is the main utility for managing services?
systemctl
systemd
Target units
Target unit ,
are useful to group units, or provide well-known synchronization points furing boot-up
systemd
Slice units
Slice units,
may be used to group units which mange system processes in a hierarchical tree for resource management purposes.
what is the syntax of the systemctl command ?
systemctl [options] command [name]
How would I see/show the status of everything that systemctl controls?
$ systemctl
If I wanted to show all available services using systemctl what would
I do?
$ systemctl list-units -t service –all
systemd
timer units
Timer units,
are useful for triggering avtivation of other units based on timers .
systemctl
- systemctl —control the systemd system and service manager
- syntax—– systemctl [options] command [unit …]
- discription:
- –systemctl may be used to introspect and control the state fo the “systemd” system and service manager
list-units for systemctl
-
list-units
- list units that systemd currently has in memory.
- This includes units that are either referenced directly or through a dependency.
define runlevel 1
single user mode
list-sockets for systemctl
- list-sockets
- List socket unite currntly in memory, ordered by listening address.
- If one or more PATTERNs are specified only the socket units matching one of them are shown.
systemd
Service units
Service unit ,
which start and control daemons and processes they consist of .
SysV
telinit
-change SysV runlevel
define runlevel 0
shutdown the system adn turn power off
telinit Description
- Description:
- telinit may be used to change SysV system runlevel. since the concept of SysV runlevels is obsolete the runlevel requests will be transparnently translated into systemd unit activation requests.
wall
- Name:
- wall - write a message to all users
- Synopsis:
- wall [-n] [-t timeout] [-g group] [message \ file]
- Description:
- wall displays a message , or the contents of a file, or otherwise its standard input, o the terminals of all cuurntly logged inusers.
describe the effect of the option list-timers for the command systemctl
list-timers option will list timer units currently in memory, ordered by the time they elapse next.
-
Understanding output:
- NEXT - shows the next time the timer will run
- LEFT - shows how long till the next time the timer runs
- LAST - show the last time the timer ran
- PASSED - show how long has passsed since the timer last ran
- UNIT - shows teh name of the timer
- ACTIVATES - shows the name the service the tmer activates when it runs
loginctl
- Name:
- loginctl - Control the systemd login manager
- Synopsis:
- loginctl [options…] {command} [Name…]
- Description:
- loginctl may be used to introspect and contro the state of systemd login manager
SysV
runlevel
- Name
- runlevel - Print previous and current SysV runlevel
- Synopsis:
- runlevel [options…]
- Description:
- “Runlevels” are an abosolete way to start and stop groups of services used in SysV init.
- systemd provides compatibility layer thatmaps runlevels to targets, and associated binaries lik runlevel.
- Nevertheless, only one runlevel can be “active” at a given time.
what directory contains the System V init scripts?
/etc/init.d
runlevel
runlevels which define different system states .
define runlevel 2
Multiple user mode, no NFS , only text login
what is the number range for runlevels?
0-6
define runlevel 3
Multiple user ,with NFS, only test login
Define runlevel 4
not used
define runlevel 5
Mult
init
- configures all aspects of the environment
- executes the later stages of the boot process
- starts processes needed to login to the system.
- located in /sbin/init
what are the for phases of the boot process ?
- the bootstrap phase
- the bootloader phase
- the kernel phase
- system initialization
the filesystem drivers for GRUB may be found where?
/boot/grub
the GRUB menu is configured from what defualt GRUB configuration file?
some distributions use what alternate value?
/boot/grub/menu.lst
/boot/grub/grub.conf
the grub.conf file is seperated into what two files ?
- gobal
- title
how does GRUB access device names?
GRUB accesses devices via the BIOS
What is the syntax for naming a device in the grub.conf file?
<device_type><drive_number><partition_number></partition_number>
+