Mac OS X磁盘重新分区后 BootCamp Windows启动项丢失

时间:2022-08-21 18:34:40

前言

我有一台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 OS X磁盘重新分区后 BootCamp Windows启动项丢失

修改完,重启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: > p
Disk: /dev/disk0 geometry: // [ sectors]
Offset: Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
: EE - [ - ] <Unknown ID>
: AC - [ - ] <Unknown ID>
: AB - [ - ] Darwin Boot
*: - [ - ] HPFS/QNX/AUX
fdisk: >

修改分区表

fdisk: 1> p
Disk: /dev/disk0 geometry: // [ sectors]
Offset: Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
: EE - [ - ] <Unknown ID>
: AC - [ - ] <Unknown ID>
: AB - [ - ] Darwin Boot
*: - [ - ] HPFS/QNX/AUX
fdisk: 1> setpid 4
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
*: - [ - ] HPFS/QNX/AUX
Partition id ('' to disable) [ - FF]: [] (? for help)
fdisk: 1> flag 4

Partition marked active.
fdisk:*> p
Disk: /dev/disk0 geometry: // [ sectors]
Offset: Signature: 0xAA55
Starting Ending
#: id cyl hd sec - cyl hd sec [ start - size]
------------------------------------------------------------------------
: EE - [ - ] <Unknown ID>
: AC - [ - ] <Unknown ID>
: AB - [ - ] Darwin Boot
*: - [ - ] 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 .

 重启电脑按OPTION

Mac OS X磁盘重新分区后 BootCamp Windows启动项丢失