1

For some time, i have used DD images at work to quickly transfer a linux image to a new harddrive in case the old one broke. It works great, no complains.

But, i needed to get a file from the image a couple of days ago, and was just about to go grab one of the drives and connect it to my computer to get it that way. However, i tried opening the image file as an archive with 7zip, and to my surprise, it actually worked!

Now is where i get a little confused. I know Windows 10 cant mount an EXT3 formatted drive, so how come 7zip can? I tried to look around, and i stumbled upon this answer, saying 7zip needs to support the filesystem. So, is it because it directly supports EXT3, like it does FAT, or is DD images written in a way where filesystems doesnt matter to 7zip when opening said image?

The reason i am questioning the linked answer is because, to my knowledge anyways, there is no stable program to mount an EXT3 harddrive in Windows 10. I know Ex2Fsd exists, but i have bad experience using said software (corruption, mostly), and so does a lot of other users i have read reviews from.

So, to recap: How can 7zip read an EXT3 DD image? Is it because there is no filesystem in such images, or is 7zip just more cleverly coded than other EXT3 compatible software for Windows 10?

1

1 Answer 1

2

Is it because it directly supports EXT3?

Yes. 7zip does support the Ext family. See this chart.

or are DD images written in a way where filesystems doesn't matter to 7zip when opening said image?

[…]

Is it because there is no filesystem in such images?

Negative. dd creates a binary copy. It will be an exact binary copy, unless

  • there are problems
  • or the copy is fragmentary (skip=, seek=, count=, interrupted)
  • or what's being read keeps changing (analogue in photography: here; that's why you shouldn't dd a read-write mounted filesystem)
  • or you request some conversion with conv=.

None of these cases can reliably turn a filesystem into some filesystem-agnostic archive (whatever it means). I mention them only to indicate the copy may not be exact in some circumstances. In your case I'm sure it was exact.

I understand there was a filesystem on the device. Exactly the same sequence of bytes is available in the image, so the filesystem is there.


there is no stable program to mount an EXT3 harddrive in Windows 10. […]

Is 7zip just more cleverly coded than other EXT3 compatible software for Windows 10?

At least two aspects:

  1. 7zip does not mount anything. It accesses data.

    Mounting a filesystem means making the files and directories within available to any program that wants to access the mountpoint. Such program may know nothing about any filesystem, all it takes is it can open a file in a generic way available in the OS: by specifying its path (e.g. F:\directory\file in Windows or /some/mountpoint/directory/file in *nix). If the filesystem is properly mounted then this will work.

    Your 7zip can read and interpret the image. If you want a random program to access any file that exists inside the image, you can ask 7zip to save a copy (extract the file) to another (mounted!) filesystem. Then the other program can work with the copy. If the filesystem was mounted, no copy would be required.

    In general it's possible to mount a filesystem via a userland program (e.g. FUSE in *nix) or dynamically project its content into the directory tree, so it appears mounted (e.g. ProjFS in Windows). 7zip does not work this way.

    Your 7zip can present the directory structure to you, extract a whole file or many whole files. A program (or OS component) responsible for a mounted filesystem must be able to deal with concurrent access requests from many other programs. They may want to modify data or metadata, to create new files. Even if the filesystem is mounted read-only, there are actions more complicated than reading and saving a whole file (e.g. accessing a random fragment of a large file).

  2. 7zip can read from Ext, not write to it (and it cannot create a filesystem from scratch, see the chart again). The corruption you experienced with another software means the software did some writing. If it only did some reading, the filesystem wouldn't change.

So 7zip is not necessarily more cleverly coded than other software. Its tasks are relatively simple in comparison to what you expect from a program that mounts a filesystem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .