The Wayback Machine - https://web.archive.org/web/20230512155342/https://www.geeksforgeeks.org/dumpe2fs-command-in-linux-with-examples/
Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

dumpe2fs command in Linux with examples

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

dumpe2fs command is used to print the super block and blocks group information for the filesystem present on device.

  • Can be used with ext2/ext3/ext4 filesystem for information.
  • The printed information may be old or inconsistent when it is used with a mounted filesystem.
  • Don’t forget to unmount your partition before using this command.
    umount device

Syntax:

dumpe2fs [ -bfhixV ] [ -o superblock=superblock ] [ -o blocksize=block-size ] device

Options:

  • b : Used to get the blocks which are reserved as bad in the filesystem.
  • o superblock=superblock : It uses the superblock during the examination of filesystem. This option is not usually needed except by a filesystem wizard who is examining the remains of a very badly corrupted filesystem.
  • o blocksize=blocksize : It uses the blocksize during the examination of filesystem. This option is not usually needed except by a filesystem wizard who is examining the remains of a very badly corrupted filesystem.
  • f : Used to force dumpe2fs to display a filesystem even though it may have some filesystem feature flags which dumpe2fs may not understand.
  • h : It will only display the superblock information and not any of the block group descriptor detail information.
  • i : Used to show the filesystem data from an image file created by e2image, using device as the pathname to the image file.
  • x : Display the detailed group information block numbers in hexadecimal format.
  • V : Display the version number of dumpe2fs and exit.

Superblock: It is a record of the characteristics of a filesystem. It includes information about size, block size, empty and the filled blocks. Linux also maintains a copy of its superblock< in memory. If you are unable to mount your device, this can be due to a Corrupted superblock.

Examples:

  • Displaying superblock information:
    sudo dumpe2fs -h /dev/sda3

  • Displaying Information of block groups:
    sudo dumpe2fs /dev/sda3

    This displays information about block groups. Notice Primary superblock

  • Observing more about superblocks:
    sudo dumpe2fs /dev/sda4 | grep -i superblock

    Displays all available superblocks with discriptors.

  • Displaying the version of dumpe2fs:
    sudo dumpe2fs -V

My Personal Notes arrow_drop_up
Last Updated : 15 May, 2019
Like Article
Save Article
Similar Reads
Related Tutorials