Using DD to create and write disk images

With SCSI being essentially obsolete, and the fact that Macintosh systems (since OS X 10.6 I think) can no longer write to HFS formatted disks, the best way to use modern systems when setting up your classic 68k system is to create a bootable drive image using a Macintosh 68k or PowerPC emulator then writing that disk image to a real or emulated disk drive. This guide is written for Disk Duplicator (DD) is a standard application that can be used for imaging hard drives, removable drives, memory cards, usb keys, and CD ROMs.

Disk images are essentially binary (bit for bit) copies of the contents of a storage device or medium such as your Hard Drive, removable drive, memory card or CD-ROM (ISO files).  There are several types of disk images you’ll come across working with 68k systems:

  • Disk Copy 4.2 images, typically of floppy disks.   These were created by Disk Copy 4.2 a program provide by Apple, and were the most common images for sharing Macintosh software.   Now under emulation they are less popular, but they can be converted to standard “raw” disk images
  • Raw Disk Images of Floppy disks: contain a binary copy of a floppy disk.  The file size is the same size in bytes as the maximum amount that can be stored on the disk, e.g. 400k, 800k or 1440k.  These images can be used with Floppy-Emu, and can be read by emulators.
  • A Partition Image: contain a binary copy of a single partition from a hard drive or removable drive.  When emulators refer to a hard drive file, a Partition Image is typically what they are actually referring to and support.  These images lack both the boot sector, partition map.
  • A Hard Drive or Removable Drive Image : contain a binary copy of the complete contents of an initialized drive including the drive’s boot and partition information.   vMac can NOT read these files, Basilisk II can read and update the the first partition of these files, but not initialize them (partition them).   So far I’ve found 3 emulators that can initialize and image: MAME, PCE/macplus, and SoftMac, I’ve created a separate blog entry for comparing what emulators can initialize and partition image files.

This blog entry covers:

  1. Writing an image file using DD to a floppy, hard drive, zip drive, jazz drive or SCSI2SD card (the SCSI2SD can emulate up to 4 drives using a single SD card),
  2. Images I’ve created for you to use
  3. Modifying the contents of disk images (mine or yours),
  4. How to create your own images from a real or emulated (memory card) hard drive or removable drive (e.g. zip disk),
  5. Creating and Initializing your own images using an emulator

1. Using DD to write an image

NOTE: You can not simply copy one of the raw disk image files or drive image files to the target media as a file. These images must be raw-written to the target media replacing all information on that target. This section describes how to use DD to write the image file to the target device. Note DD doesn’t come with Windows, but you can download version 0.6beta3 or the newer 64bit beta created by John Newbigin.

Do you have to use DD? No, if you don’t want to use DD you can use any program on your system that let’s you raw-write to your target media (disk / drive / card). Currently I mainly use BalenaEtcher on Windows, or the USB Image Tool by Alexander Beug when writing to an SD card for SCSI2SD, my USB attached floppy, or USB attached zip drive. But I still use DD when I want to update a single partition or the second drive on the SD card for SCSI2SD, or when I want to write to a non USB device, e.g. a drive attached to my SCSI card.

  1. Insert the SD card (for SCSI2SD), connect your USB zip drive or USB floppy, or connect your SCSI drive, e.g. zip, jazz, hard drive etc. (I have working Windows 10 drivers for some SCSI cards)
  2. The actual capacity of media is not standard, e.g. I have two 4GB SD cards, one that has a capacity of 4,024,434,688 bytes, and another that has a capacity of 3,965,186,048. So please Check the capacity of the media you are planning to write to make sure that there is enough room for the image to fit.
  3. Do a full format to make sure there are no errors with the target disk / drive / card
  4. Open the terminal / command line window
  5. Type dd --list (windows), diskutil list (linux and mac OS) and press return
  6. You should see a list of all attached drives for your system, with their names, you should see the name or your micro SD, SD or CF card, you want the identifier of the floppy drive eg. /disk2. WARNING: Be sure you have identified the correct drive. If you accidentally “write” the image to the wrong disk you will overwrite data on that disk
  7. For linux and mac OS: type diskutil unmountDisk /dev/{identifier from step 3}, e.g.  diskutil unmountDisk /dev/disk2 and press return
  8. You should see a message: “Unmount of all volumes on {identifier from step 3} was successful”,
  9. The micro SD, SD or CF drive icon should disappear from your desktop (if it did not you may not have the correct device name, check to see if any of your other drives have stopped working) (I say should, because I’m unsure of this step, I believe unmounting the drive should cause it’s icon to disappear)
  10. Use dd with the correct input and output options (read points below), “dd if=INPUTFILE of=OUTPUTFILE bs=BLOCKSIZE
    • INPUTFILE = the location and name of the image you downloaded or created, you can optionally type “dd if=” then drag the disk image file on to the terminal server, this “should” insert the text you need for the input file.
    • OUTPUTFILE =  {identifier from step 3}, e.g. /dev/disk2 or for windows \\.\Volume{GUID}
    • BLOCKSIZE, if dd is taking a long time, you can set the block size to speed things up, but what you set it at is dependent on the speed of the device you are working with, and the size of the image file you are working with,  if you are working with an SD card try setting it to bs=1M.
    • e.g.
      • linux or mac OS type “sudo dd if=OS_755_2GB.dsk of=/dev/disk2 bs=1M
      • for windows type “dd if=OS_755_2GB.dsk of=\\.\Volume{bc8eb0e4-a23d-11e8-9982-00e18c7bb83e} bs=1M --size --progress
    • press return
  11. When your Modern System is done writing the image, exit the terminal / command line window and remove your card (or USB adapter and card)
  12. Your computer may report that the drive or card is no longer formatted.   That’s ok.   All that means is that is it now formatted in a way your computer doesn’t recognize.
  13. Insert your your SD, microSD or CF Card in to your SCSI adapter
  14. Turn on your Classic 68k Macintosh and it should boot

2. Using one of the disk images I’ve already created

I have created some drive images (found on my downloads page) formatted with Hierarchical File System (HFS), containing both System 6.0.8 and System 7.5.5 for Floppy, Jaz and Zip disks, and SCSI2SD cards, note the image files are compressed, and are typically around 40MB in size to download. If you not sure if you want the 6.0.8 image or the 7.5.5 image, you should first determine which operating system you can, or want to run on your classic Macintosh, and check that your drive/card/media can hold the contents of the image.

3. Modifying the contents of a disk image

Once you either downloaded one of the drive images I’ve created (section 2), or created your own (section 4 and 5), you’re probably going to want add files to the image before you write the image back to your drive, disk or memory card.   You can also always update the again later on by creating a new image file from you media after you’ve worked with it for awhile.

3.1. Drive images with 1 partition

3.2 Drive images with multiple partitions.

If your drive image is smaller than 3GB you can also use SoftMac to edit the drive image without corrupting your partitions. Since I’m typically working with drive images larger than that I use DD to break up the image in to 1 file for each partition. If you have used DD to extract a single partition from your drive / card you can use the options in 3.1, and also can use the partition image with:

  • HFVExplorer,
  • Mini vMac

4. Creating your own hard drive / removable drive images (to initialize, edit or just as a backup)

The steps I follow when using DD to create the drive image from a physical drive / card:

  1. If I’m using windows, download dd for windows
  2. I attach or insert the hard drive, removable drive (Zip Drive, Jazz Disk etc), memory card (SD, Compact Flash etc.) that I want to image (see options 6 to 8 from my blog entry for Setting up your vintage (classic) 68k Macintosh for a list of connection methods)
  3. open the terminal / command line window
  4. Type dd --list (windows), diskutil list (linux and mac OS) and press return
  5. You should see a list of all attached drives for your system with their names, you should see the name or your micro SD, SD or CF card, you want the identifier of the floppy drive eg.
    • for linux or mac OS something like /dev/disk2
    • for windows something like \\.\Volume{bc8eb0e4-a23d-11e8-9982-00e18c7bb83e}\
  6. Use dd with the correct input and output options, “dd if=INPUTFILE of=OUTPUTFILE bs=BLOCKSIZE”:
    • INPUTFILE = {identifier from step 5}, e.g. /dev/disk2 or \\.\Volume{GUID}
    • OUTPUTFILE =  the location and name of the image you would like to create.
    • BLOCKSIZE, if dd is taking a long time, you can set the block size to speed things up, but what you set it at is dependent on the speed of the device you are working with, and the size of the device you are working with,  if you are working with an SD card try setting it to bs=1M (instead of the default of 512).
    • e.g:
      • linux or mac OS type “sudo dd if=/dev/disk2 of=OS_755_2GB.dsk bs=1M
      • for windows type “dd if=\\.\Volume{bc8eb0e4-a23d-11e8-9982-00e18c7bb83e} of=OS_755_2GB.dsk bs=1M --progress
    • press return
    • wait…. if you’ve connected via SCSI 1, USB 1 or USB 2, this could take some time for larger drives

If I just want to create a “blank” file that I will use an emulator to initialize, then write to a portion of an SD/CF card:

dd if=/dev/zero of=my.img bs=1M count=1880 results in an ~ 2GB image.

5. Using an emulator to initialize the drive image

If you plan is to write back the disk image to a real or emulated drive, and then boot your 68k Macintosh from that drive, the image will have to be initialized to add the boot block and partition table.   Most emulators can not do this, they do not treat drive images as actual drives, instead they treat them as partitions, when these “partition” images are written back to you real or emulated drive they are missing the boot block and partition table and will not boot. I’ve created a separate blog entry for comparing what emulators can initialize and partition image files.

42 thoughts on “Using DD to create and write disk images

  1. This blog has been insanely helpful, but there’s just one thing I’d like to ask.

    After I get the image onto the SD card (and it now works in my MacSE30) let’s say in a month or two I want to take the image off the SD card and run in Basilisk?

    My question is: how do I copy the image from the SD card back to my computer? This would ensure I could make backups of my MacSE30’s contents (for example: word documents, saved games, keep my settings, etc.)

    Thanks so much, I look forward to your reply.

    • You can create an image file of everything on your SD card following the steps for “Creating your own disk images” in section 3 of this page and create an image of the entire SD.
      But as you’ve likely already read Basilisk will only be able to read the first partition of the image.
      There is a way to access the other partitions, but it’s tricky. You should be able to set the start and end position for dd to line up the the start and end location of the partition in the file, but if you get things wrong it will be a mess, so I just use the first partition in the image to add files, or use SoftMac instead (as described in section 5 of this entry)

      • Hi Steve,
        I followed your steps in Section 3 and made an image of a formatted/initialized SCSI2D disk on my Color Classic but when I open it in Basilisk II to edit the contents, it opens as a read only volume and I can’t make any changes.
        Am I missing something when I’m making the image?
        Cheers,
        Ben

        • Odd, it could be that the file was still “open” by another application, or for some reason flagged as read only. Did the SCSI2SD have more than one drive/partition?

  2. Awesome guide here.

    So at its core we can just download one of your .dsk images and write that to a CF using the USBtool and that should be it right? I have an LC580 and it uses an IDE drive so im using an IDE to CF adapter.

    Thanks for the help.

    • Hi Dean, I’m not sure. The SD2SCSI adapter lets you define the portion of the card that contains the image file, so if the file isn’t the exact same size of the card the extra “space” is ignored. I don’t think that’s an option with your IDE to CF adapter. So the best way to find out is try it with a file that is close to the the size of you CF card, once/if it boots run a repair tool on the disk to see if there are any errors.

    • HI Jason, no it doesn’t have to be formatted in any specific file system. I suggested formatting your SD card at least once to ensure that it is functional. Writing one of my files to your card will overwrite any formatting on your card for the section of your card it is written to. Don’t be surprised if after you’ve written one of my files your computer reports that the card is no longer “formatted”. That’s fine and expected.

      • Thanks!
        Also, just a note…..on OSX the command “bs=1M” returns an error. I had to replace it with “bs=1m”

  3. I really appreciate all of the effort that you put into these guides, but I absolutely cannot my Macintosh SE to boot from the SCSI2SD.

    I formatted the 2GB SD card. Set it up as 2, 1 GB partitions. Loaded your 1GB image into Basilisk. Installed System 7 as you described. Used OSX dd to copy the image to the SD card.

    A long time later the writing is done, I insert the SD card into the SCSI2SD….boot and nothing happens. Just a floppy disk with a flashing ?

    I have to be missing something, right? I’ve repeated the steps over and over again. I can’t find what I’m missing.

  4. Is there a way to prepare bootable SD using MacOS and USB-attached SD Card writer?

    For example using TI Book, MacOS 9, Disk Copy etc. The bootable stuff is located on Zip100 or on Jaz 1 GB Disks (Which can be attached TI Book via USB or FireWire.

    Or using Pismo or a PowerMac with USB-card?

    • Hi Pentti. Filling in some gaps in what you said… yes if you have a USB Zip 100, or USB Jaz 1 GB you’ll be able to image a disk from one of those using DD, then write that image file using DD to an SD card.
      Then in the SCSI2SD set up you can set the size of device 1 to match the size of the image file you wrote.
      If it is a zip drive you’ll likely want to set the SCSI2SD to pretend it’s a zip drive… not sure what the settings are for the Jaz 1GB I only have a Jaz 2GB.
      Vendor IOMEGA
      Product ID ZIP 100
      Revision D.09
      I also have a Iomega Zip 100, I’ll write a blog post with the step when I have a chance.

    • Hi Mihhru, not sure what you mean by writing the second disk image via dd? Do you mean the second image I refer to in Step 6 of: http://www.savagetaylor.com/2018/01/05/setting-up-your-vintage-classic-68k-macintosh-using-a-scsi2sd-adapter/?

      If so, I use that second image in an emulator to get it set up, once it’s set up and bootable, I write it as the first image to my SD card (as drive 0 under the SCSI2SD control panel). I then set up the remaining empty portion of the card as one or more drives. I then boot my mac and use my patched HD SC Setup to initialize and partition that empty space…. not sure if that helps?

      • Thank you very much. I finally read Step 6 more carefully. =)
        Everything is fine. Both of my Mac Classic and Mac SE load games and software.
        I don’t know what I would do without information on this site. Thank you for your unique work.

  5. Hi,

    This is just what I’m looking for so thanks for taking the time to write it up and provide the images. I am having issues in downloading the 2GB imahes for 6.0.8 ans 7.5.5 – in both cases the transfer stops after 1.5MB. Have you pulled the images?

    • Hi Dave, I just tried to download, and both worked for me, I’n not sure why the transfer is stopping for you. Try again and let me know, perhaps there was a temporary issue with my server, or your ISP.

  6. —>hi, I have a Macintosh Plus 1m and FloppyEMU. Download the “OS_608_HD_1GB”. But it doesn’t work. Error on screen”file not contiguous”.

  7. The page for the preinstalled disk images NOT FOUND!!! UH OH!!! What do you do with a drunken Macintosh early in the morning?

    • Hi Kyle, I found the broken link, it was to a page I had created listing info on my collection. What you needed was the link to the “downloads” page that has the images…. I updated the post to make it clearer which link now contains the images. Let me know if something still isn’t working.

  8. Hey Steve,
    (Mac Classic, SCSI2SD V6)
    I was successful in creating 3 images, each 1.9GB. I installed 7.0.1 on the first image and it boots up just fine.
    I was under the impression I could put the SD card in my Mac and put software on there to then be installed when back in the Mac Classic, but the drives won’t mount. Even if I was to use an emulator like vMac or BasiliskII, I don’t know how I’d access the SD card partitions without it mounting. How do you suggest I boot an emulator from the SD card so I can install and make changes?

    Thank you!

  9. hi im having trouble with getting my classic ii to see a bootable drive. i downloaded the 6.0.8 2gb and im using a scsi2sd 5.1. i have gone through the scsi2sd utility and set up a 2gb for dev 1 and 12 gb for dev 2. making no changes to your img when i got to write to the sd card with balenaEtcher i select the file and get a message that its missing the partition table and it may not boot. it will flash just fine but sure enough when i try to boot my machine i just get a disk ? icon. any help would be appreciated.

    • Hi Michael, the error with balenaEtcher is normal, it’s saying that because it doesn’t recognize the Mac partition table in the image. (I’ll update the blog to with a comment out that)
      For why it’s not booting… are you using it internally or externally with your classic ii?
      The 5.1 adds a setting in the SCSI2SD config software for enabling termination through software. If you are using it internally, you may need to set the termination to off. If you are using it externally, you may need to set the termination to on.

      • wow thanks for the super fast reply! okay good to know, i am using it internally and i did have the termination checked. i have unchecked it, updated device, flashed again but still get the ? icon. in scsi2sd util on gen settings nothing else is checked, speed is set to normal, delay is 0, scsi selection delay is 255. anything else you can think for me to try?

        • also not sure if it matters but the led on the scsi2sd board flashes once when the when the mac starts up but that is all there are no further flashes. not sure if that is an indication of anything. it has the ribbon cable to the logic board and its getting 5v from the analog board via the old hard drive power cable. i cut the 12v wire from the molex to the scsi2sd as i saw a few post saying to do so.

          • Odd, I haven’t read about cutting the 12v wire before. I have two version 5 scsi2sd boards, one I use internally in my LC475, the other I use externally.
            Did you have your Classic II working with a Harddrive before, and is there any sign on the board of failing capacitors etc? The other thing you can try is disconnecting the molex power, and instead with the case open connect the SCSI2SD to a usb power source.
            You might want to post on 68kMLA forums, that’s where I go when trying to troubleshoot. https://68kmla.org/forums/

          • Hi Michael,

            I am having the same issue as you, I can boot the image with Basilisk II, but when burnt to SD, it wont boot on my Performa 475.

            Did you get to solve this at all?

  10. i tried your suggestion about the usb power but no luck. ill head over to the fourms for further assistance. thanks.

  11. Hello, I am struggling to make my v.5.5 work on my Mac Quadra 700 with MacOS 7.6:

    I have formatted a 16gb card with one 1,84GB partition and one 12 GB partitions, bot FAT32;

    with scsi2sd-util I set the sizes as you indicated, and even put different vendor names, but my only results is that the system profiles can see the volumes with the right size and vendor etc names – it says 0 HFS partitions on the volumes tough – and I have no way to mount them.

    I tried with floppies but the drive needs to be serviced, so I cannot run Lido or other tools from there. I could try with apple talk to an Apple IIGS (where the scsi2sd works flawlessly pluggin to the apple scsi card rev 3) but I really would like to find the way to make the 5.5 work. Any hint?

  12. Hi Steve,

    Just got the SCSI2SD that I bought because of you mentioning it in your guide.
    Although I had to read several times, in about 1 hour I got it working with my SE (4MB RAM, 20MB HD, 800K floppy).
    Happy this works so well. Really appreciate your effort, thanks!

  13. Hey Guys
    i use on PC „Ciderpress“ to copy Mac Soft to SD-Card oder Disk… easygoing!

    first deactivate software write protection

    – “Open Drive” Bouton(SD-Card)/ “Add Files” Bouton/ Select Dir/ Select Mac Files to Copy

    or back from SD to PC

    https://a2ciderpress.com/

Leave a Reply to Dean Aceto Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.