|
本帖最后由 沙漠之子 于 2015-10-7 16:05 编辑
G4D引导Clover(支持多分区U盘)
本人比较懒未贴图
基本原理:
MBR (使用 boot0ss/boot0af/boot0md 代码) -> PBR (使用 boot1 代码) -> \boot或指定boot3/4/5/7/ -> \EFI\CLOVER\CloverX64.efi -> Clover 菜单 - \EFI\boot\bootx64.efi ---> Windows UEFI 启动.
文献参考:
clover的自带文档
http://rmprepusb.blogspot.co.uk/ ... ub4dos-to-uefi.html
http://www.rmprepusb.com/tutoria ... e-Clover-Boot-Files
工具:
FbinstTool、BOOTICEx86
引导文件介绍:(照搬clover的自带文档)
BootSectors:
boot0--第一阶段
boot0af 要求磁盘激活
boot0ss 不要求磁盘激活
boot0md
boot1--第二阶段
boot1altV3
boot1f32 支持FAT32分区 默认引导文件为boot
boot1f32alt 支持FAT32分区 默认引导文件为boot,等待2秒,支持按数字键选择引导boot3/4/7
boot1h 支持HFS+分区 默认引导文件为boot
boot1h2 支持HFS+分区 默认引导文件为boot,等待2秒,支持按数字键选择引导boot3/4/7
boot1x 支持exFAT分区 默认引导文件为boot
boot0af (boot0 Active First) - MBR sector that search for active partition in MBR table (then GPT table). Origin from Apple's boot132 project. This version of boot0af implements hybrid GUID/MBR partition scheme support. Written by Tamás Kosárszky on 2008-03-10
boot0ss (boot0 Signature Scanning) - MBR sector that search for partition with valid PBR signature regardless if it's active or not. Good for Windows that wants to have its partition active. It share the same code as boot0af. Only scanning is done in different order. Written by JrCs on 2013-05-08.
boot1h - PBR sector for HFS+ formatted partition. Search for file "boot" in the root of the partiton. Origin from Apple's boot132 project. Written by Tamás Kosárszky on 2008-04-14. This is mod by Slice to support large boot file. Not 440kb as origin but 472k needed to boot Clover-64.
boot1h2 - PBR sector for HFS+ formatted partition with alternative booting with choice of key pressed. File to boot = "boot{key}". Coded by dmazar based on boot1h.
boot1f32 - PBR sector for FAT32 formatted partition. Search for file "boot" in the root of the partiton. Useful for EFI partition or USB stick. Written by mackerintel on 2009-01-26.
boot1f32alt - PBR sector for FAT32 formatted partition with alternative booting with choice of key pressed. File to boot = "boot{key}". Modded by Slice based on
boot1f32 and boot1h2.
boot1x - PBR sector for exFat formatted partition. Search for file "boot" in the root of the partiton. Useful for EFI partition or USB stick. Written by Zenith432 on 2014-11-19.
对于单分区:
1.可直接使用@teasiu制作的小工具http://bbs.wuyou.net/forum.php?mod=viewthread&tid=366522
2.win下手动创建
格式化U盘为FAT32;
使用BOOTICEx86将boot0ss(推荐)写入到U盘的MBR
使用BOOTICEx86将boot1f32alt写入到U盘单分区的PBR
将boot7改名为boot扔到U盘根目录
复制EFI文件夹等到U盘
3.Mac下手动创建(参考clover自带的教程)
EFI Partition Install (FAT32) or to USB stick drive (disk1s1).
---------------------------------
Suppose that your installation is on /dev/disk0s1
- Prepare EFI partition:
sudo mkdir /Volumes/EFI
sudo mount_msdos /dev/disk0s1 /Volumes/EFI/
- Install clover to the EFI partition's root directory:
cp boot /Volumes/EFI/ (注意此处boot为boot3/4/7改名而来)
sudo umount -f /Volumes/EFI/
- Install boot0ss to the MBR:
sudo fdisk440 -f boot0ss -u -y /dev/rdisk0
- Install boot1f32alt to the partition's bootsector:
dd if=/dev/rdisk0s1 count=1 bs=512 of=origbs
cp boot1f32alt newbs
dd if=origbs of=newbs skip=3 seek=3 bs=1 count=87 conv=notrunc
dd if=newbs of=/dev/rdisk0s1 count=1 bs=512
对于多分区U盘(此次的重点)
首先,对于多功能的启动盘 一般都存在存放win启动文件的BOOT目录,而根据上文叙述boot1引导的默认启动文件是boot,这样就存在文件名冲突的问题.
故Steve Si大,对boot1f32alt进行修改,将默认引导文件boot改为boot7则boot1f32alt7.(下文会将直接使用BOOTICEx86直接改PBR)
我的U盘的结构
ud隐藏分区(现阶段测试,必须,后面讲原因) NTFS(win7安装盘) FAT32(EFI分区) exFAT(一般数据分区) HFS+(El captain安装盘) HFS+(来自neycwby09大的FireWolf OS X PE V7.0 Ultimate,Mac PE)
1.在ud分区安装G4D即grldr
2.将boot0ss写入ud分区
3.使用BOOTICEx86将boot1f32alt写入EFI分区的PBR中.
4.使用BOOTICEx86将EFI分区的PBR中boot改成boot7.(实在不想贴图 自己摸索超级简单的)
5.boot7及efi文件夹放到EFI分区根目录
grub4dos的菜单
title [1] 启动 clover 64 四叶草 引导(加载FAT32分区EFI目录)\n 请稍后回车进入
chainloader (ud)/boot0ss || chainloader (ud)/boot0md || chainloader (ud)/boot0af
注意:
1.当前的问题,当选择进入该条目后等2秒后,会卡在一个更小的命令闪烁符,此时直接任意键即可引导.
2.尝试过将boot0ss等直接放在EFI分区中,但实测启动不了 (手上没有空优盘,没尝试格盘重建)
3.clover模拟uefi环境,会比直接在真实的uefi环境载入慢一些
3.只测了用该方法启动进入了El captain (自家电脑只有单系统了)
教程到此结束,不足随访
本教程同步在无忧论坛和远景论坛及本人博客中发布
本教程仅供参考,不对使用该方法导致软硬件的故障负责 |
评分
-
查看全部评分
|