Open an administrative command prompt and type the following lines, followed by the <Enter> key after each line....
exit
特別重要
Use GDisk (GPT FDISK) to
convert the Hard Drive to GPT and create partitions for dual booting UEFI Windows and OSX
(為何使用GDISK? DISKPART沒提供"Apple HFS/HFS+"分割吧!且用GDISK才能用BOOTICE來讓GPT開機,但也只有CLOVER能用,DISKPART只適用 BOOT entry)
UEFI OS(xxxxxxx)
In this example, I have a 1 TB hard disk which I plan to divide up as follows....
Partition 1: 200MB EFI System Partition
Partition 2: 128MB Microsoft Reserved Partition
Partition 3: 60GB NTFS Partition for Windows
Partition 4: 871GB HFS+ Partition for OSX
Notes -
EFI System Partition is preferably made the first partition for compatibility with OSX.
I usually leave 128MB of free space before and after the HFS+ partition or OSX Disk Utility will complain about a lack of "loader space".
1. Open an administrative command prompt and cd to the gdisk installation folder
2. Type gdisk64 #: (where # is the disk number of the disk you are creating partitions on - in this example it is disk 1)
3. Use the following gdisk options:
n to create a new partition
x to access the experts menu
a to change partition special attributes (needed for EFI System Partition)
m to return to the main gdisk menu
p to print the partition table
w to finalize and write changes to the disk
C:\WINDOWS\system32>cd \gdisk
C:\gdisk>gdisk64 1: (disk 都是從0:開始)
GPT fdisk (gdisk) version 1.0.0
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
************************************************************************
Most versions of Windows cannot boot from a GPT disk except on a UEFI-based
computer, and most varieties prior to Vista cannot read GPT disks. Therefore,
you should exit now unless you understand the implications of converting MBR
to GPT or creating a new GPT disk layout!
************************************************************************
Are you SURE you want to continue? (Y/N): y
Command (? for help): ?
b back up GPT data to a file
c change a partition's name
d delete a partition
i show detailed information on a partition
l list known partition types
n add a new partition
o create a new empty GUID partition table (GPT)
p print the partition table
q quit without saving changes
r recovery and transformation options (experts only)
s sort partitions
t change a partition's type code
v verify disk
w write table to disk and exit
x extra functionality (experts only)
? print this menu
Command (? for help): n
Partition number (1-128, default 1): 1
First sector (34-1953525134, default = 40) or {+-}size{KMGTP}: 40
Last sector (40-1953525134, default = 1953525134) or {+-}size{KMGTP}: +200M
Current type is 'Microsoft basic data'
Hex code or GUID (L to show codes, Enter = 700): L
0700 Microsoft basic data 0c01 Microsoft reserved 2700 Windows RE
3000 ONIE boot 3001 ONIE config 4100 PowerPC PReP boot
4200 Windows LDM data 4201 Windows LDM metadata 4202 Windows Storage Spac
7501 IBM GPFS 7f00 ChromeOS kernel 7f01 ChromeOS root
7f02 ChromeOS reserved 8200 Linux swap 8300 Linux filesystem
8301 Linux reserved 8302 Linux /home 8303 Linux x86 root (/)
8304 Linux x86-64 root (/ 8305 Linux ARM64 root (/) 8306 Linux /srv
8400 Intel Rapid Start 8e00 Linux LVM a500 FreeBSD disklabel
a501 FreeBSD boot a502 FreeBSD swap a503 FreeBSD UFS
a504 FreeBSD ZFS a505 FreeBSD Vinum/RAID a580 Midnight BSD data
a581 Midnight BSD boot a582 Midnight BSD swap a583 Midnight BSD UFS
a584 Midnight BSD ZFS a585 Midnight BSD Vinum a601 OpenBSD data
a800 Apple UFS a901 NetBSD swap a902 NetBSD FFS
a903 NetBSD LFS a904 NetBSD concatenated a905 NetBSD encrypted
a906 NetBSD RAID ab00 Apple boot af00 Apple HFS/HFS+
af01 Apple RAID af02 Apple RAID offline af03 Apple label
af04 AppleTV recovery af05 Apple Core Storage be00 Solaris boot
bf00 Solaris root bf01 Solaris /usr & Mac Z bf02 Solaris swap
bf03 Solaris backup bf04 Solaris /var bf05 Solaris /home
bf06 Solaris alternate se bf07 Solaris Reserved 1 bf08 Solaris Reserved 2
bf09 Solaris Reserved 3 bf0a Solaris Reserved 4 bf0b Solaris Reserved 5
Press the <Enter> key to see more codes:
c001 HP-UX data c002 HP-UX service ea00 Freedesktop $BOOT
eb00 Haiku BFS ed00 Sony system partitio ed01 Lenovo system partit
ef00 EFI System ef01 MBR partition scheme ef02 BIOS boot partition
f800 Ceph OSD f801 Ceph dm-crypt OSD f802 Ceph journal
f803 Ceph dm-crypt journa f804 Ceph disk in creatio f805 Ceph dm-crypt disk i
fb00 VMWare VMFS fb01 VMWare reserved fc00 VMWare kcore crash p
fd00 Linux RAID
Hex code or GUID (L to show codes, Enter = 700): EF00
Changed type of partition to 'EFI System'
Command (? for help): x
Expert command (? for help): a
Using 1
Known attributes are:
0: system partition
1: hide from EFI
2: legacy BIOS bootable
60: read-only
62: hidden
63: do not automount
Attribute value is 0000000000000000. Set fields are:
No fields set
Toggle which attribute field (0-63, 64 or <Enter> to exit): 0
Have enabled the 'system partition' attribute.
Attribute value is 0000000000000001. Set fields are:
0 (system partition)
Toggle which attribute field (0-63, 64 or <Enter> to exit):
Expert command (? for help): m
Command (? for help): n
Partition number (2-128, default 2): 2
First sector (34-1953525134, default = 409640) or {+-}size{KMGTP}:
Last sector (409640-1953525134, default = 1953525134) or {+-}size{KMGTP}: +128M
Current type is 'Microsoft basic data'
Hex code or GUID (L to show codes, Enter = 700): 0c01
Changed type of partition to 'Microsoft reserved'
Command (? for help): n
Partition number (3-128, default 3): 3
First sector (34-1953525134, default = 671784) or {+-}size{KMGTP}:
Last sector (671784-1953525134, default = 1953525134) or {+-}size{KMGTP}: +60G
Current type is 'Microsoft basic data'
Hex code or GUID (L to show codes, Enter = 700): 0700
Changed type of partition to 'Microsoft basic data'
Command (? for help): n
Partition number (4-128, default 4): 4
First sector (34-1953525134, default = 126500904) or {+-}size{KMGTP}: +128M
Last sector (126763048-1953525134, default = 1953525134) or {+-}size{KMGTP}: -128M
Current type is 'Microsoft basic data'
Hex code or GUID (L to show codes, Enter = 700): AF00
Changed type of partition to 'Apple HFS/HFS+'
Command (? for help): p
Disk 1:: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 584D0F77-3CE2-43C7-8663-CE867C61149D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 524294 sectors (256.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System
2 409640 671783 128.0 MiB 0C01 Microsoft reserved
3 671784 126500903 60.0 GiB 0700 Microsoft basic data
4 126763048 1953262990 870.9 GiB AF00 Apple HFS/HFS+
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to \\.\physicaldrive1.
Disk synchronization succeeded! The computer should now use the new
partition table.
The operation has completed successfully.
Use Diskpart to assign drive letters and format
the EFI and Windows Partitions to FAT32 and NTFS respectively....
C:\gdisk>diskpart
Microsoft DiskPart version 10.0.10586
Copyright © 1999-2013 Microsoft Corporation.
On computer: XPSM1530
DISKPART> sel disk 1
Disk 1 is now the selected disk.
DISKPART> list part
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 System 200 MB 1024 KB
Partition 2 Reserved 128 MB 201 MB
Partition 3 Primary 60 GB 329 MB
Partition 4 Primary 871 GB 60 GB
DISKPART> sel part 1
Partition 1 is now the selected partition.
DISKPART> assign letter=s
DiskPart successfully assigned the drive letter or mount point.
DISKPART> format quick fs=fat32 label="EFI"
100 percent completed
DiskPart successfully formatted the volume.
DISKPART> sel part 3
Partition 3 is now the selected partition.
DISKPART> assign letter=w
DiskPart successfully assigned the drive letter or mount point.
DISKPART> format quick fs=ntfs label="Windows"
100 percent completed
DiskPart successfully formatted the volume.
DISKPART> exit
在Windows下安裝傳統CLOVER 開機磁區
Essentially BIOS--->MBR--->PBR--->boot--->CLOVERX64.efi--->OSLoader
In terms of the bootsectors we will be using in this tutorial
BIOS--->boot0af in MBR--->boot1f32alt in the PBR of the EFI System Partition--->boot6(boot) in ESP--->CLOVERX64.efi in ESP--->OSLoader
Procedure
1. Download the CloverISO file from Sourceforge and extract the ISO with 7 Zip
2. Copy the following boot files from \usr\standalone\i386 folder
boot0af,
boot0ss,
boot1f32,
boot1f32alt
and
boot6,
boot7 from \usr\standalone\i386\x64 to somewhere convenient
The EFI folder will also be needed later....
3. Open the
Bootice program and click Process MBR from the main menu
4. At the Master Boot Record screen, click restore MBR
5. For the Restore file, browse to the boot0af or boot0ss file we extracted in step 2
6. Click the Restore button and you should get a confirmation that the operation completed successfully. Click the close button.
7. Click Process PBR from the main menu
8. At the Partition Boot Record screen, select the FAT32 EFI System Partition as the destination and click the Restore PBR button.
9. For the Restore file, browse to the boot1f32 or boot1f32alt file we extracted in step 2. In this example, I used the alternate booting PBR (boot1f32alt), which gives a 3 second pause to enable the user to input his/her choice of boot file during bootup (default is boot6).
10. Click the Restore button and you should get a confirmation that the operation completed successfully. Click the close button and exit the program.
11. Open Task Manager as administrator and open a new task. Browse "all files" and navigate to the EFI System Partition (which we assigned the drive letter S: earlier).
You should now be able to copy the EFI folder from the Clover ISO (as well as boot6 and boot7) into the EFI System partition. If you used boot1f32 for your PBR, rename "boot6" to "boot".
12. Make the necessary edits to the EFI\CLOVER\config.plist for your system and make sure you have FakeSMC.kext in EFI\Clover\kexts\Other. If you have a DSDT &/or SSDTs that works for your system, place them in /EFI/CLOVER/ACPI/patched.
13. Reboot the computer and it should boot to the Clover Main Menu .
-------------------------------------
詳細請看:
https://zh.wikipedia.org/wiki/GUID%E7%A3%81%E7%A2%9F%E5%88%86%E5%89%B2%E8%A1%A8
在GPT分割表的最開頭,處於相容性考慮仍然儲存了一份傳統的MBR,用來防止不支援GPT的硬碟管理工具錯誤識別並破壞硬碟中的資料,這個MBR也叫做保護MBR。在支援從GPT啟動的作業系統中,這裡也用於儲存第一階段的啟動代碼。在這個MBR中,只有一個標識為0xEE的分割,以此來表示這塊硬碟使用GPT分割表。不能識別GPT硬碟的作業系統通常會識別出一個未知類型的分割,並且拒絕對硬碟進行操作,除非用戶特別要求刪除這個分割。這就避免了意外刪除分割的危險。另外,能夠識別GPT分割表的作業系統會檢查保護MBR中的分割表,如果分割類型不是0xEE或者MBR分割表中有多個項,也會拒絕對硬碟進行操作。
在使用MBR/GPT混合分割表(就是CLOVER)的硬碟中,這部分儲存了GPT分割表的一部分分割(通常是前四個分割),可以使不支援從GPT啟動的作業系統從這個MBR啟動,啟動後只能操作MBR分割表中的分割。如Boot Camp就是使用這種方式啟動Windows。
-------------------------------------
XORBOOT 是一個輕量級的圖形化BOOTLOAD,與CLOVER比差太多了。
(BOOTICE內發現的)
如何移除重複的選項(BIOS boot內)
Copy savebcd newbcd
Bcdedit /enum firmware > enumfw.txt
Bcdedit /store newbcd /delete {93cee840-f524-11db-af62-aa767141e6b3}
Bcdedit /import newbcd /clean