Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RedTomato

macrumors 601
Original poster
Mar 4, 2005
4,161
444
.. London ..
Hi all,

Disk Utility First Aid is saying my boot disk is corrupt.This is my work computer so I want to keep it reliable. It works fine, but very occasionally freezes.

This is the error I am getting from running First Aid with my MPB in Recovery mode:
  • error: container keybag (101286206+1): unlock records entry 0 contains invalid range 218373742+1
  • error: volume keybag (218373742+1): failed to get keybag: Device not configured
  • Encryption key structures are invalid.
How do I sort this out? This is my work computer so I want to keep it reliable. It works fine, but occasionally freezes.

Full details below.

Thanks!

System: 2015 MBP 15", macOS Monterey 12.3.1
Upgraded with 1TB NVMe SSD (Adata XPG SX8200)
FileVault is OFF.
Both the boot & data APFS volume give the same error with First Aid.

Full error message:
Verifying file system.
Volume was successfully unmounted.
Performing fsck_apfs -y -x /dev/rdisk3s1
Checking the container superblock.
Checking the checkpoint with transaction ID 17407881.
Checking the EFI jumpstart record.
Checking the space manager.
Checking the space manager free queue trees.
Checking the object map.
Checking the encryption key structures.
error: container keybag (101286206+1): unlock records entry 0 contains invalid range 218373742+1
error: volume keybag (218373742+1): failed to get keybag: Device not configured
Encryption key structures are invalid.
The volume /dev/rdisk3s1 could not be verified completely.
File system check exit code is 8.
Restoring the original state found as mounted.
File system verify or repair failed. : (-69845)
First Aid process has failed. If possible, back up the data on this volume.
 
Last edited:

chabig

macrumors G4
Sep 6, 2002
11,450
9,321
I don't know how that could have happened, but I think you are risk of losing all of the data on the drive. I would follow the instruction on the last line. Make a backup fast. Then, I think you probably need to reformat that drive. The hardware itself should be ok. Your machine just lost some of the data necessary to decrypt.
 

Fishrrman

macrumors Penryn
Feb 20, 2009
29,248
13,322
My suggestion:

The best thing to do is back up, erase/re-format the drive, and start over.
This should clear out any disk/directory related problems.

1. BACK UP the internal drive using either CarbonCopyCloner or SuperDuper. BOTH are FREE to download and use for 30 days (this costs you nothing)

2. Boot to INTERNET RECOVERY (NOT "the recovery partition")
Command-OPTION-R
at boot.

3. You'll need your wifi password. The internet utilities take a while to load, be patient "as the globe spins".

4. When you get to the utilities, open disk utility.

5. IMPORTANT: go to the "view" menu and choose "show all devices".

6. In the list on the left, select the "topmost" item which should be your PHYSICAL SSD inside the MBP.

7. Erase it -- to APFS, GUID partition format.

8. Quit disk utility and open the OS installer.

9. Begin clicking through. The Mac will restart one or more times, and the screen may "go dark" for a minute or longer, with no indication of activity. Be patient.

10. When done, you should see the initial setup screen "choose your language".

11. Begin clicking through. When setup assistant asks if you wish to migrate from another drive, connect the backup and give s.a. time to "digest" everything.

12. I would recommend that you migrate everything, just "let 'er go". Again, it will take some time.

13. When done, you'll see your original login screen.
Log in, look around, make sure things are ok.
 

RedTomato

macrumors 601
Original poster
Mar 4, 2005
4,161
444
.. London ..
My suggestion:

The best thing to do is back up, erase/re-format the drive, and start over.
This should clear out any disk/directory related problems.

1. BACK UP the internal drive using either CarbonCopyCloner or SuperDuper. BOTH are FREE to download and use for 30 days (this costs you nothing)

2. Boot to INTERNET RECOVERY (NOT "the recovery partition")
Command-OPTION-R
at boot.

3. You'll need your wifi password. The internet utilities take a while to load, be patient "as the globe spins".

4. When you get to the utilities, open disk utility.

5. IMPORTANT: go to the "view" menu and choose "show all devices".

6. In the list on the left, select the "topmost" item which should be your PHYSICAL SSD inside the MBP.

7. Erase it -- to APFS, GUID partition format.

8. Quit disk utility and open the OS installer.

9. Begin clicking through. The Mac will restart one or more times, and the screen may "go dark" for a minute or longer, with no indication of activity. Be patient.

10. When done, you should see the initial setup screen "choose your language".

11. Begin clicking through. When setup assistant asks if you wish to migrate from another drive, connect the backup and give s.a. time to "digest" everything.

12. I would recommend that you migrate everything, just "let 'er go". Again, it will take some time.

13. When done, you'll see your original login screen.
Log in, look around, make sure things are ok.

Huge thanks! Took me a few days to get around to it but this seems to have sorted it out.

I had already tried reinstalling macOS Monterey via System Recovery (Command-R) but it didn't help. Maybe because the user keys were in the Data volume, hence not touched?

Backing up 350GB to a spare HDD took roughly an hour. Deleted my Windows partition (which has been unused for over a year so no great loss), internet install took about an hour or two with lots of screen blacking out.

Migration assistant took 5 minutes to find the attached HDD, slightly concerning, then another EIGHT hours to transfer back the 350GB of data and apps. Suspect it was running at USB2 speeds.

Once everything was done, MacOS SSD structure seems different. Before, IRRC, Disk Utility showed 2 volumes, a Data volume and a System volume, both showing similar disk usage details.

Now there are 3 volumes - the System volume shows 'System Snapshot Mounted' (instead of disk usage details) and holds a further volume called 'APFS Startup Snapshot'.

Checked all 3 with First Aid. All good. Many thanks!

(For others reading this, computer seems a bit slower but it will take a day or two to rebuild caches and sort itself out.)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.