1
00:00:00,000 --> 00:00:12,100
Sometimes, in case of troubleshooting, you may have to install a new GRUB bootloader.

2
00:00:12,100 --> 00:00:17,180
So normally GRUB2 is installed automatically, and you don't have to worry about it. The

3
00:00:17,180 --> 00:00:22,100
only thing you would do is to use GRUB2 mkconfig to write new settings to the GRUB bootloader

4
00:00:22,100 --> 00:00:28,580
configuration files. To write a GRUB2 bootloader to a completely new device, you can use the

5
00:00:28,580 --> 00:00:35,779
GRUB2 install command. And installing or reinstalling GRUB2 can be useful for troubleshooting. On

6
00:00:35,779 --> 00:00:45,840
BIOS systems, use GRUB2-install-devsda, and that will be enough to reinstall GRUB2. Obviously,

7
00:00:45,840 --> 00:00:50,380
you do need to verify your storage device. It should be your primary disk, and on many

8
00:00:50,380 --> 00:00:57,619
systems that should be devnvme0n1 instead of sda. If you are on UEFI, it's a little

9
00:00:57,619 --> 00:01:05,260
bit more complex, because in UEFI, there is also the cryptographic keys that are required

10
00:01:05,260 --> 00:01:10,739
for working with Secure Boot. And they need to be reinstalled as well if you are going

11
00:01:10,739 --> 00:01:16,379
to reinstall GRUB. To do so, you would use the command GRUB2-reinstall-grub2efishim,

12
00:01:16,379 --> 00:01:24,099
where the shim file contains the cryptographic keys that allow for working with Secure Boot.

13
00:01:24,099 --> 00:01:29,180
And if you have done all that, while you reinstalled GRUB, and on a system that had

14
00:01:29,180 --> 00:01:31,860
become unbootable, it should be bootable again.

