Boot Process Flashcards

1
Q

Boot process

A

1) boot device
2) boot loader (grub2)
3) kernel / initramfs -> systemd -> initrd.target mount to /sysroot -> switch
4) systemd -> default target

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

What is RHEL boot loader?

A

grub2: Grand Unified Boot Loader

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

What is a systemd target?

A

A set of related systemd units

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

Determine default systemd target

A

systemctl get-default

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

Find all targets available on your system

A
systemctl list-units -t target
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are dependecies of a given target

A

systemctl list-dependencies graphical.target

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

what does it mean to isolate a target

A

Make that target the top most target

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

isolate target multi-user.target

A

systemctl isolate multi-user.target

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

set a target as default

A

systemctl set-default multi-user.target

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

How do I access the grub config?

A

Type letter e during boot process

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

How do I look at the kernel params of my last boot

A

cat /proc/cmdline

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

Inside my grub config, how do I set a systemd target?

A

at the end of the line starting with linux, add: systemd.unit=graphical.target

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

How do you exit the grub config so that it considers your changes

A

Ctrl X

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

In maintenance mode, how do you exit and continue the boot process?

A

Ctrl D

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

What is the maintenance mode systemd target

A

rescue.target

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

What is kernel param to pause the boot process?

A

rd.break

17
Q

Change the grub timeout to 20s

A
sed -i 's/TIMEOUT=5/TIMEOUT=20/g' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
18
Q

Change the root passwd while not logged in

A

1) Boot into grub
2) add kernel param rd.break and exit with Ctr X
3) Type end to get the prompt
4) mount -o remout,rw /sysroot
5) chroot /sysroot
6) passwd
7) loadpolicy -i
8) restorecon -FvR /etc/shadow

19
Q

Command to repair file system

A

fsck.ext4
fsck.xfs

20
Q

Fix fstab issue

A

1) Add kernel param to boot in emergency.target
2) mount -o remount,rw /
3) Troubleshoot with lsblk and edit /etc/fstab
4) mount -av
5) reboot