Veröffentlicht / modifiziert: 2025-06-01 / 2025-06-12
Ob das Veröffentichen von Daten als handliches Paket oder das Archivieren von Disketten, optischen Medien oder gar Festplatten. Es ist erstaunlich praktisch und einfach, Disk-Images zu erstellen.
Im folgenden finden sich nützliche Details für die Erstellung, die Verwendung und die Fehlerbehebung von Disk-Images am Mac (Mac OS 10.4 und neuer).
There are two approaches of creating disk images: you can either focus on the media's file system and create a copy of it's content or preseerve the entire structure of the media - not only including partitions and file systems, but also boot sectors, partition tables and even additional track or frame data. As a consequence there are various disk image formats - with raw images one aims to capture everything possible while on the other end of the spectrum ,for example, some DMGs just contain a directory. The fameous ISO image on the other hand is similar to a raw image but focusses only on a disc's track data and does not contain media-specific information.
There are two ways to create an image from a folder:
Disk Utility - The on-screen prompts will guide you. It will by default create a .dmg, which is an macOS-specific file format.
hdiutil - This command-line utility is included in macOS. The easiest way to create a .dmg is hdiutil create test.dmg -srcfolder /path/to/folder/
, if you want to create an ISO with this tool, use hdiutil makehybrid -udf -joliet -iso -o Image.iso /path/to/folder
.
Abbilder können auf drei Arten erstellt werden:
Disk Utility - The on-screen prompts will guide you. It will by default create a .dmg, which is an macOS-specific file format.
hdiutil - With this command-line tool you can create an image from its mount point as this is treated like a normal folder.
dd - Is a straightforward command-line tool you use like this: dd if=/dev/disk1 of=Image.img
. If you want to set a block size and extract an exact number of blocks starting at a specific block use options like this: bs=4096 seek=512 count=1024
. A CD's or DVD's raw sector data is exposed to this tool - therefore the result will be a raw image. In order to create a readable .iso image you will need to extract the actual user data from each 2352 byte large sector. You can use a tool like SEVEN to convert your raw image to an .iso image.
Abbilder können auf drei Arten erstellt werden:
Disk Utility - Disk Utility will also create an ISO (.cdr extension) if you select the "CD/DVD Master" option before creating the image. You can rename the extension (to .iso) after creation if desired.
Roxio Toast - The de facto third-party standard in creating optical media on Mac OS for decades, it will create almost any CD or DVD format you desire.
hdiutil - Since you can use this command to create an image file from a folder you can use it here as well: hdiutil makehybrid -udf -joliet -iso -o Image.iso /path/to/folder
.
Dafür kann es verschiedene Gründe geben:
Sektoren-Rohdaten - Es ist möglich, dass dieses Abbild mit einem Werkzeug wie dd erstellt wurde. In diesem Fall handelt es sich bei der Datei um ein Byte-genaues Abbild einer CD oder DVD aber nicht um eine ISO-Datei. Der Versuch, dieses Image als Laufwerk zu öffnen, scheitert ohne Meldung und file /path/to/image
gibt /file/to/image: data
aus. Ohne jeden 2352 Bytes großen Sektor auf die eigentlichen Nutzdaten zu reduzieren wird ein solches Abbild nicht als ISO-Image zu verwenden sein. Sie können eine solche Konvertierung zum Beispiel mit SEVEN durchführen.
Ausgemustertes Apple-Dateisystem - Optische Hybrid-Medien enthalten mehrere Partitionen und/oder Dateisysteme. macOS scheint Apple-eigene Formate zu bevorzugen: exisitiert beispielsweise ein nicht mehr unterstützte HFS-Dateisystem auf dem Medium, wird macOS zuerst versuchen, das zu verwenden, beim Mounten scheitern und aufgeben. Weitere enthaltene Dateisysteme, oft ISO-9660, kommen nicht mehr zum Zuge. Es kann helfen, beim Mounten anzugeben, dass ein Dateisystem ignoriert werden soll - hier HFS: mount -t nohfs Image.iso /path/to/mount/point
.
Um spezifische Partitionen oder Dateisysteme eines Abbilds zu nutzen, lädt man das Image am besten als Gerät: hdiutil attach -nomount path/to/image.iso
. Man erhält eine Geräteliste mit diskutil list
und kann einzelne Geräteknoten manuell einhängen. Hierbei lässt sich, falls nötig, auch ein Dateisystem angeben: mount -vr -t msdos /dev/disk4s2 ~/Desktop/MyDisc
. ISO-9660 wohnt keiner Partition inne - für dieses Dateissystem sollte man das gesamte Medium als Gerät auswählen: mount -vr -t cd9660 /dev/disk4 ~/Desktop/MyDisc
Bitte daran denken, die Dateisysteme und das Image selbst wieder auszuhängen, nachdem die Arbeit getan ist. Es reicht in der Regel, das Auswerfen-Symbol im Finder-Fenster zu nutzen.
Nicht unterstütztes Dateisystem - Es gibt Abbilder von Medien, welche für andere Plattformen und Architekturen gedacht sind. Linux-Dateissysteme wie ext1-4 oder btrfs sind übliche Kandidaten. Um auf darin enthaltene Daten zugreifen zu können, bedarf es Software von dritter Seite. Es ist aber möglich, mit Hilfe des file
-Kommandos grundlegende Information auszulesen - dem Werkzeug bekannte Boot-Sektoren und Dateissysteme sowie in manchen Fällen sogar die Namen von Partitionen werden ausgegeben. Es ist ebenfalls möglich, das Image als Gerät zu laden (siehe oben) und die enthaltenen Geräteknoten zum Beispiel mit diskutil info /dev/disk4s2
genauer zu inspizieren.
Abfahrt planmäßig/ Skizzen aus Bus und Bahn