Mac開機一直卡在進度條界面(無限菊花)


現象:

早上一開機,就一直卡在進度條界面,進度條滿了后就一直停在當前界面了!網上各種搜各種都沒解決,折騰了一上午;我遇到兩次都這樣解決的,第一次的時候折騰了一上午,第二次直接按這流程5分鍾解決了,不需要重裝系統,在此記錄下來也是希望能幫助到更多的同學。

原因

造成問題的可能原因:沒有正確關機,或者說沒有正常關機(不知你是否遇到過執行關機后,電腦一直處於在關機狀態,10幾分鍾還是未能關上),一般發生在重裝系統后幾天

解決方案

最后在某外國網站上有人說是mac硬盤記憶存儲的問題,需要清除記憶存儲的數據庫,這么一說,突然感覺好像是這樣一回事,於是果斷的嘗試下

備份資料操作:

我第一次用這種方法的時候不確定可不可行,所以增加了這步來保險起見,第二次遇到這問題的時候我是直接跳過的,你也可以直接跳到恢復系統操作

  1. 開機后立即按住command + R鍵進入恢復模式;
  2. 然后選擇磁盤工具
  3. 准備一個硬盤或者U盤,通過硬盤工具將你的硬盤或者U盤格式化成mac-日志格式,如果你的U盤本身能直接讀書,可以不用格式化;
  4. 通過磁盤工具將你電腦的資料備份到你的移動盤:
    • 首先新建文件夾映像,如下圖1
    • 選擇你想備份的文件或者文件夾
    • 更改保存的位置:即你的移動磁盤,如下圖2
    • 然后點擊存儲:等待它完成,這個還是有點慢的,跟你的電腦和磁盤、文件大小有關
    • 備份完成后,你可以把移動盤插到別的電腦上去看下,是否完全成功(非必要操作,畢竟數據無價,確認下比較安全),確認無誤后繼續往下操作;

5 . 進入在線重裝系統操作:具體操作請往下拉到:在線重新系統操作

備份資料新建映像
備份資料選擇保存位置

恢復系統操作

  1. 關機(直接長按關機鍵)

  2. 再開機 > 立即按command + V鍵(進入安全模式),代碼界面:

    • 等不停的輸出Too many corpses being created這段代碼的時候,說明是緩存太多造成的,如下圖:
    • 也有可能你的電腦不會輸出這些內容,但沒關系,你就不管他輸出啥;
    • 不管你的是那種結果,你在這個界面停留2分鍾左右即可,不要問為什么,我也還不確認這是啥
      0A50DF09064F100993F87B4FD480D1D5.jpg
  3. 關機(直接長按關機鍵) ;

  4. 再開機 > 立即按command + R鍵,進入macOS恢復界面;

  5. 左上角找到終端工具,在終端命令行中按如下順序執行命令(目的:清除數據庫緩存):

    1. 進入緩存目錄
    $ cd /Volumes/Macintosh\ HD/var/db/caches/opendirectory/
    
    2. 刪除緩存數據庫
    $ mv ./mbr_cache ./mar_cache-old
    

    如果進入緩存目錄的時候,提示opendirectory 目錄找不到,不知道是什么原因,解決方法寫在本文的末尾

  6. 完成上面操作后:關機 > 再開機 > 進入正常開機流程
    這次開機會比正常情況下要久,因為緩存清了,大概3-5分鍾;

  7. 成功進入用戶登錄界面,恭喜你!!


在線重新系統操作

是否需要備份資料你自己抉擇,重裝系統按如下操作,大概要2-3小時:

  1. 把你電腦的磁盤(Macintosh HD)格式抹除了
    磁盤抹除
  2. 退出磁盤;
  3. 關機
  4. 開機立即按住: command + option + R 進入恢復模式
  5. 連接上網絡,選擇:重新安裝 Mac OS X
  6. 進入在線安裝過程,至此問題解決;

附幾條Mac其它命令的釋義:

都是開機后需要立即執行的組合操作的

option + command + R + P

屏幕會三閃,是NVRem, 作用是重置系統,緩存重置.

command + R

這個是macOS實用工具,包括時間機器,修復磁盤(Macintosh HD急救),安裝系統, 操作終端等功能.

shift

這個是安全模式(目前我還沒有進去看過)

D

這個功能是硬件自檢,啟動會自動檢測硬件是否有問題.

command + shift + option + R 或者 command + option + R

這個作用是強制裝系統,徹底的重裝系統,屬於抹除安裝(意思是你的Macintosh HD盤上的所有資料都會被清除)


提示opendirectory 目錄找不到,解決辦法

第三次更新此文章增加了找不到文件目錄的解決方法:

之前有很多同學遇到這問題,但一直沒法復現,終於一天同事的電腦復現,然后親自這樣解決的,嘗試過兩次都是可以的,不要問為什么,應該是跟某文件加載機制有關。此解決方法於2019.01.24更新
下面是我當時的操作步驟記錄:

注:你們在執行ls -la得到的結果肯定不會與一模一樣,因為我把部份無關的剔除了,主要的留下了完全可以參考,這幾步的操作的目的是:因為我們本身要刪除的是緩存文件,所以我就想着去這個磁盤上的其它路徑下逛逛,然后再回來我們需要冊除的那個目下,果然后逛完回來后,這個目錄存在了。

-bash-3.2# cd /Volumes/
-bash-3.2# ls -la
total 8
drwxr-xr-x   7 root  wheel  306 Feb 27 07:57 .
drwxrwxr-t  17 root  admin  646 Nov 30 05:19 ..
drwxrwxr-x+ 13 root  admin  510 Feb 14 10:09 AppleInc
drwxrwxr-x  13 root  admin  510 Dec  7 14:23 MacOSBackups
drwxr-xr-x  30 root  wheel  960 Jan 16 00:56 MacOSX
drwxrwxr-x@ 14 root  admin  448 Jan 18 01:31 Montents
lrwxr-xr-x   1 root  wheel    1 Feb 27 07:57 OS X Base System -> /   
-bash-3.2# cd MacOSX/
-bash-3.2# ls -la
total 32
drwxr-xr-x   30 root  wheel       960 Jan 16 00:56 .
drwxr-xr-x    7 root  wheel       306 Feb 27 07:57 ..
-rw-rw-r--    1 root  admin     14340 Feb 25 10:40 .DS_Store
d--x--x--x    9 root  wheel       288 Feb 27 07:55 .DocumentRevisions-V100
dr-xr-xr-t@   2 root  wheel        64 Dec  7 06:18 .HFS+ Private Directory Data?
drwxr-xr-x@   2 root  wheel        64 Feb 12 00:36 .PKInstallSandboxManager-SystemSoftware
drwx------    5 root  wheel       160 Dec  7 07:19 .Spotlight-V100
d-wx-wx-wt@   2 root  _unknown     64 Dec  7 06:18 .Trashes
----------    1 root  admin         0 Aug 17  2018 .file
drwx------  174 root  wheel      5568 Feb 27 07:56 .fseventsd
drwxr-xr-x    2 root  wheel        64 Dec  7 08:50 .vol
drwxrwxr-x+  91 root  admin      2912 Feb 27 01:28 Applications
drwxr-xr-x+  64 root  wheel      2048 Jan 16 01:56 Library
drwxr-xr-x    2 root  wheel        64 Dec  7 08:50 Network
drwxr-xr-x@   5 root  wheel       160 Nov 30 05:46 System
drwxr-xr-x    5 root  admin       160 Dec 19 00:13 Users
drwxr-xr-x@   6 root  wheel       192 Feb 27 07:55 Volumes
drwxr-xr-x@  37 root  wheel      1184 Nov 30 05:55 bin
lrwxr-xr-x@   1 root  wheel        11 Dec  7 08:47 etc -> private/etc
dr-xr-xr-x@   2 root  wheel        64 Dec  7 07:19 home
-rw-r--r--    1 root  wheel       313 Aug 18  2018 installer.failurerequests
dr-xr-xr-x@   2 root  wheel        64 Dec  7 07:19 net
drwxr-xr-x    6 501   wheel       192 Jan 14 08:59 opt
drwxr-xr-x    6 root  wheel       192 Dec  7 08:50 private
drwxr-xr-x@  64 root  wheel      2048 Dec  7 08:47 sbin
lrwxr-xr-x@   1 root  wheel        11 Dec  7 08:47 tmp -> private/tmp
drwxr-xr-x@   9 root  wheel       288 Nov 30 05:38 usr
lrwxr-xr-x@   1 root  wheel        11 Dec  7 08:47 var -> private/var
-bash-3.2# cd /var/db/
-bash-3.2# ls -la  //注意看此db這個目錄下是沒有 caches 目錄的
total 8
drwxr-xr-x   6 root  wheel  272 Feb 27 07:59 .
drwxr-xr-x  11 root  wheel  374 Nov 30 05:19 ..
-rw-r--r--   1 root  wheel  729 Feb 27 07:59 .com.apple.iokit.graphics
drwxr-xr-x   3 root  wheel  102 Feb 27 07:59 crls
drwx------   5 root  wheel  170 Feb 27 07:58 dhcpclient
drwxr-xr-x   4 root  wheel  136 Feb 27 07:57 mds
-bash-3.2# cd 
-bash-3.2# pwd
/var/root
-bash-3.2# ls -la
total 8
drwxr-x---   4 root  wheel  136 Nov 30 05:19 .
drwxr-xr-x  11 root  wheel  374 Nov 30 05:19 ..
-r--r--r--   1 root  wheel   10 Aug 17  2018 .forward
drwx------   7 root  wheel  306 Feb 27 07:59 Library
-bash-3.2# cd Library/
-bash-3.2# ls -la
total 0
drwx------  7 root  wheel  306 Feb 27 07:59 .
drwxr-x---  4 root  wheel  136 Nov 30 05:19 ..
drwxr-xr-x  3 root  wheel  102 Feb 27 07:59 Application Support
drwxr-xr-x@ 3 root  wheel  102 Feb 27 07:59 Caches
drwxr-xr-x  2 root  wheel  136 Feb 27 07:57 Containers
drwxr-xr-x  5 root  wheel  170 Feb 27 07:57 Keychains
drwx------  9 root  wheel  306 Feb 27 08:00 Preferences
-bash-3.2# cd Caches/
-bash-3.2# ls -la
total 0
drwxr-xr-x@ 3 root  wheel  102 Feb 27 07:59 .
drwx------  7 root  wheel  306 Feb 27 07:59 ..
drwxr-xr-x  2 root  wheel   68 Feb 27 07:59 ocspd
-bash-3.2# cd /Volumes/
-bash-3.2# cd MacOSX/
-bash-3.2# cd db/
-bash: cd: db/: No such file or directory
-bash-3.2# ls -la
total 32
drwxr-xr-x   30 root  wheel       960 Jan 16 00:56 .
drwxrwxr-x+  91 root  admin      2912 Feb 27 01:28 Applications
drwxr-xr-x+  64 root  wheel      2048 Jan 16 01:56 Library
drwxr-xr-x    2 root  wheel        64 Dec  7 08:50 Network
drwxr-xr-x@   5 root  wheel       160 Nov 30 05:46 System
drwxr-xr-x    5 root  admin       160 Dec 19 00:13 Users
drwxr-xr-x@   6 root  wheel       192 Feb 27 07:55 Volumes
drwxr-xr-x@  37 root  wheel      1184 Nov 30 05:55 bin
lrwxr-xr-x@   1 root  wheel        11 Dec  7 08:47 etc -> private/etc
dr-xr-xr-x@   2 root  wheel        64 Dec  7 07:19 home
-rw-r--r--    1 root  wheel       313 Aug 18  2018 installer.failurerequests
dr-xr-xr-x@   2 root  wheel        64 Dec  7 07:19 net
drwxr-xr-x    6 root  wheel       192 Dec  7 08:50 private
drwxr-xr-x@  64 root  wheel      2048 Dec  7 08:47 sbin
lrwxr-xr-x@   1 root  wheel        11 Dec  7 08:47 tmp -> private/tmp
drwxr-xr-x@   9 root  wheel       288 Nov 30 05:38 usr
lrwxr-xr-x@   1 root  wheel        11 Dec  7 08:47 var -> private/var
-bash-3.2# cd var/db/
-bash-3.2# ls        //這次這個目錄下有 caches 這個文件夾了
.AppleDiagnosticsSetupDone		crls
.AppleInstallType.plist			datadetectors
.SystemPolicy-default			displaypolicyd
caches					uuidtext
cmiodalassistants			vmware
com.apple.xpc.launchd			xcode_select_link
-bash-3.2# pwd
/Volumes/MacOSX/var/db
-bash-3.2# cd caches/
-bash-3.2# ls -la
total 0
drwxr-xr-x   3 root  wheel    96 Aug 17  2018 .
drwxr-xr-x  97 root  wheel  3104 Feb 27 07:55 ..
drwxrwx---   3 root  wheel    96 Dec  7 11:47 opendirectory
-bash-3.2# pwd
/Volumes/MacOSX/var/db/caches
-bash-3.2# cd opendirectory/
-bash-3.2# ls -la
total 112
drwxrwx---  3 root  wheel     96 Dec  7 11:47 .
drwxr-xr-x  3 root  wheel     96 Aug 17  2018 ..
-rw-------  1 root  wheel  53299 Feb 27 07:56 mbr_cache
-bash-3.2# 

如果你因某種原因無法成功執行恢復系統操作第5步,又急着用電腦,建議按上面的步驟備份重要資料,不要備份整個系統,然后進入在線重裝系統步驟……也可郵箱聯系我 nenhall@126.com


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM