Managing the Boot Procedure
Boot Procedure
Modifying GRUB2 Runtime Parameters
- From boot menu, press e to edit boot options and modify the end of the line
that starts with linux
- systemd.unit=emergency.target
- systemd.unit=rescue.target
- systemd.unit=multi-user.target
- init=/bin/bash
- Press c to enter command mode
- Advanced, not needed for RHCSA
Changing GRUB2 Persistent Parameters
- Edit
/etc/default/grub- Since RHEL 9.2, the GRUB2 configuration file contains the line GRUB2_ENABLE_BLSCFG=true by default, which basically means any changes to the configuration file are ignored
- Another option is to edit the settings for a specific kernel in /boot/loader
- Use
grub2-mkconfig -o /boot/grub2/grub.cfgto generate a configuration file
Systemd Targets
Some interesting things to have a look at
systemctl list-unit-files -t target
systemctl cat multi-user.target
ls /etc/systemd/system/multi-user.target.wants
systemctl list-dependencies multi-user.target
Setting the Default Systemd Target
systemctl get-default
systemctl set-default
Booting into a Specific Target
- Modify grub boot command adding
systemctl.unit=target-name.target - To change targets on a running system use
systemctl isolate target-name.targetorsystemctl start target-name.targetdepending on if you are moving from an earlier target to a later target- Basically isolate will remove everything you don’t need, start will add everything you do need
Lab Exercise
- Configure your system to boot into a multi-user target by default
- Persistently remove the options that hide startup messages while booting isSubcollection: true paginate: true
- caj