Mac OS X磁盤重新分區后 BootCamp Windows啟動項丟失


前言

我有一台Mac,裝有OS X和Windows兩系統,因Windows和OS X都能讀寫exFAT分區,

故若在Machintosh HD和Windows HD之間開辟一個exFAT分區,可以作為共享文件區。

我在OS X中用磁盤工具對Machintosh HD進行分區,在Machintosh HD和Windows HD之間開辟一個exFAT分區。

重啟啟動時,我按住了option,之后出現的啟動選項中沒有Windows。這因為剛才給磁盤分了區才導致的。

解決

重啟MAC ,按住COMMAND+R進入恢復模式,打開Terminal

csrutil disable #關閉rootless

 

修改完,重啟MAC,打開終端

sudo fdisk -e /dev/disk0

yanghaodeMacBook-Pro:~ yanghao$ sudo fdisk -e /dev/disk0
Password:
fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
Enter 'help' for information
fdisk: 1> p
Disk: /dev/disk0    geometry: 30515/255/63 [490234752 sectors]
Offset: 0    Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>
 2: AC 1023 254  63 - 1023 254  63 [    409640 -  183869624] <Unknown ID>
 3: AB 1023 254  63 - 1023 254  63 [ 184279264 -    1269536] Darwin Boot 
*4: 07 1023 254  63 - 1023 254  63 [ 185548800 -  304685056] HPFS/QNX/AUX
fdisk: 1>    

 修改分區表

fdisk: 1> p
Disk: /dev/disk0    geometry: 30515/255/63 [490234752 sectors]
Offset: 0    Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>
 2: AC 1023 254  63 - 1023 254  63 [    409640 -  183869624] <Unknown ID>
 3: AB 1023 254  63 - 1023 254  63 [ 184279264 -    1269536] Darwin Boot 
*4: 07 1023 254  63 - 1023 254  63 [ 185548800 -  304685056] HPFS/QNX/AUX
fdisk: 1> setpid 4
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
*4: 07 1023 254  63 - 1023 254  63 [ 185548800 -  304685056] HPFS/QNX/AUX
Partition id ('0' to disable)  [0 - FF]: [7] (? for help) 07 fdisk: 1> flag 4
Partition 4 marked active.
fdisk:*1> p
Disk: /dev/disk0    geometry: 30515/255/63 [490234752 sectors]
Offset: 0    Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>
 2: AC 1023 254  63 - 1023 254  63 [    409640 -  183869624] <Unknown ID>
 3: AB 1023 254  63 - 1023 254  63 [ 184279264 -    1269536] Darwin Boot 
*4: 07 1023 254  63 - 1023 254  63 [ 185548800 -  304685056] HPFS/QNX/AUX
fdisk:*1> write
Device could not be accessed exclusively.
A reboot will be needed for changes to take effect. OK? [n] y
Writing MBR at offset 0.

 重啟電腦按OPTION

 


免責聲明!

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



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