0

I want to make a Bootable installer, and to save on physical space (having a bunch of flash drives laying around), I decided to have a drive in MacOS Extended (Journal) format partitioned to contain multiple bootable / install medias, or what would be multiple USBs of bootable media all in one drive.

In order to save space, how would I know how much space each install application's createinstallmedia tool will need? When I say this, I mean that I have my partitions set up as 8 GB or 16 GB when in reality (for example) the El Capitan installer) will take up only ~6.3 GB, and I can not shrink the partition size without making another useless partition I can't put another bootable media on.

Admittedly, I could just run createinstallmedia on a partition too big for the job, then get the amount of space taken up, delete the partition and make it with the space created back then. However, when you scale this up, it is not time efficient and remember that I want to do this for multiple installers.

2 Answers 2

0

On a GUID drive, you can create the first install "createinstall" on the entire media. Then you search the real size of this installer :

diskutil resizevolume diskxsy limits

You can then resize this installer with the previous information :

diskutil resizevolume diskxsy xxg jhfs+ New_installer 0b

And so on for the news installers

3
  • I have tried this method where I have half of a partition dedicated to another thing, and the other half devoted to install media. I install the media on a somewhat oversized partition and run diskutil resizeVolume diskxsy <lower capacity>. The end result is that there is now free space for every partition I do this with that doesn't go easily into the install media partition.
    – Meh.
    Commented Nov 13, 2021 at 8:00
  • Normally, if you followed my command, the space freed is of type jhfs + and allows you to create a new installer there. diskutil resizeVolume newsize jhfs+ newname 0b
    – user415185
    Commented Nov 13, 2021 at 8:07
  • I see now, the processed I used is to split the drive into 2 partitions, where the one is Install OS X <> on a VERY big partition, then after creating install media use this and repeat. When I ran out of install media, I now have a big empty partition for Install OS X ...
    – Meh.
    Commented Nov 13, 2021 at 19:07
0

You could use the Disk Utility to create a sparse disk image (.sparseimage file) or read/write disk image (.dmg file). Mount the the image, then have the createinstallmedia tool write to the image. You can inspect the image to see how much disk space was needed.

5
  • Hi David, your answer can be essentially what the admittedly... section of my question addresses. From my understanding of your answer, you want me to create a bootable ISO, which is writing to a drive in disguise, but virtually.
    – Meh.
    Commented Nov 12, 2021 at 5:59
  • Both sparse disk images (.sparseimage file) and read/write disk images (.dmg file) are not iso files. These are files that can be attached as disk devices. You can have the createinstallmedia tool write to a image file instead of an actual flash drive. Afterwards, you can see how much space was needed and then delete the image file to regain the space. I can post a example, if you wish. Commented Nov 12, 2021 at 6:14
  • Actually, I am not sure what you are trying to do. I think you are trying to create a external drive that can be used to install different versions of macOS (OS X). Each partition would contain the installation files for a particular version of macOS (OS X). Commented Nov 12, 2021 at 6:19
  • Aren't sparsebundles auto-resizing? You could just create to one of those each time, all on one volume, all taking up just the exact amount of space they need. [I'm frankly hazy on the details, but I'm sure I have one here I set up that just grows a bit each time I put new data in it.] iirc, you set its maximum size to be bigger than you need, but its actual size on disk is its current 'true' size.
    – Tetsujin
    Commented Nov 12, 2021 at 8:19
  • @Tetsujin, Meh is trying to create a multi-boot USB installer for macOS The minutia of a sparse disk image is not really important here as David Anderson is proposing that Meh use either sparse disk image or read/write dmg image strictly as a temporary placeholder for a physical USD drive to more quickly determine how much space needs to be allocated on the USB drive for createinstallmedia to do its thing. Then the sparse disk image or read/write dmg image get deleted. This saves considerable time over writing twice to the USB drive to determine how much space needs to be allocated. Commented Nov 12, 2021 at 12:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .