trailing loader space error with disk0

Hello,


I've got an issue where one of my partitions (HFS) is getting the following message:



mbp:~ user$ sudo diskutil verifyDisk disk0

Started partition map verification on disk0

Checking prerequisites

Checking the partition list

Checking the partition map size

Checking for an EFI system partition

Checking the EFI system partition's size

Checking the EFI system partition's file system

Checking the EFI system partition's folder content

Checking all HFS data partition loader spaces

Volume SHARE on disk0s4 has 0 bytes of trailing loader space and it needs 134,217,728 bytes

Problems were found with the partition map which might prevent booting

Error: -69765: Partition map needs repair because a data partition needs loader space


i'm able to boot normally, without issue. but diskutil will not repair the partition map. before trying to do this with gdisk, i wanted to ask which procedure is the correct one to do that.


I tried to erase the partition and recreate it using the correct start/end sector values and then wrote the changes to the GPT table, but it didn't clear out this error.


I will come back and post gdisk output, but first need to turn off SIP in recovery ....


any assistance (LonerT) would be greatly appreciated.

MacBook Pro Retina

Posted on Jan 20, 2019 7:50 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 20, 2019 6:15 PM

looks like that did the trick, thanks very much LonerT !


mbp:~ user$ sudo diskutil repairDisk disk0

Repairing the partition map might erase disk0s1, proceed? (y/N) y

Started partition map repair on disk0

Checking prerequisites

Checking the partition list

Adjusting partition map to fit whole disk as required

Checking for an EFI system partition

Checking the EFI system partition's size

Checking the EFI system partition's file system

Checking the EFI system partition's folder content

Checking all HFS data partition loader spaces

Preparing to create trailing loader space by shrinking the volume "SHARE" on disk0s4

Creating loader space, part 1 of 3: Verifying the file system

Creating loader space, part 2 of 3: Shrinking the file system from 9,931,505,152 to 9,797,283,840 bytes so that this partition can be smaller

Creating loader space, part 3 of 3: Shrinking the partition in the partition map to open up loader space

Checking booter partitions

Reviewing boot support loaders

Checking Core Storage Physical Volume partitions

The partition map has been repaired

Finished partition map repair on disk0

Similar questions

16 replies
Question marked as Top-ranking reply

Jan 20, 2019 6:15 PM in response to zero7404

looks like that did the trick, thanks very much LonerT !


mbp:~ user$ sudo diskutil repairDisk disk0

Repairing the partition map might erase disk0s1, proceed? (y/N) y

Started partition map repair on disk0

Checking prerequisites

Checking the partition list

Adjusting partition map to fit whole disk as required

Checking for an EFI system partition

Checking the EFI system partition's size

Checking the EFI system partition's file system

Checking the EFI system partition's folder content

Checking all HFS data partition loader spaces

Preparing to create trailing loader space by shrinking the volume "SHARE" on disk0s4

Creating loader space, part 1 of 3: Verifying the file system

Creating loader space, part 2 of 3: Shrinking the file system from 9,931,505,152 to 9,797,283,840 bytes so that this partition can be smaller

Creating loader space, part 3 of 3: Shrinking the partition in the partition map to open up loader space

Checking booter partitions

Reviewing boot support loaders

Checking Core Storage Physical Volume partitions

The partition map has been repaired

Finished partition map repair on disk0

Jan 20, 2019 8:24 AM in response to zero7404

Was the BC partition manipulated using a third-party tool to create SHARE? Typically, there is a 'gap' between the Sec GPT Table start and the end of last partition, called alignment gap. You can see it in the 'gap' between GPT2 and GPT3.


If you have a backup of SHARE, I suggest you run


diskutil repairDisk disk0


It will shrink SHARE a bit and create the space necessary.

Jan 21, 2019 7:16 AM in response to Loner T

yes ....


mbp:~ user$ sudo gpt -vv -r show /dev/disk0

Password:

gpt show: /dev/disk0: mediasize=251000193024; sectorsize=512; blocks=490234752

gpt show: /dev/disk0: PMBR at sector 0

gpt show: /dev/disk0: Pri GPT at sector 1

gpt show: /dev/disk0: Sec GPT at sector 490234751

      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  195445288      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC

  195854928       3504         

  195858432  274978816      3  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

  470837248   19135320      4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

  489972568     262151         

  490234719         32         Sec GPT table

  490234751          1         Sec GPT header

Jan 20, 2019 8:33 AM in response to Loner T

well, i have Paragon HDM for mac, and in the past found i didn't have an issue using it.


what i was seeing was some very small amount of free space between my share and windows (about 100-200 mb), so i decided to do a little partition editing in HDM. removed share, then recreated it using all the free space, and placed it to the right of the windows partition (as you see below). it used to be between the APFS volume and Windows.


my mistake may have been that i did this with SIP enabled.


regarding doing a repairDisk, i hesitated because it was telling me it's going to wipe out the EFI partition.


Jan 21, 2019 6:40 AM in response to Loner T

mbp:~ user$ sudo gdisk /dev/disk0

Password:

GPT fdisk (gdisk) version 1.0.4

Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Partition table scan:

  MBR: protective

  BSD: not present

  APM: not present

  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): v


No problems found. 265661 free sectors (129.7 MiB) available in 3

segments, the largest of which is 262151 (128.0 MiB) in size.

Jan 20, 2019 8:00 AM in response to zero7404

gdisk output:


System Integrity Protection status: disabled.

mbp:~ user$ sudo gdisk /dev/disk0

Password:

GPT fdisk (gdisk) version 1.0.4

Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Partition table scan:

  MBR: protective

  BSD: not present

  APM: not present

  GPT: present

Found valid GPT with protective MBR; using GPT.


Command (? for help): v


No problems found. 3510 free sectors (1.7 MiB) available in 2

segments, the largest of which is 3504 (1.7 MiB) in size.


Command (? for help): p


Disk /dev/disk0: 490234752 sectors, 233.8 GiB

Sector size (logical): 512 bytes

Disk identifier (GUID): 57ECCA5D-3ED3-4ECC-B8F8-568B5DF9C6D0

Partition table holds up to 128 entries

Main partition table begins at sector 2 and ends at sector 33

First usable sector is 34, last usable sector is 490234718

Partitions will be aligned on 8-sector boundaries

Total free space is 3510 sectors (1.7 MiB)


Number  Start (sector)    End (sector)  Size       Code  Name

   1              40          409639   200.0 MiB   EF00  EFI System Partition

   2          409640       195854927   93.2 GiB    AF0A  

   3       195858432       470837247   131.1 GiB   0700  Basic data partition

   4       470837248       490234718   9.2 GiB     AF00  Apple HFS/HFS+


Command (? for help): v


No problems found. 3510 free sectors (1.7 MiB) available in 2

segments, the largest of which is 3504 (1.7 MiB) in size.


diskutil output:


mbp:~ user$ sudo diskutil verifyDisk disk0

Started partition map verification on disk0

Checking prerequisites

Checking the partition list

Checking the partition map size

Checking for an EFI system partition

Checking the EFI system partition's size

Checking the EFI system partition's file system

Checking the EFI system partition's folder content

Checking all HFS data partition loader spaces

Volume SHARE on disk0s4 has 0 bytes of trailing loader space and it needs 134,217,728 bytes

Problems were found with the partition map which might prevent booting

Error: -69765: Partition map needs repair because a data partition needs loader space 

Jan 20, 2019 8:09 AM in response to Loner T

yes ....


mbp:~ user$ sudo diskutil list

Password:

/dev/disk0 (internal, physical):

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *251.0 GB   disk0

   1:                        EFI EFI                     209.7 MB   disk0s1

   2:                 Apple_APFS Container disk1         100.1 GB   disk0s2

   3:       Microsoft Basic Data Windows                 140.8 GB   disk0s3

   4:                  Apple_HFS SHARE                   9.9 GB     disk0s4


/dev/disk1 (synthesized):

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      APFS Container Scheme -                      +100.1 GB   disk1

                                 Physical Store disk0s2

   1:                APFS Volume macOS                   40.0 GB    disk1s1

   2:                APFS Volume Preboot                 32.1 MB    disk1s2

   3:                APFS Volume Recovery                516.9 MB   disk1s3

   4:                APFS Volume VM                      1.1 GB     disk1s4

Jan 20, 2019 8:19 AM in response to Loner T

share is not a critical partition, not a startup volume either. i do have a backup of it, yes ....


mbp:~ user$ sudo gpt -vv -r show /dev/disk0

Password:

gpt show: /dev/disk0: mediasize=251000193024; sectorsize=512; blocks=490234752

gpt show: /dev/disk0: PMBR at sector 0

gpt show: /dev/disk0: Pri GPT at sector 1

gpt show: /dev/disk0: Sec GPT at sector 490234751

      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  195445288      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC

  195854928       3504         

  195858432  274978816      3  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

  470837248   19397471      4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

  490234719         32         Sec GPT table

  490234751          1         Sec GPT header


sorry for the misaligned columns, for some reason i can't use tab in this window when entering my reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

trailing loader space error with disk0

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.