Linux Boot Flashcards

1
Q

Boot Process in brief

A

BIOS/UEFI=>Boot sector on first hard drive (GRUB)=>Linux Kernel=>Initial RAM (hw drivers)=>Initialization system
When Initialization system starts it takes over mounting pc’s FS. At this point Initial RAM is no longer needed, and is removed.
Then, System starts services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Boot logs and where are they generated

A

Boot logs are volatile and generated in ring buffer.
To look into ring buffer:
journalctl -k
dmesg

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Legacy GRUB

A
BIOS=>
1. Stage 1: boot.img (MBR, first 512 bytes of the disk)
2. Stage 1.5: core.img
3. Stage 2: is where the actual GRUB partition is read: /boot/grub/
main files there grub.conf (RH)
or menu.lst (Debian)
device.map
Example of grub.conf:
boot=/dev/vda
default=0
timeout=5
title CentOS ...<=title 0
title Windows... <= title 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Legacy: install grub

A
grub-install [device]
to find the located run:
findmnt /boot=> example /dev/vda1
grub-install /dev/vda1 or
grub-install '(hd0)'
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

GRUB2

A
UEFI=>
1. Stage 1: boot.img (MBR, first 512 bytes of the disk)
GPT Header
Partition Entry Array
2. Stage 1.5: core.img
looks for ESP (efi system partintion) in /boot/efi
this partition should be vfat or fat32
3. Stage 2: /boot/grub2/
main files: grubenv and themes
/boot/grub2/grub.cfg
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Modify GRUB2

A
RH commands start with grub2-
Debian with grub-
1. View default boot entry for grub2 conf file:
grub2-editenv list
2. vim /etc/default/grub:
TIMEOUT=
GRUB_DISABLE_SUBMENU=true
GRUB_CMDLINE_LINUX=
grub2-mkconfig in RH
to re-read entries in /etc/default/grub and creates system grub conf file in /boot/grub2/grub.cfg

update-grub in Debian after changes in /etc/default/grub

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

List contents of initramfs file

A

lsinitrd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Create a new initramfs for kernels on the system

A

dracut

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Location of dracut con file

A

/etc/dracut.conf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Omit booting of module in dracut

A

create file in /etc/dracut.conf.d/ dir
vim no-fcoe.conf
omit_dracutmodules+=”fcoe fcoe-uefi”
run dracut -f

How well did you know this?
1
Not at all
2
3
4
5
Perfectly