• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

dracut: command not found

by admin

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, you can use the dracut command with several options to make an initramfs for specific kernel environments. There is also a configuration file with the name /etc/dracut.conf that you can use to include specific options while re-creating the initramfs.

An example of using the dracut command to create an initramfs image is as follows:

# dracut /boot/initramfs-$(uname -r).img $(uname -r)

If you encounter the below error while running the dracut command:

dracut: command not found

you may try installing the below package as per your choice of distribution:

OS Distribution Command
Debian apt-get install dracut
Ubuntu apt-get install dracut
Kali Linux apt-get install dracut
CentOS yum install dracut
Fedora dnf install dracut
Raspbian apt-get install dracut

Conclusion

The dracut command is used to generate an initramfs image, similar to how mkinitrd is used to generate an initrd image. In fact, on some distributions, mkinitrd is a compatibility wrapper that calls the dracut command.

Filed Under: Linux

Some more articles you might also be interested in …

  1. autopkgtest Command Examples in Ubuntu
  2. How to disable auto completion (tab completion) in bash shell
  3. How to use “btrfs device” comamnd to add/delete device to/from btrfs filesystem
  4. cf: Command-line tool to manage apps and services on Cloud Foundry
  5. dnstracer: command not found
  6. How to use compress, zip, gzip commands under Linux
  7. vgs: command not found
  8. CentOS/RHEL : Unmounting a Windows Share Fails – “device is busy”
  9. Grsync: Graphical rsync backup tool in Ubuntu Linux
  10. How to Re-generate initramfs and vmlinuz for Rescue Kernel with Current Kernel in CentOS/RHEL 7

You May Also Like

Primary Sidebar

Recent Posts

  • gixy Command Examples
  • gitsome Command Examples
  • gitmoji Command Examples
  • gitlint Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright