Discussion:
Can DiskWarrior repair dmg files?
Stefan Johansson
2002-09-13 05:03:01 UTC
Permalink
Hi,

as the subject says... Can it repair damaged dmg files?
The dmg file cannot be mounted since it's damaged and I don't know whether
DW can repair only mounted filesystems or fixed disks.

Cheers,
Stefan
William H. Magill
2002-09-13 11:56:01 UTC
Permalink
Post by Stefan Johansson
as the subject says... Can it repair damaged dmg files?
The dmg file cannot be mounted since it's damaged and I don't know
whether
DW can repair only mounted filesystems or fixed disks.
Generally speaking, the only "damage" a dmg file (or a tar ball, for
that matter) suffers is that it is truncated.
Or, put another way -- the file is incomplete, usually from a download
which did not terminate correctly.

Since dmg is a compressed format, it must be uncompressed as part of
the "mounting" process. The fact that part of the file is missing, says
that it won't uncompress error free, and therefore it won't mount.

While it is possible to do, I am not aware of a product which will
allow you to recover some of the contents of a damaged dmg file. Unless
you are using them for backup, the time and effort to needed to
"recover" the dmaged dmg file will be greater than the time to
re-acquire it.

T.T.F.N.
William H. Magill
***@mcgillsociety.org
***@acm.org
Stefan Johansson
2002-09-13 12:02:01 UTC
Permalink
Post by William H. Magill
Post by Stefan Johansson
as the subject says... Can it repair damaged dmg files?
The dmg file cannot be mounted since it's damaged and I don't know
whether
DW can repair only mounted filesystems or fixed disks.
Generally speaking, the only "damage" a dmg file (or a tar ball, for
that matter) suffers is that it is truncated.
Or, put another way -- the file is incomplete, usually from a download
which did not terminate correctly.
When I try to mount the dmg I get an error and when examining it in Disk
Utility the error "Invalid sibling link" is shown. No matter how many times
I run repair on it, it's still there.
Post by William H. Magill
Since dmg is a compressed format, it must be uncompressed as part of
the "mounting" process. The fact that part of the file is missing, says
that it won't uncompress error free, and therefore it won't mount.
Actually it seems that the file is uncompressed, but then OSX says that the
filesystem cannot be recognized when it tries to mount it and Disk Util
shows the "Invalid sibling link" above. So maybe I would be able to run DW
on it, or do you have to have a mounted fs for DW to work?

/Stefan
Post by William H. Magill
While it is possible to do, I am not aware of a product which will
allow you to recover some of the contents of a damaged dmg file. Unless
you are using them for backup, the time and effort to needed to
"recover" the dmaged dmg file will be greater than the time to
re-acquire it.
T.T.F.N.
William H. Magill
Stefan Johansson
2002-09-13 12:05:36 UTC
Permalink
Actually, I was abit unclear in my first post. The dmg file itself isn't
damaged. It's the filesystem within which is damaged...

/Stefan
Post by William H. Magill
Post by Stefan Johansson
as the subject says... Can it repair damaged dmg files?
The dmg file cannot be mounted since it's damaged and I don't know
whether
DW can repair only mounted filesystems or fixed disks.
Generally speaking, the only "damage" a dmg file (or a tar ball, for
that matter) suffers is that it is truncated.
Or, put another way -- the file is incomplete, usually from a download
which did not terminate correctly.
Since dmg is a compressed format, it must be uncompressed as part of
the "mounting" process. The fact that part of the file is missing, says
that it won't uncompress error free, and therefore it won't mount.
While it is possible to do, I am not aware of a product which will
allow you to recover some of the contents of a damaged dmg file. Unless
you are using them for backup, the time and effort to needed to
"recover" the dmaged dmg file will be greater than the time to
re-acquire it.
T.T.F.N.
William H. Magill
William H. Magill
2002-09-13 12:41:01 UTC
Permalink
Post by Stefan Johansson
When I try to mount the dmg I get an error and when examining it in
Disk
Utility the error "Invalid sibling link" is shown. No matter how many
times
I run repair on it, it's still there.
"invalid sibling link" seems to be a frequent problem for 10.2.

I've had to boot back to 9.2 and run Disk First Aid against several
different FireWire drives several times after forced power-cycles.
(It's a good ol'e Unix Sync problem.) I don't know enough about disk
images to know if it is possible for them to have such an error --
intuitively, I would assume not.

Try running Disk First Aid against the drive containing the dmg. It may
be that it really is the dmg file itself, not its contents that are
bad. The mount is simply reporting the error it is getting while trying
to read the disk file, now while actually mounting it.

Can you copy/ duplicate the dmg?

T.T.F.N.
William H. Magill
***@mcgillsociety.org
***@acm.org
Stefan Johansson
2002-09-16 04:40:01 UTC
Permalink
Post by William H. Magill
Post by Stefan Johansson
When I try to mount the dmg I get an error and when examining it in
Disk
Utility the error "Invalid sibling link" is shown. No matter how many
times
I run repair on it, it's still there.
"invalid sibling link" seems to be a frequent problem for 10.2.
I've had to boot back to 9.2 and run Disk First Aid against several
different FireWire drives several times after forced power-cycles.
(It's a good ol'e Unix Sync problem.) I don't know enough about disk
images to know if it is possible for them to have such an error --
intuitively, I would assume not.
Try running Disk First Aid against the drive containing the dmg. It may
be that it really is the dmg file itself, not its contents that are
bad. The mount is simply reporting the error it is getting while trying
to read the disk file, now while actually mounting it.
Can you copy/ duplicate the dmg?
Yes, the dmg can be copied without any problems.

/Stefan
Post by William H. Magill
T.T.F.N.
William H. Magill
Shantonu Sen
2002-09-16 17:25:13 UTC
Permalink
Post by Stefan Johansson
Yes, the dmg can be copied without any problems.
This is no way of mounting encrypted disk images under Mac OS 9. I think
your best bet is to convert the image to a 9-style .img, boot into OS 9,
mount it using the Disk Copy that came with 9, and running Disk Warrior on
that.

1) Open Terminal
2) run "hdid -nomount foo.dmg" and enter your passphrase when prompted.
output should look like:
[repl:~/Documents] shantonu% hdid -nomount foo.dmg
/dev/disk1 Apple_partition_scheme
/dev/disk1s1 Apple_partition_map
/dev/disk1s2 Apple_HFS
3) Convert to an .img with "hdiutil convert /dev/rdisk1s2 -format RdWr -o
foo.img". Change the /dev node as appropriate, and rename the output file
as you wish
4) Boot into Mac OS 9 and double-click on the .img file
5) run disk warrior

When you are done, reboot into Mac OS X, run Disk Copy, select "Convert
Image..." and select the .img and convert it back to an encrypted image.

Shantonu

Loading...