You can generate a password hash to protect the boot menu by using the grub2-mkpasswd-pbkdf2 command. On Ubuntu, the command to create a password hash is grub-mkpasswd-pbkdf2. On CentOS, the command is grub2-mkpasswd-pbkdf2. If you encounter the below error while running the grub2-mkpasswd-pbkdf2 command: grub2-mkpasswd-pbkdf2: command not found you may try installing the below package: […]
Archives for October 2022
grub2-install: command not found
The grub2-install command is used to install the GRUB 2 boot loader on a storage device. It copies GRUB 2 files into the /boot/grub2 directory and, on some platforms, installs GRUB 2 into the boot sector. However, grub2-install applies to BIOS systems, not UEFI. To install GRUB 2 on a UEFI system, use a package […]
dracut: command not found
Occasionally, the initramfs image may get damaged as well. If this happens, you cannot boot your server into normal operational mode. To repair the initramfs image after booting into the rescue environment, you can use the dracut command. If used with no arguments, this command creates a new initramfs for the kernel currently loaded. Alternatively, […]
mkinitrd: command not found
The mkinitrd command is used to create the initrd image for preloading the kernel modules. Various options of the mkinitrd command are given in the following table. Option Description —preload={module name} Load a module in the initrd image before the loading of other modules. –with={module name} Load a module in the initrd image after the […]
dmesg: command not found
The dmesg (“display message” or “driver message”) command is used to print any messages that have been sent to the kernel’s message buffer during and after system boot. Device drivers send messages to the kernel indicating the status of modules and parameters that the drivers interface with. These drivers can also send diagnostic messages to […]
insmod: command not found
The insmod command is used to add modules to the currently running kernel. Syntax The syntax of the insmod command is as follows: # insmod [module_name] The exact location of the module needs to be specified. For example: # insmod /usr/lib/modules/3.19.8-100.fc20.x86_64/kernel/fs/ fat.ko With insmod command you have to know the exact location of the module. […]
sysctl Command Examples in Linux
To view or edit any security-related parameter of Linux kernel, there is the /etc/sysctl.conf file. All the parameters are stored in this file and this is read during boot time. If you wish to see the available kernel parameters in this file, you can do so by running the command: # sysctl -a This command […]
sysctl: command not found
To view or edit any security-related parameter of Linux kernel, there is the /etc/sysctl.conf file. All the parameters are stored in this file and this is read during boot time. If you wish to see the available kernel parameters in this file, you can do so by running the command: # sysctl -a This command […]
depmod: command not found
For modprobe to accurately install dependent modules, it reads the modules.dep file to identify how modules are linked to one another. The depmod command is used to update this database of dependencies so that modprobe can function properly. The depmod command searches the contents of /lib/modules// for each module. A module may export a “symbol”, […]
modprobe Command Examples in Linux
The modprobe command is used to add or remove modules from a kernel. This command is capable of loading all the dependent modules before inserting the specified module. It is therefore preferred over using the insmod and rmmod commands. To add modules using modprobe, use the -a option and specify the modules you want to […]