In this video I'll tell you how you can enter boot parameters to change the way how Linux starts. Boot parameters can be
entered on the grip prompt and to access the grip prompt while booting, you can press the escape key at the right moment.
Finding the right moment is not always easy by the way, but keep on trying. I'm sure you will get there.
As an alternative, if a system boot was not completed successfully,
the next boot will automatically show the Grub boot menu.
So if ever you wanted to access the Grub boot prompt and you don't succeed, just reset
your machine while it is booting to automatically see the boot prompt when it comes up again.
All of the boot arguments that are entered while booting are non persistent and mainly used for troubleshooting.
And the main boot arguments that you can use is systemd unit followed by the systemd
unit unit that you want to use. Emergency Target is for hardcore troubleshooting. Rescue Target is
bringing you a little bit further Multi user Target is a complete operational environment and graphical
target is what you normally start when you boot a graphical Linux operating system.
Let me show you how you can interact with this Grub boot menu.
So I need to start by rebooting my system.
This is where I need to pay attention.
My trick is you will see a cursor appearing when you see the cursor appearing and you
press Escape at that moment and normally you are all right, but that might depend on your
distribution. No guarantees here. Again, if you can't access the grip boot menu, just reset the virtual
machine while it is rebooting. Here we have all the different options for booting.
I'm going to select Centos Stream and press Enter E for Edit to get access to the different
boot options. And the line that matters here is the line that starts with Linux. That is the
line that starts the Linux kernel. This Linux kernel is the VM Linus file that you can see.
Now all of these parameters are quite okay. I don't like RHGB
and quiet so that is already a good start to remove them.
And next I'm going to use systemd unit is Emergency target.
Now we have seen this before. If you want to start Emergency target on a Red hat based system, you must have
the root password set otherwise it won't work. So I'm using Control X and then we can see what is happening.
The problem is that this Emergency target is loading a program with the name Sulogin which is super useful
login. That's an additional level of protection and that command won't work if you don't have a root password.
From here you can do whatever kind of troubleshooting you want.
I happen to be not interested at all in troubleshooting, so I'm going to reboot and I want to show you what it looks like on Ubuntu.
Back on Ubuntu I'm also going to use sudo reboot.
Did you see that the cursor appeared? I pressed escape and now I'm in my boot
menu. Now I am going to use E again to edit this grub boot menu there.
We also have a line that starts with Linux so that is looking okay.
Well there's one thing that doesn't look okay and that is this Quiet and splash. I really don't
like this quiet and splash because that is hiding what is going on while you are booting.
I really like to see what is going on while booting. That makes troubleshooting easier if that is required.
Now I wanted to show you systemd unit is emergency target because you
need to understand how that works on Ubuntu. As in Ubuntu the root
user has no password by default, so will that fail as well?
Look at that. Ubuntu is prompting Press enter to maintenance. The difference is at the end of
the emergency target in Ubuntu there is no SU login program. So I'm pressing enter and then
I'm here in my root shell even if the root user does not have a password.
So that works perfectly.