Skip to content

Instantly share code, notes, and snippets.

@steventroughtonsmith
Last active November 15, 2023 23:49
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save steventroughtonsmith/b780c32c941ae22ea1ee410cfa9e5936 to your computer and use it in GitHub Desktop.
Save steventroughtonsmith/b780c32c941ae22ea1ee410cfa9e5936 to your computer and use it in GitHub Desktop.
Mac OS X Server 1.x (Rhapsody)/Mac OS X Developer Preview 1 target partition creator for qemu-ppc
#!/bin/sh
TARGET_IMAGE=1G_BLANK_MACOSX_DP1_DISK_IMAGE.img
#1G
DISKSIZE_IN_BLOCKS=2097152
#2G
#DISKSIZE_IN_BLOCKS=4194304
#4G
#DISKSIZE_IN_BLOCKS=8388608
PRIMARY_PARTITIONSIZE_IN_BLOCKS=`expr $DISKSIZE_IN_BLOCKS - 512 - 16384 - 64`
echo $PRIMARY_PARTITIONSIZE_IN_BLOCKS
pdisk $TARGET_IMAGE -initialize
pdisk $TARGET_IMAGE -createPartition MOSX_OF3_Booter Apple_HFS 64 16384
pdisk $TARGET_IMAGE -createPartition SecondaryLoader Apple_Loader 16448 512
pdisk $TARGET_IMAGE -createPartition "0x000001FF 0x0008 0x00" Apple_Rhapsody_Inst 16960 $PRIMARY_PARTITIONSIZE_IN_BLOCKS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment