Hosted by
SourceForge.net Logo

disktype


The purpose of disktype is to detect the content format of a disk or disk image. It knows about common file systems, partition tables, and boot codes.

The program is written in C and is designed to compile on any modern Unix flavour1. It is self-contained and in general works without special libraries or headers. Some system-dependent features can be used to gather additional information.


On this page: Download - Resources - Recognized Formats - Related Software
Other pages: Documentation - File System Sampler

Download

Download the source tarball here:

No precompiled binaries are available at this time. Compiling disktype is simple and straightforward, so I don't see this as a great loss. If you want to build packages for your favourite distribution, please go ahead and let me know so I can list them here.

Juan Manuel Garcia Molina has made a package for Debian GNU/Linux, currently available in the unstable and testing trees. A Fink package is avaliable in the unstable tree. Solaris packages maintained by Dagobert Michelsen are available at OpenCSW.

The documentation is still evolving and therefore not included with the source code. You can read it online instead.

Resources

This project is hosted by SourceForge. You can use the trackers to submit bug reports, feature requests, and patches. The latest development source is available from the CVS repository. Other resources are listed on the project summary page.

Recognized Formats

As of version 9, disktype knows about the following formats. For more detailed information, please see the documentation.

File systems:

  • FAT12/FAT16/FAT32
  • NTFS
  • HPFS
  • MFS, HFS, HFS Plus
  • ISO9660 (incl. Joliet, El Torito)
  • UDF
  • ext2/ext3
  • Minix
  • ReiserFS
  • Reiser4
  • Linux romfs
  • Linux cramfs
  • Linux squashfs
  • UFS (some variations)
  • SysV FS (some variations)
  • JFS
  • XFS
  • Amiga FS/FFS
  • Amiga SFS
  • Amiga PFS
  • BeOS BFS
  • QNX4 FS
  • 3DO CD-ROM FS
  • Veritas VxFS
  • Xbox DVD file system
     

Partitioning:

  • DOS/PC style
  • EFI GPT
  • Apple
  • Amiga "Rigid Disk"
  • ATARI ST (AHDI3)
  • BSD disklabel
  • Linux RAID physical disks
  • Linux LVM1 physical volumes
  • Linux LVM2 physical volumes
  • Solaris SPARC disklabel
  • Solaris x86 disklabel (vtoc)

Other structures:

  • Debian split floppy header
  • Linux swap

Disk images:

  • Raw CD image (.bin)
  • Virtual PC hard disk image
  • Apple UDIF disk image (limited)
  • Linux cloop (limited)
     

Boot loaders:

  • LILO
  • GRUB
  • SYSLINUX
  • ISOLINUX
  • Linux kernel
  • FreeBSD loader
  • Windows/MS-DOS loader
  • BeOS loader, Haiku loader
  • Sega Dreamcast

Compression formats:

  • gzip
  • compress
  • bzip2

Archive formats:

  • tar
  • cpio
  • bar
  • dump/restore

Related Software

If you're looking for recovery software, try gpart. It scans the whole disk, sector by sector, to reconstruct the (PC-style) partition table.

The file command identifies a wide range of file formats using magic numbers. It recognizes archive and compression formats, and also some file systems.

GNU Parted is a tool to manage partitions. It is capable of resizing certain file systems and can detect some others, too.

 

1) So far it has been compiled on Linux, FreeBSD, NetBSD, Mac OS X/Darwin, BeOS, QNX, Solaris, HP/UX, and Cygwin.