DD-Image mounten

Moin!

Da meine HDD die Tage abgekaspert ist, habe ich im recovery mit dd 'ne Kopie angelegt (dd bs=512 if=/dev/bla of=/some_dir/blub.dmg conv=noerror,sync).

Jetzt weiß ich leider nicht, wie ich die mounten kann.

Code:
$ hdiutil imageinfo HD.dmg 
Backing Store Information:
	URL: file:///Users/x/Documents/HD.dmg
	Name: HD.dmg
	Class Name: CBSDBackingStore
Class Name: CRawDiskImage
Checksum Type: none
Size Information:
	Total Bytes: 237459943424
	Compressed Ratio: 1
	Sector Count: 463788952
	Total Non-Empty Bytes: 237459943424
	Compressed Bytes: 237459943424
	Total Empty Bytes: 0
Format: UDRW
Format Description: raw read/write
Checksum Value: 
Properties:
	Encrypted: false
	Kernel Compatible: true
	Checksummed: false
	Software License Agreement: false
	Partitioned: false
	Compressed: no
Segments:
	0: /Users/x/Documents/HD.dmg
partitions:
	partition-scheme: GUID
	block-size: 512
	partitions:
		0:
			partition-name: Protective Master Boot Record
			partition-start: 0
			partition-synthesized: true
			partition-length: 1
			partition-hint: MBR
		1:
			partition-name: GPT Header
			partition-start: 1
			partition-synthesized: true
			partition-length: 1
			partition-hint: Primary GPT Header
		2:
			partition-name: GPT Partition Data
			partition-start: 2
			partition-synthesized: true
			partition-length: 32
			partition-hint: Primary GPT Table
		3:
			partition-name: 
			partition-start: 34
			partition-synthesized: true
			partition-length: 6
			partition-hint: Apple_Free
		4:
			partition-UUID: 1F2E9FC0-324B-4BC6-B8C6-E6123D78B778
			partition-name: EFI System Partition
			partition-hint-UUID: C12A7328-F81F-11D2-BA4B-00A0C93EC93B
			partition-start: 40
			partition-number: 1
			partition-length: 409600
			partition-hint: C12A7328-F81F-11D2-BA4B-00A0C93EC93B
			partition-filesystems:
				FAT32: EFI
		5:
			partition-name: 
			partition-start: 409640
			partition-synthesized: true
			partition-length: 463379279
			partition-hint: Apple_Free
		6:
			partition-name: GPT Partition Data
			partition-start: 463788919
			partition-synthesized: true
			partition-length: 32
			partition-hint: Backup GPT Table
		7:
			partition-name: GPT Header
			partition-start: 463788951
			partition-synthesized: true
			partition-length: 1
			partition-hint: Backup GPT Header
	burnable: false
Resize limits (per hdiutil resize -limits):
hdiutil: resize: cannot get resize information for "HD.dmg"
(failed - internal error)
hdiutil: imageinfo failed - internal error

Code:
$ fdisk HD.dmg 
Disk: HD.dmg	geometry: 28869/255/63 [463788952 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -  625142447] <Unknown ID>
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused

Folgendes habe ich (nach einigen Lösungsvorschlägen via Google) bereits versucht:
Code:
$ mount -t hfs HD.dmg /Volumes/HD
GetMasterBlock: Error 25 getting block size
GetMasterBlock: Error 25 getting block size
mount_hfs: Block device required

Code:
$ hdiutil attach -readonly HD.dmg 
hdiutil: attach failed - no mountable file systems

Code:
$ hdiutil attach -imagekey diskimage-class=CRawDiskImage HD.dmg 
hdiutil: attach failed - no mountable file systems

Ich hoffe jemand hatte bereits ähnliche Probleme, und hat vor allem einen Lösungsweg!

PS: Ich hab OS X 10.9 Mavericks am laufen.
 
Gibt's einen Grund warum du das Festplattendienstprogramm nicht nutzt?

Ansonsten... dd erstellt ein ISO-Image und kein DMG, egal wie du es benennst. Ein einfaches 'hdiutil mount deinimage.iso' sollte da zum Mounten reichen.
 
Weil das Disk Utility soweit ich weiß auch nur 'n Frontend ist.

Funktioniert leider beides nicht:
ScreenShot20130914at184957.png


Code:
$ hdiutil mount HD.iso 
hdiutil: mount failed - no mountable file systems

/e: Das sagt das log von Disk Utility:
Code:
2013-09-14 18:54:01 +0200: Attach Image “HD.iso”
2013-09-14 18:54:01 +0200: Initializing…
2013-09-14 18:54:01 +0200: Attaching…
2013-09-14 18:54:01 +0200: Mounting…
2013-09-14 18:54:01 +0200: Attaching…
2013-09-14 18:54:01 +0200: Finishing…
2013-09-14 18:54:02 +0200: Unable to attach “HD.iso.” (no mountable file systems)
2013-09-14 18:54:02 +0200: 
2013-09-14 18:54:06 +0200: 
	Name : 	HD.iso
	Type : 	Disk Image

	Disk Identifier : 	disk3
	Media Name : 	Apple read/write Media
	Connection Bus : 	Disk Image
	Disk Image Path : 	/OSX/Users/x/Documents/HD.iso
	Full Path : 	/Users/x/Documents/HD.iso
	Partition Map Scheme : 	GUID Partition Table
	Device Tree : 	IODeviceTree:/
	Writable : 	Yes
	Ejectable : 	Yes
	Total Capacity : 	237,46 GB (237.459.943.424 Bytes)
	Disk Number : 	3
	Partition Number : 	0

/e2:

Ich bin weiter!

Code:
$ hdiutil attach -noverify -nomount HD.iso 
/dev/disk3          	GUID_partition_scheme          	
/dev/disk3s1        	EFI   
                         	
$ diskutil mountDisk /dev/disk3
Volume(s) mounted successfully

Nur leider ist dieses EFI-Ding leer.
 
Zuletzt bearbeitet:
Ah ok, dein Problem besteht darin, dass du ein Multipath-Image erstellt hast (also eines mit mehreren Partitionen), da du die gesamte Platte und nicht die einzelnen Partitionen in's Image gepackt hast. Da bleibt dir nur übrig die gewünschten Partitionen aus dem Image zu extrahieren. Dazu müsstest du aber erstmal die genauen Sektor-Werte aus dem Image haben. D.h. du musst wissen wo die zu extrahierende Partition beginnt und wie viele Sektoren sie umfasst. Das kannst du mittels 'fdisk <imagedatei>' ermitteln.

Der Output dürfte dann etwa so aussehen:

Code:
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
*1: 17    0   2   1 - 1022 155  32 [        64 -    5106752] OS/2 hidden
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused

Mit diesen Informationen kannst du die gewünschte Partition extrahieren:

Code:
sudo dd if=<input-image-datei> of=<output-image-datei> skip=<start-sector> count=<anzahl-der-sektoren>

Das so extrahierte Image, das dann nur noch eine Partition enthält, sollte wie gewohnt mountbar sein.
 
Code:
$ fdisk HD.iso 
Disk: HD.iso	geometry: 28869/255/63 [463788952 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -  625142447] <Unknown ID>
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused

"Als Partitionskennung wird der Wert EE für einen Schutz-MBR (mit nachfolgender GUID-Partitionstabelle) oder EF bei einer EFI system partition verwendet.[2]" (GUID Partition Table)

fdisk kann anscheinend nicht mit GUID umgehen. »gpt« könnte, tut aber nicht:
Code:
$ gpt -r show -l HD.iso 
gpt show: error: bogus map
gpt show: unable to open device 'HD.iso': Undefined error: 0

Auch mit einbinden und gpt darauf ansetzen geht nichts:
Code:
$ hdid HD.iso -nomount
/dev/disk3          	GUID_partition_scheme          	
/dev/disk3s1        	EFI                            	
$ gpt -r show -l /dev/disk3
gpt show: error: bogus map
gpt show: unable to open device '/dev/disk3': Undefined error: 0

Was mir jetzt noch einfallen würde, ist mit'm Hex-Editor die Partitionsanfänge irgendwie rausfriemeln ...

/e: Es ginge anscheind auch ohne extrahieren:
Code:
$ hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount -section 209717248 HD.iso 
/dev/disk3

Klappt natürlich nicht:
Code:
$ hdiutil mount /dev/disk3
hdiutil: mount failed - no mountable file systems

Ich versuch's jetzt noch mal mit deinem dd-Vorschlag.

PS: Das Image ist nicht vollständig. Nach den extrahierten Informationen sollte das Image 319213192704 Bytes lang sein, also 297.290452 GB. Das Image ist aber nicht mal 222 GB groß. Würde auch erklären wieso von der GPT kein recover header am Ende zu finden ist.

/e2: Deinen Vorschlag versuche ich jetzt. Aller letzte Möglichkeit wäre wohl noch den Header an's Ende zu kopieren und ohne irgendwelche checks zu mounten. Dann müssen irgendwelche forensischen Tools herhalten.
 
Zuletzt bearbeitet:
Zurück
Oben