CompTIA Linux+ Exam Study Guide Flashcards
What are the stages of the Boot Process?
1) BIOS/UEFI POST
2) Boot Loader
3) Kernel Initializations
4) Start the System Initialization Processes (says or systemd)
BIOS / UEFI
This is the Basic Input Output System, a firmware that is on the mainboard that is used to initialize the hardware on the system. The process is called the Power On Self Test (POST) and it ensures that all of the connected devices are initialized and responding before passing over control to the bootloader. Most recently, the BIOS system has been replaced by the Unified Extensible Firmware Interface that performs the same tasks as the BIOS, but it has additional capabilities.
Boot Loader
This is the program that loads the operating system for the computer. It takes over once the POST has completed. On Linux, the most common bootloaders are GRUB (the GRand Unified Bootloader, also called legacy GRUB), and its updated replacement GRUB2, now simply referred to as GRUB. The bootloader is configured with the location of the desired operating system kernel which it loads into memory.
Kernel Initialization
The loaded Kernel will extract itself from a compressed image that is located in the /boot directory and then load the system initialization daemon. On older systems this was sysv-init , but on modern systems this is systemd . Once the kernel and the system initialization daemon are running, the system can start.
Describe System Initialization
The system initialization daemon mounts the devices located in fstab , and proceeds to boot the system into the default run level. Once the process has completed the system is considered booted
What are Boot Options
- Boot from ISO: This process uses a ISO image, that is mounted as a drive, to load the kernel.
- PXE: The Pre-EXacutable environment is a client environment that searches for an appropriate server on the network from which to acquire a boot image. Once this image has been located, it is downloaded using the trivial file transfer protocol (tftp)
- Boot from HTTP/HTPS: This process allows the image to be loaded using standard networking protocols.
Describe Boot File Locations
Most configuration files for the boot process are in the /boot directory. Exceptions to this can be the GRUB files that can be located in different places, depending on the BIOS / UEFI specifications of the system. Most often they are found in one of the following:
• /etc/grub/
• /etc/grub2.cfg
• /boot/grub or /boot/grub2 • /boot/efi
Describe mkinitrd
This command will create the initial ramdisk is used by the kernel to preload block devices that are needed to access the root filesystem.
dracut
This command is similar to mkinitrd and results in an initial ramdisk the kernel can use to load block devices that are needed to access the root filesystem.
grub2-install
This command is used to install the GRUB2 boot loader onto a device, which includes necessary images as well as creating the boot sector
grub2-mkconfig
This command is used for creating a configuratuion file for use by GRUB2
initramfs
This is a complete set of root file system directories, bundled into a cpio archive and compressed.
efi files
These files are used by the UEFI bootloader and comprise the efi partition. They are normally located at /boot/efi/
vmlinuz
This is the name of the Linux kernel executable. It is a compressed kernel that is capable of loading the operating system into memory (Virtual Memory LINUX gZip)
vmlinux
This is a statically-linked executable file that contains the Linux kernel. It can be used in debugging. In contrast to vmlinu(z), this file is not compressed (Virtual Memory LINUX)
Describe Kernel Panic
A Kernel Panic is a situation where the kernel discovers an unrecoverable error and it is not able to recover from that error without risk of data loss. This normally results in a bug check error being printed to the screen, followed by a memory dump prior to either waiting for a manual reboot or automatically rebooting once the memory dump is completed
What is the lsmod command used for?
lsmod lists the currently loaded modules
insmod
Inserts a module into the kernel
modprobe
Loads or removes a loadable kernel module to or from the kernel
modinfo
Extracts information about a kernel module that is provided to the command on the command line
dmesg
Prints the message buffer of the kernel:
–This output usually contains messages from device drivers and kernel modules.
rmmod
Removes modules from the kernel, but not modules that are in use
depmod
Creates a list of module dependencies
/usr/lib/modules/[kernelversion]
This is location of the kernel modules specific to a release of the kernel
/usr/lib/modules
This is the parent location for module storage
/etc/modprobe.conf
This is the file that contains the options that can be configured for modprobe. It is
scheduled to be deprecated
/etc/modprobe.d/
This is the location of the modprobe configuration files. It is the replacement for /etc/
modprobe.conf
ping
Leverages the ICMP protocol to get an echo response from a host that is passed to it on the command line, either as a hostname or an IP address
netstat
Used to print network connections, routing tables, and many other pieces of information about the network status
nslookup
Queries the DNS system to resolve a domain name to an IP address
dig
Short for Domain Information Groper, use for interrogating DNS name servers
host
Simple tool for DNS lookups
route
Manipulates the kernel’s routing table, and can be used to set static routes
ethtool
Used to configure and manipulate network device drivers and connections
- It is mostly used for wired connections
ss
Dumps socket statistics
iwconfig
Configures and displays information about wireless network interfaces
nmcli
Command line tool used for controlling NetworkManager and getting its status
brctl
Manages ethernet bridges
nmtui
Similar to mncli, and provides a text interface that shows options for the tool
Where is the location of the network interface configuration scripts used to manipulate the network interfaces
/etc/sysconfig/network-scripts/
/etc/sysconfig/network/
This is the location of more general network configurations that are not specific to an interface
This is the file that is the store for local DNS resolution
/etc/hosts
This is the location of the network configuration files
/etc/network
This is the file that is used to determine the sources from which to obtain name-
service information
/etc/nsswitch.conf
This is the file that contains the list of external DNS servers
/etc/resolv.conf
This is the location of files that can be used to configure networking on newer systems.
/etc/netplan
This file is used to override default kernel parameter values
/etc/sysctl.conf
This file is used to configure the DHCP client
/etc/dhcp/dhclient.conf
Aggregation
This is the process of combining several network connections in parallel, to increase network throughput
Active/Passive
This is a type of load balancing in which one side is the active side. The other side is passive and is held in reserve, in the event of the active side experiencing a failure
Load balancing
This is the process of distributing network traffic across multiple resources, to ensure that no single resource experiences resource exhaustion
Basic Partitions in Linux
There are several types of partitions in Linux, These are different than file systems, and partitioning a device is simply dividing it. A partition can span the entire device, or be smaller pieces of it
What is a raw device?
A raw device is a special type of logical device. It is associated with a character device file that allows it to be accessed directly, without using the operating systems buffers
Describe GPT
Short for GUID Partition Table, this type of partition table allows a device to be divided into a nearly unlimited number of partitions, depending on the operating system. GPT also allows for much larger drives, again limited by the operating system and the file system that will be used in the partition. GPT also stores multiple copies of its partition table in several locations on the device.
Describe MBR
The Master Boot Record is a partition table that stores its partition data in a special boot sector, and has a 2TB limit in total drive size. MBR only supports 4 primary partitions
What is a real file system?
A real file system is a type of file system that exists on a device. It is physically mounted to the machine
What is a virtual file system?
A virtual file system exists in memory and does not actually physically exist on a device. Once the computer is powered off, the virtual file system no longer exists. One example of this would be /proc
Describe a relative path
A relative path is one that is dependent on the directory that you are currently in, such as ./example , where this means the object example in the current directory
Describe an Absolute Path
An absolute path is one that is not dependent on the current directory, such as /home/user/example . This is the absolute location of the file example
What is a device mapper?
The Device Mapper is a framework in Linux that allows the mapping of physical devices to logical file volumes. It provides the following services
A logical volume is a volume that can be made up of multiple physical partitions. The Logical Volume Manager (LVM) is used to mange these Volumes.
mdadm is a command line tool that allows the management of Redundant Array of Independant Disks (RAID) that are created using the device mapper.
Multipath is a storage technology that lets us use more than one method of accessing storage devices. This allows for load balancing and high availability of the storage devices
Describe a logical volume
A logical volume is a volume that can be made up of multiple physical partitions. The Logical Volume Manager (LVM) is used to mange these Volumes.
Describe mdadm
mdadm is a command line tool that allows the management of Redundant Array of Independant Disks (RAID) that are created using the device mapper
Describe Multi-path
Multipath is a storage technology that lets us use more than one method of accessing storage devices. This allows for load balancing and high availability of the storage devices
Describe File System Types
ext3 : The 3rd extended file system was introduced in 2001 and it included journaling. It is limited by individual file size of 2TB and an overall system size of 32TB
ext4 : The 4th extended file system was introduced in 2008. It includes journaling too, but also allows for huge file sizes. Individual files can be up to 16TB and system size can be up to 1EB (exabyte).
xfs : This file system was ported to Linux in 2014, it is a 64 bit, journaling file system that has excellent support for parallel I/O loads.
nfs : The Network File System is a client/server file system that allows file access across networks as if they were local files.
smb : Server Message Block is a network protocol allowing network access to files and other network resources.
cifs : This is a version of smb and it stands for Common Internet File System.
ntfs : This is a proprietary journaling file system developed by Microsoft, and is the default file system on
modern versions of the Windows operating system
ext3
The 3rd extended file system was introduced in 2001 and it included journaling. It is limited by individual file size of 2TB and an overall system size of 32TB
ext4
The 4th extended file system was introduced in 2008. It includes journaling too, but also allows for huge file sizes. Individual files can be up to 16TB and system size can be up to 1EB (exabyte)
xfs
This file system was ported to Linux in 2014, it is a 64 bit, journaling file system that has excellent support for parallel I/O loads
nfs
The Network File System is a client/server file system that allows file access across networks as if they were local files
smb
Server Message Block is a network protocol allowing network access to files and other network resources
cifs
This is a version of smb and it stands for Common Internet File System
ntfs
This is a proprietary journaling file system developed by Microsoft, and is the default file system on
modern versions of the Windows operating system
This is the location of the File System TABle, and it contains the information necessary to allow automatic mounting of devices
/etc/fstab
This is the location of the information for encrypted devices that are set up during system boot
/etc/crypttab
This contains the special device files for all the devices on the system
/dev/
This contains a listing of the Logical Volumes managed by LVM
/dev/mapper
/dev/disk/by-
/dev/disk/by-
id : This contains a mapping of the devices based on the serial number.
uuid : This contains a mapping of the devices based on the UUID. This is how the devices are listed in fstab by
default.
path : This is a mapping of the devices based on the shortest physical path according to sysfs and contains
the bus name (pci,ata, etc.).
multipath : If this exists, it contains the path mappings for the device
This contains a list of the currently mounted file systems according to the mount command
/etc/mtab
This contains symlinks to each of the block devices on the system
/sys/block
This contains the major and minor numbers of the partitioned devices
/proc/partitions
This is similar to mtab but it is maintained by the kernel.
/proc/mounts
mdadm
Device mapper administration
fdisk
CLI program for managing device partitions does not work with partitions larger than 2TB
parted
CLI program for managing device partitions does not have the partition size limit of fdisk
mkfs
MaKe File System, used to build a file system on a partitioned device (normally a disk drive)
iostat
Reports CPU and device I/O stats
df
Disk Free, reports the free space on the file system that is passed to it:
- Using no arguments lists the system
du
Disk Usage, reports the size of the file that is passed to it:
1. With no arguments, it lists the file size of all files on the system each on one line.
mount
Attaches a file system to a mount point
umount
Removes a file system attachment from a mount point
lsblk
LiSt BLocK devices
blkid
Locate and print block device attributes
dumpe2fs
Prints the superblock block group info for a filesystem on a device
resize2fs
Used for resizing a filesystem
fsck
File System ChecK, used to detect errors on a filesystem and can be instructed to attempt to correct
issues
tune2fs
Allows adjustment of tunable file system parameters
e2label
Displays or changes filesystem labels
Describe Templates
A VM template is what describes a virtual machine, and it is used to create the machine resources. There are several different types of templates, depending on how the virtual machine was created