What Is a DD File? Read the First Sector, Then Open the Disk Inside
A DD file is usually a raw copy of a disk, made byte for byte with the dd command. Jump to your question below, or work through it in order.
What Is a DD File? A raw copy of a disk, made byte for byte with the dd command
Short answer
DD files are usually raw copies of disks, made with the dd command. They store every byte of the disk in order, with no header and no hash. The same ending is also used by DiskDoubler archives from old Macs.
Because DD files are straight copies, their first bytes and their size show what is inside. Most start with a partition table or with one file system, like FAT32, ext4, NTFS or exFAT. Sleuth Kit read all 7 of our test DD files that have file systems.
To find your kind of DD file, read the first-byte check. To get the files out, read how to open DD files and how to mount them. If your DD file is damaged, start with the damage tests.
DD files are raw disk images: byte-for-byte copies of disks, USB drives or single partitions, usually made with the dd command. They have no header, no compression and no checksum, so every DD file is as big as the thing it copies.
Picture a USB drive that will not mount, or a laptop disk sent in for a lawsuit. The technician copies it to evidence.dd, so the original stays untouched. That DD file stores everything the disk had, even the space its owner thought was empty.
Wikipedia says Ken Thompson wrote dd, and that it appeared in Version 5 Unix in 1974. According to Dennis Ritchie, the name alludes to the DD statement in IBM's Job Control Language, where DD stands for data definition. People also call it Disk Destroyer, because one wrong drive name erases a disk.
The ending is a habit and not a rule. forensics.wiki says dd writes raw files with no required ending, and its examples use .img and .dd. It adds that many other programs can read these raw DD files.
FileInfo lists another meaning for .dd: DiskDoubler archives, made by a Symantec program for Mac OS Classic. Our tests could not cover those DD files, because we found no sample. The section on other uses says more.
DD file facts at a glance
| Property | Value |
|---|---|
| File extension | .dd, and often .img for the same kind of file |
| Usual meaning | Raw disk images made with the dd command |
| Type | Binary files with no header and no compression |
| Made by | dd, and its forks dcfldd and dc3dd, says Wikipedia |
| Size | The same as the disk or partition they copy |
| Layout | Partition tables or file systems, copied as they were |
| Opens in | 7-Zip, Sleuth Kit, Linux loop mounts and DD viewers |
| Other meaning | DiskDoubler archives, says FileInfo |
| Safe to open | Reading is low risk. The disk may store anything its owner kept, so mount DD files read-only. |
Wrong page? Disk images made on Macs end in .dmg, and the DMG file guide covers them. EnCase evidence files end in .E01, and the E01 file guide explains those. For the general idea, read the disk image guide.
Which Kind of DD File Is Yours? The first sector and the size name the kind
Read the first bytes and the size of your DD file. Partition tables end sector 0 with 55 aa. GPT disks show EFI PART at byte 512. Bare file systems name themselves near the start. ext4 DD files begin with 1,024 zero bytes.
You need no special software. The short script below prints the first bytes, the kind and the size of your DD file. For bare file systems it also compares the size on disk with the size the file system claims. Save it as check_dd.py and give it the name of your DD file.
import os, struct, sys
path = sys.argv[1]
size = os.path.getsize(path)
with open(path, "rb") as f:
s0 = f.read(512)
f.seek(512)
s1 = f.read(8)
f.seek(1024)
sb = f.read(100)
print("First 16 bytes:", " ".join("%02x" % b for b in s0[:16]))
claim = None
if s1 == b"EFI PART":
kind = "GPT disk (EFI PART at byte 512)"
elif s0[82:90] == b"FAT32 ":
kind = "FAT32 file system"
claim = struct.unpack("<I", s0[32:36])[0] * struct.unpack("<H", s0[11:13])[0]
elif s0[3:11] == b"NTFS ":
kind = "NTFS file system"
claim = (struct.unpack("<Q", s0[40:48])[0] + 1) * struct.unpack("<H", s0[11:13])[0]
elif s0[3:11] == b"EXFAT ":
kind = "exFAT file system"
claim = struct.unpack("<Q", s0[72:80])[0] * (1 << s0[108])
elif sb[56:58] == b"\x53\xef":
kind = "ext2, ext3 or ext4 file system (53 ef at byte 1080)"
claim = struct.unpack("<I", sb[4:8])[0] * (1024 << struct.unpack("<I", sb[24:28])[0])
elif s0[510:512] == b"\x55\xaa":
kind = "MBR disk (55 aa at byte 510)"
elif not any(s0):
kind = "Sector 0 is all zeros"
else:
kind = "No known start"
print("Kind:", kind)
print("Size on disk: {:,} bytes{}".format(size, "" if size % 512 == 0 else " (not a multiple of 512)"))
if claim:
print("Size the file system claims: {:,} bytes".format(claim) + ("" if claim == size else " <- differs"))
python check_dd.py g05-mbr-fat32.dd
First 16 bytes: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Kind: MBR disk (55 aa at byte 510)
Size on disk: 41,943,040 bytes
We tried the script on all 8 good DD files and all 12 damaged ones. It named the kind of every good DD file. For the ones cut short, it printed a size warning, like the output below.
python check_dd.py d08-fat32-cut-half.dd
First 16 bytes: eb 58 90 6d 6b 66 73 2e 66 61 74 00 02 01 20 00
Kind: FAT32 file system
Size on disk: 20,971,520 bytes
Size the file system claims: 41,943,040 bytes <- differs
| Kind | Where to look | What you see |
|---|---|---|
| MBR disk | Bytes 510 and 511 |
55 aa, and the table at byte 446
|
| GPT disk | Byte 512 | The text EFI PART |
| FAT32 | Byte 82 | The text FAT32 |
| NTFS or exFAT | Byte 3 | The text NTFS or EXFAT |
| ext4 | Byte 1,080 |
53 ef, after 1,024 zero bytes
|
| Empty | Sector 0 | Zeros only |
Our 8 good DD files are disks in miniature: 4 bare file systems, 3 disks with partition tables and 1 empty file. Their sizes range from 16 MiB to 44 MiB, and every one is a multiple of 512 bytes. DD files with sizes that are not multiples of 512 had bytes cut or added.
Three more clues about your DD file
What Is Inside DD Files? A partition table, file systems and spare copies, in 512-byte sectors
DD files lay the disk out as it was: sector 0 first, then the rest, 512 bytes at a time. MBR disks keep their table in sector 0, and the first partition starts at sector 2,048. GPT disks add a header at sector 1 and a backup copy at the end.
Think of a book with a table of contents. The table says where every chapter starts, and the chapters are the file systems. DD files copy the table and the chapters in order and add nothing of their own. That is why every tool that understands disks can read them.
| Part | Position | What it has |
|---|---|---|
| MBR | Sector 0 |
Code, four table entries from byte 446 and 55 aa
|
| GPT header | Sector 1 | The text EFI PART and the table position |
| GPT table | Sectors 2 to 33 | Up to 128 partition entries |
| First partition | Sector 2,048 | A gap of 1 MiB, then the file system |
| Boot sector | Start of the partition | The name and size of the file system |
| Backup copies | Elsewhere | FAT32 sector 6, NTFS last sector, GPT at the end |
To find partitions in DD files, ask for the start sector and multiply it by 512. In our MBR DD file the first partition starts at sector 2,048, which is byte 1,048,576. In the DD file with two partitions, the second one starts at sector 43,008, which is byte 22,020,096.
Backup copies inside DD files
Disk formats keep spare copies of their most important sectors. FAT32 volumes keep a backup boot sector at sector 6. NTFS keeps one in the last sector of the volume. exFAT keeps a backup of its first 12 sectors in sectors 12 to 23. GPT keeps a second header and table at the end of the disk.
We used every one of them in the damage tests. Zeroed boot sectors look fatal, yet spare copies a few sectors away brought the files back for FAT32, NTFS and exFAT. Spare copies only help if they exist, so small ext4 DD files with one block group have none.
What deleted files leave behind
DD files copy free space too, so they also copy deleted data. We deleted three files from a FAT32 DD file. Sleuth Kit listed them with the first letter of every name replaced, like _ello.txt, and returned all three byte for byte.
On ext4 the same test gave nothing. Sleuth Kit listed three nameless inodes and returned 0 bytes for all three, because ext4 clears the pointers when it deletes files. So DD files may store deleted files, and what you can get back depends on the file system.
A small detail we saw. The FAT32 test worked because the clusters were still in place. We deleted the files with mtools in a fresh DD file and added nothing afterward. Disks that kept writing after the delete may have overwritten the data, and we did not test that case.
What Do 20 Test DD Images Show? 8 good images, 12 damaged copies and four readers
We tested 20 DD files: 8 good ones we built and 12 damaged ones. Sleuth Kit read all 7 DD files that have file systems. After at most one small repair, 9 of the 12 damaged DD files gave back every file.
We found no public set of DD files with known content to test, and disk copies often store private data. So we built our own. Standard format tools made the file systems: mkfs.vfat, mkfs.ext4, mkfs.ntfs and mkfs.exfat. Every file system got the same 4 files, and sfdisk and sgdisk wrote the partition tables.
Then we broke 12 DD files in 12 ways and tried four readers on all 20: Sleuth Kit 4.12.1, 7-Zip 23.01, Linux mounts and mtools 4.0.43. Files counted as returned only when their hash matched the original. We built and tested everything in October 2026.
We did not test failing disks, DD files over 44 MiB or Mac DD files. We also skipped EnCase, FTK Imager, BitLocker, RAID and LVM, the SysTools and Freeviewer viewers and DiskDoubler archives. Our kernel had a missing FAT driver, so we read FAT32 with mtools and did not mount it.
The 8 good DD files we built
| DD file | What it has and tests |
|---|---|
| FAT32 | Bare FAT32 file system of 40 MiB. Tests file systems with no table. |
| ext4 | Bare ext4 file system of 24 MiB. Tests a start of zeros. |
| NTFS | Bare NTFS file system of 24 MiB. Tests the Windows format. |
| exFAT | Bare exFAT file system of 24 MiB. Tests the flash drive format. |
| MBR, FAT32 | MBR disk of 40 MiB with one FAT32 partition. Tests the offset. |
| MBR, 2 parts | MBR disk of 44 MiB with ext4 and NTFS. Tests two partitions. |
| GPT, ext4 | GPT disk of 36 MiB with one ext4 partition. Tests the newer table. |
| Empty | 16 MiB of zeros. Tests DD files with nothing in them. |
The 4 files are hello.txt with 28 bytes, notes.txt with accents, photo.bin with 200,000 random bytes and docs/report.txt with 1,150 bytes. Sleuth Kit returned all 4, byte for byte, from every DD file with a file system. It also returned all 4 from both partitions of the 44 MiB disk.
| Reader | DD files read | Note |
|---|---|---|
| Sleuth Kit | 7 of 7 | FAT32, ext4, NTFS and exFAT, with or without tables |
| 7-Zip | 6 of 7 | It could not open the exFAT DD file |
| Linux mount | 5 of 5 | ext4, NTFS and exFAT. FAT32 not tested here. |
| mtools | 2 of 2 | FAT32 only, with byte offsets for partitions |
The disk with two partitions shows how 7-Zip behaves. It saved both partitions as files, named 0.img and 1.ntfs, and a second pass on those files gave all 4 files from both. On the MBR and GPT disks with one partition, it went straight to the files.
The 12 damaged DD files
We damaged copies of the good DD files in 12 ways, with one kind of damage in every file. Four hit partition tables, 4 hit the start of file systems, 2 were cuts and 2 hit data or directories. The damage section lists all 12 with the fix. The table counts the DD files that gave back every file.
| Damage (files) | Before repair | After repair |
|---|---|---|
| Partition table (4) | 2 | 4 |
| File system start (4) | 1 | 3 |
| Cut short (2) | 2 | 2 |
| Data or directory (2) | 0 | 0 |
| All 12 DD files | 5 | 9 |
Before repair means at least one reader returned all the files with no change to the DD file. Spare copies of the partition table or the boot sector explain most of the gain. Three DD files stayed lost: a small ext4 file with no spare superblock, a block of overwritten data and a wiped FAT32 directory.
Read the counts with care. We damaged small DD files with simple breaks. Failing disks and crashes do messier harm, and working disks are much larger. The numbers show how these tools behave with these DD files, and they are not rates for all DD files.
What Does Our Expert Say About DD Files? A note from Neeraj Singh on hashing and working from a copy
Hash your DD file, mount it read-only and work on a copy. Check the boot sector and the size before you trust a quiet result. Keep the original DD file untouched, and write down its hash on the day you make it.
Expert insight
“A DD file is a copy of an entire disk, so treat it like the disk. Hash it, open it read-only and work on a copy. In our 12 damaged test files, a zeroed boot sector or partition table sounded fatal, yet 9 gave back every file after at most one small repair. The 3 that did not had nothing to restore from. Keep the original untouched.”
Why a quiet result can still be wrong
Sleuth Kit, 7-Zip and mtools all finished without errors on the DD file with 4,096 overwritten bytes. Every one returned photo.bin at its full size of 200,000 bytes. Only a hash comparison showed that 4,079 bytes had changed.
The cut DD file fooled the readers in another way. Sleuth Kit, 7-Zip and mtools read all 4 files from the FAT32 DD file cut in half, because the files sat near the start. Files stored in the missing half would be gone, so compare the size on disk with the size the file system claims.
Our script missed 3 of 12 damaged DD files. It did not flag the GPT disk with a wiped header, the overwritten block or the wiped directory. Hashes and quick listings with Sleuth Kit catch what first-sector checks cannot.
Keep the original. Work on a copy of the entire DD file, and keep the first hash. If a repair goes wrong, you can start again. The hash steps show how to compare two numbers, and the mount section shows how to open copies read-only.
How Do You Open DD Files? 7-Zip, Sleuth Kit, a mount or a Windows viewer
Open DD files with 7-Zip or Sleuth Kit on any computer, with DD viewers on Windows or by mounting them on Linux. Open copies, keep them read-only and find the offset first when the DD file has a partition table.
DD files have no program of their own, so a double click usually does nothing useful. You need a tool that reads disks. The table lists what we tried and what we only read about.
| Program | What it does | What we saw |
|---|---|---|
| 7-Zip | Free archiver that opens MBR and GPT disks and most file systems | 6 of 7 DD files |
| Sleuth Kit | Free command-line tools that list, read and recover files | 7 of 7 DD files |
| Linux mount | Built in, through loop devices | 5 of 5 DD files |
| mtools | Reads FAT file systems inside DD files | 2 of 2 DD files |
| SysTools DD Viewer | Windows viewer, says its page | Not tested |
| Freeviewer DD Viewer | Windows viewer, says its page | Not tested |
Open DD files with 7-Zip
Install 7-Zip, then right-click your DD file and open it as an archive. Or use the command line. The first command lists what is inside, and the second saves it to a folder.
7z l disk.dd
7z x disk.dd -oout
On our MBR and GPT disks with one partition, 7-Zip went straight to the files. On the disk with two partitions it saved both partitions as files, named 0.img and 1.ntfs, and a second pass on those files gave all 4 files from both. It could not open the exFAT DD file and said it cannot open the file as an archive.
Free viewers and reference pages
These four links open outside pages: two Windows viewers for DD files, the GNU manual for dd and the Wikipedia article on dd.
SysTools DD Viewer
View DD files on Windows without Linux
SysTools describes a free Windows viewer that reads DD files. Its page lists previews of EDB, OST and PST email files found inside DD files. It also lists searches by text or file ending and loading of several DD files from one folder. It says DD files of any size load and that the free viewer has no limits. The same page names Windows 10 as supported in one place and unsupported in its FAQ, so check before you install. We did not test it.
Freeviewer describes a Windows viewer that opens DD files and shows file names, dates and sizes. It says the trial version previews items only, and that the Pro edition adds search and extraction. It lists mounting disk images as drives among the Pro features, and it needs the .NET Framework 4.0. Its FAQ also disagrees with its version list about Windows 10. We did not test it either.
Both pages focus on the email files inside DD files. For those formats, see the PST file guide, the OST file guide and the EDB file guide.
A tip for Mac users. We did not test macOS. Mac disk images usually end in .dmg, and this guide to opening DMG disk images explains how those open.
How Do You Mount a DD File and Copy Files Out? Find the offset, mount read-only and copy
To use the files in DD files, find where the file system starts, multiply the start sector by 512 and mount that offset read-only. Bare file systems have offset 0. If you do not want to mount, Sleuth Kit and 7-Zip read DD files directly.
Mounts make DD files look like drives. You open folders and copy files with your usual tools. On Linux the loop device does the work, and it needs the offset because partitions do not start at byte 0.
- Copy your DD file, make the copy read-only and check its hash against the original.
- Print the partitions with mmls, sfdisk or fdisk, and note the start sector of the one you want.
- Multiply the start sector by 512 to get the offset in bytes.
- Mount the offset read-only, copy the files out and unmount.
mmls g05-mbr-fat32.dd
Slot Start End Length Description
000: Meta 0000000000 0000000000 0000000001 Primary Table (#0)
001: ------- 0000000000 0000002047 0000002048 Unallocated
002: 000:000 0000002048 0000075775 0000073728 Win95 FAT32 (0x0c)
003: ------- 0000075776 0000081919 0000006144 Unallocated
The FAT32 partition starts at sector 2,048. Times 512, that is 1,048,576 bytes. Bare file systems have no table, so mmls reports none and you use offset 0.
sudo mkdir -p /mnt/dd
# ext4 partition that starts at sector 2048 (byte 1048576)
sudo mount -o ro,loop,offset=1048576 disk.dd /mnt/dd
# NTFS or exFAT: make a read-only loop device first
sudo losetup --find --show --read-only --offset 1048576 disk.dd
sudo ntfs-3g -o ro /dev/loop0 /mnt/dd
sudo mount.exfat-fuse -o ro /dev/loop0 /mnt/dd
# when you are done
sudo umount /mnt/dd
sudo losetup -d /dev/loop0
We tested all of these forms on our DD files. The kernel mounted the ext4 partitions with the offset option. For NTFS and exFAT we made loop devices with offsets and mounted them with ntfs-3g and mount.exfat-fuse. All four files came back byte for byte from every DD file we mounted.
Get files out without a mount
You can skip the mount, which also skips the need for root. Sleuth Kit lists partitions with fls and saves single files with icat, using the inode number from the list. 7-Zip saves everything. mtools copies from FAT32 with the offset after two at signs.
fls -r -o 2048 disk.dd
icat -o 2048 disk.dd 14 > hello.txt
7z x disk.dd -oout
mcopy -n -s -i disk.dd@@1048576 :: out
How Do You Make a DD File With the dd Command? The right block size, one trap and three other tools
Make DD files with dd by naming the source with if= and the output with of=, using block sizes of 4096 or more and status=progress. Check both names twice, because swapping them erases the disk. Add conv=noerror,sync only for failing drives.
The dd command copies bytes from an input to an output. The GNU manual says the default block size is 512 bytes. Bigger blocks mean fewer calls, so the copy goes faster. The table shows a 256 MiB copy on our test machine, from /dev/zero to a file.
| Block size | Time |
|---|---|
| bs=512 | 1.15 s |
| bs=4096 | 0.71 s |
| bs=65536 | 0.47 s |
| bs=1M | 0.41 s |
| bs=4M | 0.41 s |
Copies in memory are not disk reads, so your times will differ. The gap is the point: the default size was nearly 3 times slower than 1 MiB. The dd page on forensics.wiki says the 512-byte default can be as much as 10 times slower than 4 KiB on disks.
The command, step by step
- Find the source with lsblk. Check the size and the name, because /dev/sdb on your computer may not be the drive you think.
- Unmount any partitions of the source, and save the output on another disk with enough room.
- Enter dd with if= for the source and of= for the new DD file, then wait for it to finish.
- Hash the source and the DD file, and keep the result with the file.
lsblk
sudo umount /dev/sdb1
sudo dd if=/dev/sdb of=usb.dd bs=4M status=progress
sha256sum /dev/sdb usb.dd
Mind the names. dd writes where of= points and does not ask first. If you swap if= and of=, you copy the empty file over your disk. This is why people call dd Disk Destroyer. Read the command aloud before you press Enter.
What conv=sync does to the end of DD files
For failing drives, forensics.wiki's imaging notes call conv=noerror,sync a must. With noerror, dd keeps going after read errors. With sync, dd fills the missing bytes with zeros, so the rest of the data stays in place. But sync also pads the last block, and that changes the DD file.
We copied a 41,943,552-byte file with sync at four block sizes. Only the size of one sector gave an exact copy. Every bigger block added zeros at the end, and the hash changed.
| Block size | Copy size | Same hash |
|---|---|---|
| bs=512 | 41,943,552 | Yes |
| bs=4096 | 41,947,136 | No |
| bs=65536 | 42,008,576 | No |
| bs=4M | 46,137,344 | No |
Some guides show bs=64836. That number is not a multiple of 512, and it leaves 324 bytes over. On our 41,943,040-byte DD file, conv=sync with that size made a copy 5,852 bytes bigger, and its hash changed. Without conv=sync the same size gave an exact copy. For failing drives, use bs=512 with conv=noerror,sync.
sudo dd if=/dev/sdb of=usb.dd bs=512 conv=noerror,sync status=progress
We could not make a failing disk on our test machine. What we say about read errors comes from the GNU manual and forensics.wiki, and not from our tests.
Short reads in pipes
Pipes may hand dd less data than it asks for. We sent 2,000 chunks of 1,000 bytes into dd with bs=64k and count=10. Without any option, dd stopped at 284,000 bytes, not the 655,360 we asked for. With iflag=fullblock it gave exactly 655,360.
ssh host "dd if=/dev/sdb bs=1M" | dd of=usb.dd bs=1M iflag=fullblock
Other tools that make DD files
Wikipedia names two forks of dd made for forensic work. The fork dcfldd came from a Department of Defense lab and adds checksums while it copies. The fork dc3dd came from the Defense Cyber Crime Center. We tried both, plus ddrescue for damaged drives.
| Tool | What it adds | Our test |
|---|---|---|
| dcfldd 1.9.1 | Hashes while it copies, with a log | Hash matched |
| dc3dd 7.2.646 | The same, plus a log file | Hash matched |
| ddrescue 1.27 | A map file, so it can resume and retry | Hash matched |
How Do You Check a DD File With a Hash? dd does not hash, so compare two numbers
DD files have no hash inside. Use sha256sum on the source and on the DD file, or let dcfldd or dc3dd hash while they copy. If the two numbers match, the copy is exact. Keep the hash with the file.
forensics.wiki's hashing note says dd by itself does not hash. So the hash is a second step, and it is the only proof that a copy is exact. Hashes are short fingerprints of files: change one byte and the fingerprint changes.
- Hash the source drive before or while you copy it, using sha256sum or a tool that hashes as it goes.
- Hash the finished DD file and compare the two numbers by eye or with sha256sum -c.
- Save the hash in a text file beside the DD file, and hash again whenever you move or open it.
sha256sum usb.dd > usb.dd.sha256
sha256sum -c usb.dd.sha256
dcfldd if=/dev/sdb of=usb.dd hash=sha256 hashlog=usb.dd.hash bs=1M
We hashed our 40 MiB MBR DD file and copied it 10 ways, then split our 24 MiB ext4 DD file as an extra test. The table shows which copies matched. Every route kept the bytes except one, and the one that failed shows why you should check.
| Route | Result |
|---|---|
| dd with bs=1M | Same hash |
| gzip and back | Same hash, 244,477 bytes zipped |
| Split in 8 MiB parts, joined with cat (ext4 file) | Same hash |
| dcfldd and dc3dd with sha256 | Their logs matched sha256sum |
| ddrescue | Same hash |
| VMDK, QCOW2 and VDI and back | Same hash |
| VHD and back | Different. The VHD grew to 41,953,280 bytes. |
| E01 with ewfacquire | The MD5 matched, and ewfverify passed |
The VHD result is a good warning. The default VHD output rounds the size up to fit its disk geometry, so the DD file that came back was 10,240 bytes longer. With the option force_size=on, the round trip gave the same hash. Quiet success from converters proves nothing until you compare the hashes.
Which hash to use. We used SHA-256 for our checks. E01 files store an MD5 of the data, and ewfacquire printed the same MD5 that md5sum gave for our source. If you must match old records, use the same hash the records used.
Why Will Your DD File Not Open? Twelve damage tests, and fixes that took one command
DD files that will not open usually have damaged partition tables or boot sectors. In our tests, spare copies brought back 5 of 12 damaged DD files, rebuilt tables saved 2 more, 2 cut files still read and 3 stayed lost. Work on copies and use conv=notrunc.
We broke copies of the good DD files in 12 ways and tried four readers before and after a repair. The chart shows what the readers could do. Green means all 4 files came back byte for byte, amber means some did and red means none did.
| Damage | Sign | Fix |
|---|---|---|
| MBR wiped | Sector 0 is all zeros | Write a new table with sfdisk |
| GPT header wiped | The file command shows only a protective MBR | Load the backup GPT with gdisk |
| FAT32 boot sector | Sector 0 is all zeros | Copy sector 6 over sector 0 |
| NTFS boot sector | Sector 0 is all zeros | Copy the last sector over sector 0 |
| exFAT boot sector | Sector 0 is all zeros | Copy sectors 12 to 23 over 0 to 11 |
| ext4 superblock | No 53 ef at byte 1,080 | Use a backup superblock, if one exists |
| Cut short | Size below the claim | Pad with zeros, then check |
The repairs, one command per fix
Every repair copies a good piece over a bad one, or writes a new table. Always do it on copies. The option conv=notrunc matters: without it, dd cuts the DD file after the bytes it writes and destroys the rest.
# MBR gone: write a table with the start sector you found
printf "label: dos\nstart=2048, type=c\n" | sfdisk disk.dd
# GPT header gone: gdisk loads the backup. Type w, then y.
gdisk disk.dd
# FAT32: copy the backup boot sector (sector 6) over sector 0
dd if=disk.dd of=disk.dd bs=512 skip=6 seek=0 count=1 conv=notrunc
# NTFS: copy the last sector over sector 0
dd if=disk.dd of=disk.dd bs=512 skip=$(( $(stat -c%s disk.dd) / 512 - 1 )) seek=0 count=1 conv=notrunc
# exFAT: copy sectors 12 to 23 over sectors 0 to 11
dd if=disk.dd of=disk.dd bs=512 skip=12 seek=0 count=12 conv=notrunc
# ext4 with more than one block group: use the backup superblock
e2fsck -fy -b 32768 disk.dd
With these repairs, 9 of the 12 DD files gave back all 4 files. Rebuilt MBRs need the start sector. We found them by scanning the DD files for the boot sectors of the file systems, which gave sector 2,048 for FAT32 and ext4, and sector 43,008 for NTFS.
What the tools could not fix
SysTools says its viewer opens corrupted files, and Freeviewer says its viewer handles damaged DD files of any type. Neither page says how. We tested neither.
Compare before you celebrate. After a repair, hash the files you need against the originals, if you have them, and list the folders with Sleuth Kit. Repairs that mount are not always repairs that return every byte.
How Do You Compress, Split or Convert a DD File? gzip, cat, VMDK, VHD and E01, with a hash check
You can compress, split, shrink or convert DD files, and then check the hash. gzip, cat, VMDK, QCOW2, VDI and E01 all gave back the same bytes in our tests. Default VHD output did not, so use force_size=on.
Raw DD files are big, because they store every byte of the disk, empty space included. Our DD files are mostly empty, so they shrink a lot. Disks full of files shrink much less. The table shows our 40 MiB MBR DD file after five routes.
| Route | Size |
|---|---|
| gzip, level 6 | 244,477 bytes |
| E01, deflate fast | 423,492 bytes |
| VMDK | 524,288 bytes |
| QCOW2 | 786,432 bytes |
| VDI | 2,098,176 bytes |
gzip -k disk.dd
split -b 8M -d -a 3 disk.dd disk.dd.
cat disk.dd.* > joined.dd
dd if=disk.dd of=sparse.dd bs=1M conv=sparse
qemu-img convert -f raw -O vmdk disk.dd disk.vmdk
qemu-img convert -f raw -O vpc -o force_size=on disk.dd disk.vhd
The sparse option makes dd skip blocks of zeros. A 16 MiB DD file of zeros used 16,384 KB on disk, and the sparse copy used 0 KB with the same hash. Split parts join back with cat, and the 3 parts of our ext4 DD file gave the same hash.
Convert DD files to virtual disks
qemu-img reads DD files as raw disks and writes virtual disks. The VMDK file guide, the VDI file guide and the VHD file guide explain how those formats open. All three came back to the same bytes, but default VHD output grew by 10,240 bytes, as the verify section shows.
Convert DD files to E01 evidence files
E01 files add a header, a case record and a stored hash, and they compress the data. The E01 evidence file guide explains the format. We made one with ewfacquire from the libewf tools and checked it with ewfverify. The MD5 inside matched the MD5 of our source.
ewfacquire -u -t disk -c deflate:fast -S 0 -C case1 -D desc -e examiner -E ev1 -N notes -m fixed -M logical -f encase6 disk.dd
ewfverify disk.E01
Raw is the common ground. Almost every tool reads raw files, which is why DD files are the usual way to pass disks between programs. Compressed or sparse copies save space, but unpack them before you mount or hash them.
What Else Uses the DD Ending? DiskDoubler archives and look-alike disk images
The .dd ending covers raw disk images and DiskDoubler archives. Read the first sector before you choose a program, because raw DD files need disk readers and DiskDoubler archives need old Mac archive tools.
FileInfo's page for .dd lists one meaning only: DiskDoubler archives. It describes compressed archives made by DiskDoubler, a Mac OS Classic utility from Symantec that is now discontinued. It names a few programs: File Viewer Plus, IsoBuster and 7-Zip for Windows, and The Unarchiver for Mac.
That is not the kind a person means today. The raw DD files from dd are what forensic pages, Linux guides and the DD viewers describe. We found no DiskDoubler sample to test, so we cannot say whether those programs open one.
| Kind | Made by | Note |
|---|---|---|
| Raw disk image | dd, dcfldd, dc3dd, ddrescue | Starts with a table or a file system |
| DiskDoubler archive | Symantec | Compressed, says FileInfo. Not tested. |
| Split raw image | dd and split | Numbered parts. Join them with cat. |
How to separate the two kinds
Raw DD files start with a partition table or a file system name, and their sizes are multiples of 512. A compressed archive has no such start, and its bytes look random. If the first-byte check finds none of the known starts, your DD file may be an archive or a damaged disk copy.
Disk images with other endings
Many disk images are not DD files, even though they have a similar look. Floppy images end in .ima, and the IMA floppy image guide covers them. The overview of disk image file types compares the rest. ZIP and RAR files are archives and not disk copies, so read the guide to ZIP archives or the RAR archive guide for those.
What Is the DD File Format Made Of? The facts we could check, and what we left out
Raw disk images have no specification, because DD files are only the bytes of disks. These are the facts we could check against Wikipedia, the GNU manual, forensics.wiki, FileInfo and our own 20 DD files.
| Item | What we could check |
|---|---|
| Name | Raw disk image made by dd. FileInfo lists DiskDoubler Archive for the same ending. |
| Extension | .dd, and .img for the same kind of file, says forensics.wiki |
| Maker | dd, written by Ken Thompson and released in Version 5 Unix in 1974, says Wikipedia |
| Status | No specification. Raw DD files are the bytes of the source and nothing else. |
| Header | None. There is no compression and no hash inside. |
| Block size | 512 bytes by default, says the GNU manual |
| Size | The same as the source. conv=sync can add zeros at the end. |
| Start |
MBR: 55 aa at byte 510. GPT: EFI PART at byte 512. FAT32: FAT32 at byte 82. NTFS and exFAT: names at byte 3. ext4: 53 ef at byte 1,080.
|
| Spare copies | FAT32 sector 6, NTFS last sector, exFAT sectors 12 to 23, GPT at the end and ext4 backup superblocks |
| Forks | dcfldd and dc3dd add hashes, says Wikipedia |
About the start values we list
The start values come from our DD files, made by Linux tools in October 2026. Other versions of those tools may write other values in other places, like the label or the OEM name. So the table lists only the values that the readers used to find the file systems.
What we left out
We did not test failing disks, so read errors, conv=noerror and ddrescue retries come from the manuals. We did not test DD files over 44 MiB or any DD file made by FTK Imager or EnCase. We also skipped BitLocker, RAID, LVM, APFS and HFS+ volumes. We did not test macOS or Windows tools.
We did not test the SysTools or Freeviewer viewers or any DiskDoubler archive. What we say about them comes from their pages and from FileInfo. We name no prices, because we found none that we could check on a page.
Our damage tests are simple breaks in a small set of DD files. We tried four readers, and others may behave differently. The numbers in this guide show how those readers behaved, and they are not rates for all DD files.
Sources checked
For the history of dd, its name and its forks, see the Wikipedia article on dd. For every option we used, see the GNU dd manual. For block size, read errors and hashing, see the forensics.wiki page on dd. For the DiskDoubler meaning, see the FileInfo entry for .dd.
For the two viewers, see the SysTools DD Viewer page and the Freeviewer DD Viewer page. Every test count came from the 20 DD files and the scripts in our research folder.
Frequently Asked Questions About DD Files
What is a DD file?
It is usually a raw disk image: an exact copy of a disk, a USB drive or a partition, made with the dd command. DD files have no header, no compression and no hash, so their size equals the source. The first sector shows the kind, like a partition table or a file system. FileInfo lists a second meaning, DiskDoubler archives from old Macs.
Which program makes DD files?
The dd command makes them. Wikipedia says Ken Thompson wrote it for Version 5 Unix in 1974. Two forks, dcfldd and dc3dd, add hashing while they copy, and ddrescue is made for damaged drives. In our tests, all three tools made DD files with the same hash as the source.
How do I open a DD file?
Copy it first. Then open the copy with 7-Zip, with Sleuth Kit, with a Linux mount at the right offset or with a DD viewer. In our test, Sleuth Kit read all 7 DD files with file systems and 7-Zip read 6. We did not test the SysTools or Freeviewer viewers.
How do I open DD files on Windows?
Install 7-Zip and open your DD file as an archive, which takes a minute. On our DD files it worked for FAT32, ext4 and NTFS, with or without partition tables, but not for exFAT. SysTools and Freeviewer both describe Windows viewers for DD files, and their pages disagree with themselves about Windows 10, so check before you install.
How do I mount a DD file on Linux?
Print the partitions with mmls or sfdisk, multiply the start sector by 512 and mount that offset read-only. For example, mount -o ro,loop,offset=1048576 disk.dd /mnt/dd opens a partition that starts at sector 2,048. NTFS and exFAT need loop devices and ntfs-3g or mount.exfat-fuse. Bare file systems need no offset.
How do I make a DD file?
Use dd with if= for the source and of= for the output, a block size of 4096 or more and status=progress. Check both names twice, because swapping them erases the disk. For failing drives, use bs=512 with conv=noerror,sync, and then hash the result. Add the hash to your notes.
Why is my DD file bigger than the disk?
The option conv=sync pads the last block with zeros. We copied a 41,943,552-byte file with conv=sync, and only bs=512 gave an exact copy. A block size of 4 MiB produced 46,137,344 bytes. Use a block size that divides the size of the disk, or use bs=512 for failing drives.
How do I check that a DD file is an exact copy?
Hash the source and the DD file with a tool like sha256sum and compare the two numbers. The dd command does not hash by itself. The forks dcfldd and dc3dd can hash while they copy. In our tests, gzip, cat, VMDK, QCOW2, VDI, ddrescue and E01 all kept the same bytes. Default VHD output did not, because it grew by 10,240 bytes.
Why will my DD file not open?
The usual causes are wiped partition tables, wiped boot sectors or cut-off copies. In our 12 damaged DD files, spare copies and rebuilt tables brought back 7, and 2 cut files still read. Three stayed lost: a small ext4 file with no spare superblock, an overwritten block and a wiped FAT32 directory.
Can I recover deleted files from a DD file?
Sometimes. DD files copy free space, so a deleted file may be inside. On a FAT32 DD file, Sleuth Kit listed three deleted files and returned all three byte for byte. On ext4 it returned 0 bytes, because ext4 clears the pointers. New writes after the delete can overwrite the data, and we did not test that.
Can I convert a DD file to VHD, VMDK or E01?
Yes. The qemu-img program converts raw DD files to VMDK, QCOW2, VDI and VHD, and ewfacquire makes an E01 file. In our tests, all of them gave back the same bytes, except default VHD output. Add force_size=on for VHD files, and compare the hash after every conversion.
Is a .dd file always a disk image?
No. FileInfo lists a different meaning for .dd: DiskDoubler archives, made by a Symantec utility for Mac OS Classic. Most guides and tools mean the raw disk image. Read the first sector and the size before you decide. Raw DD files start with tables or file system names and have sizes that are multiples of 512.
Still Stuck With a DD File? Eight routes out, depending on what went wrong
Start with the damage test grid. A wiped table or boot sector explains most cases, and a spare copy often fixes it.
Go to the mount steps. Find the offset, mount read-only and copy the files.
Is it an Apple disk image? The DMG disk image guide explains the Mac format.
Is it an evidence file from a forensic tool? The EnCase E01 guide covers the format with a stored hash.
Is it a virtual disk? The VHD virtual disk guide and the VMDK virtual disk guide explain the two common formats.
Is it a floppy image? The IMA file guide explains the format.
Is it a generic data file? The DAT data file guide explains how to read the first bytes of a file with an unclear name.
Is it a file type you do not know? Browse the file extension resource library, or send it to us on the submit a file type page.