1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-28 21:04:55 +02:00
tldr/pages/linux/e2image.md
Lucas Gabriel Schneider a5fe31bc47
multiple pages: format technical tokens (#5119)
Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com>
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
2021-01-31 12:05:18 -05:00

653 B

e2image

Save critical ext2/ext3/ext4 filesystem metadata to a file. More information: https://linux.die.net/man/8/e2image.

  • Write metadata located on device to a specific file:

e2image {{/dev/sdXN}} {{path/to/image_file}}

  • Print metadata located on device to stdout:

e2image {{/dev/sdXN}} -

  • Restore the filesystem metadata back to the device:

e2image -I {{/dev/sdXN}} {{path/to/image_file}}

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

e2image -r {{/dev/sdXN}} {{path/to/image_file}}

  • Create a QCOW2 image file instead of a normal or raw image file:

e2image -Q {{/dev/sdXN}} {{path/to/image_file}}