• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why 262144 blocks next to each partition?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why 262144 blocks next to each partition?


  • Subject: Re: Why 262144 blocks next to each partition?
  • From: Shantonu Sen <email@hidden>
  • Date: Tue, 1 Aug 2006 10:35:41 -0700

They're for future use by Apple, and are populated as needed for some boot methods, such as AppleRAID booting on PowerPC systems

Shantonu

On Aug 1, 2006, at 10:11 AM, Howard Gayle wrote:

On 10.4.7, diskutil (or Disk Utility) places an area of 262144
512-byte blocks after each GPT partition, except the last
partition, which gets 262151 512-byte blocks.

Here's an example of partitioning a 320 GB disk into 7
partitions:
diskutil partitionDisk disk1 7 GPTFormat \
   'Journaled HFS+' s01b_root0 53.9G \
   UFS s01b_utils0 43.2G \
   'Journaled HFS+' s01b_root1 53.9G \
   UFS s01b_utils1 43.2G \
   'Journaled HFS+' s01b_root2 53.9G \
   UFS s01b_utils2 43.2G \
   'Journaled HFS+' s01b_rest 1G

Finished partitioning on disk disk1
/dev/disk1
   #:                   type name               size      identifier
   0:  GUID_partition_scheme                    *298.1 GB disk1
   1:                    EFI                    200.0 MB  disk1s1
   2:              Apple_HFS s01b_root0         53.8 GB   disk1s2
   3:              Apple_UFS s01b_utils0        41.7 GB   disk1s3
   4:              Apple_HFS s01b_root1         53.8 GB   disk1s4
   5:              Apple_UFS s01b_utils1        41.7 GB   disk1s5
   6:              Apple_HFS s01b_root2         53.8 GB   disk1s6
   7:              Apple_UFS s01b_utils2        41.7 GB   disk1s7
   8:              Apple_HFS s01b_rest          6.5 GB    disk1s8

Now look what gpt(8) shows:
sudo gpt -r -v show /dev/disk1
gpt show: /dev/disk1: mediasize=320072933376; sectorsize=512; blocks=625142448
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2- BA4B-00A0C93EC93B
409640 112774352 2 GPT part - 48465300-0000-11AA- AA11-00306543ECAC
113183992 262144
113446136 90334824 3 GPT part - 55465300-0000-11AA- AA11-00306543ECAC
203780960 262144
204043104 112774352 4 GPT part - 48465300-0000-11AA- AA11-00306543ECAC
316817456 262144
317079600 90334824 5 GPT part - 55465300-0000-11AA- AA11-00306543ECAC
407414424 262144
407676568 112774352 6 GPT part - 48465300-0000-11AA- AA11-00306543ECAC
520450920 262144
520713064 90334824 7 GPT part - 55465300-0000-11AA- AA11-00306543ECAC
611047888 262144
611310032 13570232 8 GPT part - 48465300-0000-11AA- AA11-00306543ECAC
624880264 262151
625142415 32 Sec GPT table
625142447 1 Sec GPT header


With an Apple partition map it looks like this:
diskutil partitionDisk disk1 7 APMFormat \
   'Journaled HFS+' s01b_root0 53.9G \
   UFS s01b_utils0 43.2G \
   'Journaled HFS+' s01b_root1 53.9G \
   UFS s01b_utils1 43.2G \
   'Journaled HFS+' s01b_root2 53.9G \
   UFS s01b_utils2 43.2G \
   'Journaled HFS+' s01b_rest 1G
Finished partitioning on disk disk1
/dev/disk1
   #:                   type name               size      identifier
   0: Apple_partition_scheme                    *298.1 GB disk1
   1:    Apple_partition_map                    31.5 KB   disk1s1
   2:              Apple_HFS s01b_root0         53.8 GB   disk1s3
   3:             Apple_Boot                    8.5 MB    disk1s4
   4:              Apple_UFS s01b_utils0        41.9 GB   disk1s5
   5:              Apple_HFS s01b_root1         53.8 GB   disk1s7
   6:             Apple_Boot                    8.5 MB    disk1s8
   7:              Apple_UFS s01b_utils1        41.9 GB   disk1s9
   8:              Apple_HFS s01b_root2         53.8 GB   disk1s11
   9:             Apple_Boot                    8.5 MB    disk1s12
  10:              Apple_UFS s01b_utils2        41.9 GB   disk1s13
  11:              Apple_HFS s01b_rest          6.7 GB    disk1s15
3:17

sudo pdisk
e /dev/rdisk1
p
Partition map (with 512 byte blocks) on '/dev/rdisk1'
#: type name length base ( size )
1: Apple_partition_map Apple 63 @ 1
2: Apple_Free 262144 @ 64 (128.0M)
3: Apple_HFS Apple_HFS_Untitled_1 112774352 @ 262208 ( 53.8G)
4: Apple_Boot eXternal booter 17408 @ 113036560 ( 8.5M)
5: Apple_UFS Apple_UFS_Untitled_2 90579560 @ 113053968 ( 43.2G)
6: Apple_Free 262144 @ 203633528 (128.0M)
7: Apple_HFS Apple_HFS_Untitled_3 112774352 @ 203895672 ( 53.8G)
8: Apple_Boot eXternal booter 17408 @ 316670024 ( 8.5M)
9: Apple_UFS Apple_UFS_Untitled_4 90579560 @ 316687432 ( 43.2G)
10: Apple_Free 262144 @ 407266992 (128.0M)
11: Apple_HFS Apple_HFS_Untitled_5 112774352 @ 407529136 ( 53.8G)
12: Apple_Boot eXternal booter 17408 @ 520303488 ( 8.5M)
13: Apple_UFS Apple_UFS_Untitled_6 90579560 @ 520320896 ( 43.2G)
14: Apple_Free 262144 @ 610900456 (128.0M)
15: Apple_HFS Apple_HFS_Untitled_7 13979832 @ 611162600 ( 6.7G)
16: Apple_Free 16 @ 625142432


Device block size=512, Number of Blocks=625142448 (298.1G)

This time, the 262144-block area comes before each partition, and
the one at the end is the same size.

I didn't notice anything in IOApplePartitionScheme or
IOGUIDPartitionScheme that seemed to be looking for these areas.

What are they for?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40opendarwin.org


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Why 262144 blocks next to each partition? (From: Howard Gayle <email@hidden>)

  • Prev by Date: Re: Non-priv way to collect job stats under Intel?
  • Next by Date: Re: Non-priv way to collect job stats under Intel?
  • Previous by thread: Why 262144 blocks next to each partition?
  • Next by thread: build perl
  • Index(es):
    • Date
    • Thread