1

Virtual memory was broken on my Mac (cMP 5.1) for several months, with Sierra, High Sierra, and Mojave. Apple support was useless.

I finally figured out that I was missing all the invisible partitions on the boot drive (vm, recovery, etc.). Probably a casualty of a Carbon Copy Cloner mistake. But CCC allowed me to restore the partitions from a backup.

Still, the system doesn't use the vm partition. I can get it to work manually with sudo diskutil mount -mountPoint /private/var/vm disk1s4, but it doesn't remember this after a restart.

Any ideas on a permanent fix?

2
  • Have you tried just overlaying the OS from recovery, now you have one? Alternatively, back it all up & install afresh, then restore. btw, CCC should warn you if there is no recovery partition & offer to make one.
    – Tetsujin
    Commented Oct 20, 2018 at 15:03
  • Yeah - I can see Apple support being - erase and install in this case. Too many things can go wrong for them to dive into terminal short of a widespread issue that they would put in a KB article. Glad you have it sussed - thanks for asking and answering!
    – bmike
    Commented Oct 22, 2018 at 0:31

2 Answers 2

1

Solved. Cobbled together a workaround with information from interwebs.

Created this plist named “local.mountdisk1s4.plist” containing:

Label local.mountdisk1s4.plist ProgramArguments /sbin/mount_apfs disk1s4 /private/var/vm KeepAlive SuccessfulExit

Placed it in /Library/launchdaemons

Swapping now works as it should. Still not sure how this all broke in the first place, or if there's a more elegant solution.

0

It may be useful to you. I wrote here for AppleScript :

     (do shell script «diskutil mount -mountPoint /private/var/vm `diskutil ap 
     list | grep VM | awk -F ' ' '/d/ {print $5}'`» with administrator      
     privileges) display dialog 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .