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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

e2image: command not found

by Deepika

The e2image command in Linux is used to create an image of an ext2, ext3, or ext4 file system. This image can be used for backup or recovery purposes. The command creates a file that contains a copy of the file system’s data, which can be restored to a disk or partition using the e2image command.

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

e2image: command not found

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

Distribution Command
Debian apt-get install e2fsprogs
Ubuntu apt-get install e2fsprogs
Alpine apk add e2fsprogs
Arch Linux pacman -S e2fsprogs
Kali Linux apt-get install e2fsprogs
CentOS yum install e2fsprogs
Fedora dnf install e2fsprogs
OS X brew install e2fsprogs
Raspbian apt-get install e2fsprogs

e2image Command Examples

1. Write metadata located on device to a specific file:

# e2image /dev/sdXN path/to/image_file

2. Print metadata located on device to stdout:

# e2image /dev/sdXN -

3. Restore the filesystem metadata back to the device:

# e2image -I /dev/sdXN path/to/image_file

4. Create a large raw sparse file with metadata at proper offsets:

# e2image -r /dev/sdXN path/to/image_file

5. Create a QCOW2 image file instead of a normal or raw image file:

# e2image -Q /dev/sdXN path/to/image_file

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL 7 : How to create custom script to run automatically during boot
  2. scp: command not found
  3. How to Move Swap From Disk Partition to LVM Volume in Linux
  4. nmcli: command not found
  5. How to restore files under user’s home directory to default in Linux
  6. How to Configure SSH to restrict Users/Groups with allow and deny directives
  7. CentOS/RHEL – vgs command reports error: “global/global_filter” unknown
  8. ‘ulimit: max user processes: cannot modify limit:operation not permitted’ Shown When Login
  9. Linux OS Service ‘acpid’
  10. flock Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright