Specifications

First block: 4160
Length in blocks: 4096
Name of partition: boot1
Type of partition: PPCBoot
Command (? for help): p
Partition map (with 512 byte blocks) on '/dev/hda'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: PPCBoot boot0 4096 @ 64 ( 2.0M)
3: PPCBoot boot1 4096 @ 4160 ( 2.0M)
4: Apple_Free Extra 1579344 @ 8256 (771.2M)
Device block size=512, Number of Blocks=1587600 (775.2M)
DeviceType=0x0, DeviceId=0x0
Now we create a swap partition - 64 MB should be more than sufficient for our Embedded System; 64 MB
means 64*1024*2 = 131072 disk blocks of 512 bytes:
Command (? for help): C
First block: 8256
Length in blocks: 131072
Name of partition: swap
Type of partition: swap
Command (? for help): p
Partition map (with 512 byte blocks) on '/dev/hda'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: PPCBoot boot0 4096 @ 64 ( 2.0M)
3: PPCBoot boot1 4096 @ 4160 ( 2.0M)
4: swap swap 131072 @ 8256 ( 64.0M)
5: Apple_Free Extra 1448272 @ 139328 (707.2M)
Device block size=512, Number of Blocks=1587600 (775.2M)
DeviceType=0x0, DeviceId=0x0
Finally, we dedicate all the remaining space to the root partition:
Command (? for help): C
First block: 139328
Length in blocks: 1448272
Name of partition: root
Type of partition: Linux
Command (? for help): p
Partition map (with 512 byte blocks) on '/dev/hda'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: PPCBoot boot0 4096 @ 64 ( 2.0M)
3: PPCBoot boot1 4096 @ 4160 ( 2.0M)
4: swap swap 131072 @ 8256 ( 64.0M)
5: Linux root 1448272 @ 139328 (707.2M)
Device block size=512, Number of Blocks=1587600 (775.2M)
DeviceType=0x0, DeviceId=0x0
To make our changes permanent we must write the new partition table to the disk, before we quit the pdisk
program:
Command (? for help): w
Writing the map destroys what was there before. Is that okay? [n/y]: y
hda: [mac] hda1 hda2 hda3 hda4 hda5
hda: [mac] hda1 hda2 hda3 hda4 hda5
Command (? for help): q
Now we can initialize the swap space and the filesystem:
# mkswap /dev/hda4
Setting up swapspace version 1, size = 67104768 bytes
14.3.23.1. Using a MacOS Partition Table 187