来自arch wiki 但是中文版没有下面内容复制代码
- https://wiki.archlinux.org/index.php/Grub2#Hardware-Specific_UEFI_Examples
下载包
For 64-bit aka x86_64 UEFI firmware:
# pacman -S grub-efi-x86_64
For 32-bit aka i386 UEFI firmware:
# pacman -S grub-efi-i386
Install grub-uefi boot files
Install to UEFI System Partition
Note: The below commands assume you are using grub-efi-x86_64 (for grub-efi-i386 replace x86_64 with i386 in the below commands).
Note: To do this, you need to boot using UEFI and not the BIOS. If you booted by just copying the ISO file to the USB drive, you will need to follow this guide or grub-install will show errors.
这里需要挂着U盘,同时建立boot分区,所以相对的命令代码的目录需要适当改变eg:# mkdir -p /boot/efi 变为 /mnt/boot/efi(假设挂载到mnt)
The UEFI system partition will need to be mounted at /boot/efi/ for the GRUB(2) install script to detect it:
# mkdir -p /boot/efi
# mount -t vfat /dev/sdXY /boot/efi
Install GRUB UEFI application to /boot/efi/EFI/arch_grub and its modules to /boot/grub/x86_64-efi (recommended) using:
# modprobe dm-mod
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug
# mkdir -p /boot/grub/locale
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
Note: Without --target or --directory option, grub-install cannot determine for which firmware grub(2) is being installed. In such cases grub-install will show source_dir doesn't exist. Please specify --target or --directory message.
If you want to install grub(2) modules and grub.cfg at the directory /boot/efi/EFI/grub and the grubx64.efi application at /boot/efi/EFI/arch_grub (ie. all the grub(2) uefi files inside the UEFISYS partition itself) use:
# modprobe dm-mod
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --boot-directory=/boot/efi/EFI --recheck --debug
# mkdir -p /boot/efi/EFI/grub/locale
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/efi/EFI/grub/locale/en.mo
The --efi-directory option mentions the mountpoint of UEFI SYSTEM PARTITION , --bootloader-id mentions the name of the directory used to store the grubx64.efi file and --boot-directory mentions the directory wherein the actual modules will be installed (and into which grub.cfg should be created).
The actual paths are:
<efi-directory>/<EFI or efi>/<bootloader-id>/grubx64.efi
<boot-directory>/grub/x86_64-efi/<all modules, grub.efi, core.efi, grub.cfg>
Note: the --bootloader-id option does not change <boot-directory>/grub, i.e. you cannot install the modules to <boot-directory>/<bootloader-id>, the path is hard-coded to be <boot-directory>/grub.
In --efi-directory=/boot/efi --boot-directory=/boot/efi/EFI --bootloader-id=grub:
<efi-directory>/<EFI or efi>/<bootloader-id> == <boot-directory>/grub == /boot/efi/EFI/grub
In --efi-directory=/boot/efi --boot-directory=/boot/efi/EFI --bootloader-id=arch_grub:
<efi-directory>/<EFI or efi>/<bootloader-id> == /boot/efi/EFI/arch_grub
<boot-directory>/grub == /boot/efi/EFI/grub
In --efi-directory=/boot/efi --boot-directory=/boot --bootloader-id=arch_grub:
<efi-directory>/<EFI or efi>/<bootloader-id> == /boot/efi/EFI/arch_grub
<boot-directory>/grub == /boot/grub
In --efi-directory=/boot/efi --boot-directory=/boot --bootloader-id=grub:
<efi-directory>/<EFI or efi>/<bootloader-id> == /boot/efi/EFI/grub
<boot-directory>/grub == /boot/grub
The <efi-directory>/<EFI or efi>/<bootloader-id>/grubx64.efi is an exact copy of <boot-directory>/grub/x86_64-efi/core.efi.
Note: In GRUB 2.00, the grub-install option --efi-directory replaces --root-directory and the latter is deprecated.
Note: The options --efi-directory and --bootloader-id are specific to GRUB(2) UEFI.
In all the cases the UEFI SYSTEM PARTITION should be mounted for grub-install to install grubx64.efi in it, which will be launched by the firmware (using the efibootmgr created boot entry in non-Mac systems).
If you notice carefully, there is no <device_path> option (Eg: /dev/sda) at the end of the grub-install command unlike the case of setting up GRUB(2) for BIOS systems. Any <device_path> provided will be ignored by the install script as UEFI bootloaders do not use MBR or Partition boot sectors at all.
You may now be able to UEFI boot your system by creating a grub.cfg file by following #Generate GRUB2 UEFI Config file and #Create GRUB2 entry in the Firmware Boot Manager.
原帖由fujianabc 于 2011-4-16 16:42 发表 "http://bbs.wuyou.net/redirect.php?goto=findpost&pid=2206532&ptid=191704"
<b>7-3更新: UEFI方式启动mbr硬盘上已有的win7 x64</b>
今天试了一下,发现UEFI方式完全可以启动mbr硬盘上的win7,这样测试UEFI启动不需要在全盘格成GPT分区表了。
而且一个win7 x64系统可以同时用bios和uefi两种方式启动,对于已有的64位win7系统,进行以下操作就可以用uefi方式启动了,而且不影响bios方式启动
1. 在FAT16/32分区中建立efi\microsoft\boot文件夹,在其中放入这个bcd文件 bcd.rar (4.58 KB)
2. 用bcdedit更改这个bcd中{default}的device和osdevice的盘符为windows所在分区盘符
3. 把\Windows\Boot\EFI中的bootmgfw.efi放到Fat分区根目录中<br />在启动时指定执行bootmgfw.efi或者在efi shell下直接执行bootmgfw.efi即可
uefi方式启动win7时,四个彩球没了,只有滚动条了...
地址复制代码
- http://bbs.itiankong.com/thread-211859-1-1.html
宏基笔记本是32位Windows 7,因为是4G内存,所以想换用64位Windows 7,我用MSDN上下载的Windows 7 Ult刻录成光盘,在选择分区时出现以下提示“WINDOWS无法安装到这个磁盘。选中的磁盘中具有MBR分区表。在EFI系统上,windows只能安装到GPT磁盘”
原帖由 2011monk 于 2013-3-6 15:28 发表
因为个人对uefi了解很肤浅,所以不确定uefi-mbr可以启动,看了fujianabc大的帖子才确定。所以楼主最好多看fujianabc 大的帖子。
“windows可以uefi+mbr/gpt启动”
欢迎光临 无忧启动论坛 (http://wuyou.net./) | Powered by Discuz! X3.3 |