Benches macOS

7

adjusting/reducing the total capacity of …

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Is there a way, perhaps with a little program besides disk utility, to adjust the capacity of a disk image to the total size of the files it contains? I want to burn one dmg to a cd, the space used in the dmg is less than the capacity of the cd, but the capacity of the dmg is set to a greater value , thus disk utility won't let me burn it to the cd

Of course, without coping the files to a smaller dmg.

Thanks in advance

7 replies

Sign in or join Beachball Help to reply.

  1. 0

    Malcolm Rayfield

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Use the Finder to burn the CD. In the "CDs & DVDs" system preference, set it to "Open Finder" for blank discs. Mount the .dmg file. Insert a blank CD. When the burn folder appears, drag the files from the .dmg file to the burn folder. This does not involve copying the files; it just creates aliases, so is fast, and does not need extra disk space. Click the Burn button, give the disc a name, then burn it.

  2. 0

    roam

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Paul

    You can resize a diskimage using Terminal, found in Applications/Utilities.

    example:

    hdiutil resize -size 80
    m testenc.dmg

    This sets the size of testenc.dmg to 80
    Mbytes

    Open Terminal and type

    hdiutil resize -size

    Decide on the new size and set the size as per the format above, and add a space, and then drag the .dmg file into Terminal to set the path.

    If it is encrypted you will be asked for the .dmg password which you will provide.

    Wait for the prompt to return to indicate the process is completed.

  3. 0

    Paul Korswagen

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    thank you very much. I've played around with hdiutil and when I take the -limits of the dmg, is specifies it's actual size, and when I try to resize it to a size, above the used space, it tells me "can't do".

    what am I doing wrong? Would -fsargs work? and how do I use it?

    Thank you very much for your help!

  4. 0

    roam

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    The -limits reports size parameters in 512k segments which is not terrible useful.

    The -limit argument does not act on the image. Use resize -size as suggested.

    If the contents of the disk image exceed the new smaller size attempted to be set you will get the error "resize request is below minimum size allowed."

    Mount the disk image, and determine the size occupied by the files, note that, then unmount it.

    When setting the -size, it must be
    greater than the size occupied by the files (just go a few MB more) and _less than_ than the amount the CD will take (less than approx 600MB).

  5. 0

    Paul Korswagen

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I understand the -limits option.

    I can make the dmg bigger, I've tried zeroing the free space with disk utility, but nothing, I cannot delete the empty 300Mb is has (200mb or 100). Is there any other way, or any other command I could use?

    How do I convert it to a sparse image?

    Thank you

  6. 0

    roam

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I have not experienced your difficulty in reducing the size of a disk image so I have no experience of why this is not working for you.

    Instead of wrestling with it, why not just move those files out of the mounted disk image, assess their total size and create a new disk image suited to their size?

    Move those files in, unmount it, and burn the CD.

  7. 0

    Paul Korswagen

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    You're right. I don't understand it, I even managed to convert the dmg to a sparse image that appeared in the finder with the correct size, but wouldn't burn either.

    Thank you for all your help