最近在Thinkpad上安装Ubuntu12.04的时候,经历了几个问题,发现BOIS里多了很多选项, 而且安装双系统也有UEFI有关,在网站上找了一篇文章,发现这还是一个新概念(或者是新模式)。我觉得有必要介绍下。
正文:
UEFI
UEFI (~EFI) is a firmware interface that is widespread on recent computers, especially those more recent than 2010. It is intended to replace the traditional BIOS firmware interface that isprevalent on earlier machines. This page provides information about installing and booting Ubuntu using EFI, as well as about switching between EFI mode and legacy BIOS mode using Ubuntu.
UEFI(~EFI)是当今电脑广泛使用的固件接口,特别是2010年以后的电脑。这是一种将要代替传统BIOS固件的技术,而以前,BISO是被广泛的使用。这个页面将介绍Ubuntu使用EFI方式来安装和启动的一些信息,同样也会介绍使用Ubuntu在EFI模式和传统模式中切换的操作。
1,Installing Ubuntu Quickly and Easily via Trial and Error
1,通过试验,轻松快速安装Ubuntu
If you have a computer that is more recent than 2010 and you do not know whether or not you need to install Ubuntu in EFI mode, you should be able to get Ubuntu installed quickly and correctly using the following steps:
如果你有一台新于2010的电脑,你不知道你是否需要通过EFI模式安装Ubuntu,只要通过以下的步骤,你就快速准确的安装Ubuntu。
Create a LiveDVD or LiveUSB of Ubuntu-Secure-Remix 64bit or of Ubuntu (>=12.10) 64bit. The former is more convenient, as it already includes Boot-Repair, which is used in step 4.
制作一个Ubuntu64bit(>=12.10)LiveDVD 或者 LiveUSB。前者更好一些,因为他已经包括了Boot-Repair这个工具,而这个工具将在第4步使用到
Boot your PC using the LiveDVD or LiveUSB and choose "Try Ubuntu". Remark: if you get a Secure boot or signature error, disable SecureBoot as described here, then retry to boot the disk. You may also need to disable QuickBoot/FastBoot in the same menu.
Install Ubuntu from the Live CD/DVD or Live USB in the usual manner, then reboot the PC.
If the PC does not load Ubuntu (but instead loads Windows, for example, as in Bug #1050940), or if the Windows entry in the GRUB 2 menu does not boot Windows (see Bug #1024383), boot your PC using the Live CD/DVD or Live USB and choose "Try Ubuntu" once again. When the live session has loaded, run Boot-Repair (see link for details). When Boot-Repair loads, click on the "Recommended repair" button. Then reboot the pc.
如果你的PC不能加载Ubuntu,或者当Windows进入GRUB2菜单,但不能正常启动Windows,插入有Ubuntu系统的启动盘或者USB,启动你PC,选择“Try Ubuntu”,当进入Ubuntu系统之后,执行“Boot-Repair”工具,启动这个工具之后,选择“Recommended repair”按钮,大概需要10分钟左右,然后重启你的PC。
This should fix most boot problems. If this does not fix your boot problems, please run Boot-Repair's "Recommended repair" a 2nd time, and write on a paper the URL (paste.ubuntu.com/XXXXXX/) that will appear. Then reboot the pc.
这个工具将修改大部分启动问题(PS:我安装完Ununt之后,不能启动到WIN8,就是使用这个工具解决问题的)。如果还没有修改你的启动问题,请再运行一次“Boot-Repair”,然后把这个URL(paste.ubuntu.com/xxxxxx/)写到你的纸上(PS:这是干嘛?),然后重启。
If still not good, please create a new thread in this forum, describing your problem and indicating the URL you wrote in the previous step.
如果还没有好,请在Ubuntu论坛新建一个线程,描述你的问题,并附上你的上一步记录下的URL。
2,Installing Ubuntu in EFI mode
2,在EFI模式下安装Ubuntu
Warning: if you are a new Ubuntu user, you may want to follow the advice of the previous paragraph.
提示:如果你的一个Ubuntu新手,你应该关注本文上一段提出的建议
1,
Case when Ubuntu must be installed in EFI mode
1,
Ubuntu必须在EFI模块下安装的案例
Having a PC with EFI firmware does not mean that you need to install Ubuntu in EFI mode. What is important is below:
你的PC有EFI模式并不意味着你要安装的Ubuntu必须要在EFI模式下去执行。但请注意以下情况:
if the other systems (Windows Vista/7/8, GNU/Linux...) of your computer are installed in EFI mode, then you must install Ubuntu in EFI mode too.
如果你已经安装的操作系统(Windows Vista/7/8,GNU/Linux...)是在EFI模式下安装的,那么你将要安装的Ubuntu必须同样也是要在EFI模式进行安装。
if the other systems (Windows, GNU/Linux...) of your computer are installed in Legacy (not-EFI) mode, then you must install Ubuntu in Legacy mode too. Eg if your computer is old (<2010), is 32bits, or was sold with a pre-installed Windows XP.
如果你已经安装的操作系统(Windows,GUN/Linux...)是在传统模式(非EFI)模式,那你将要安装的Ubuntu必须要有传统模式下安装。例如,你的PC是2010年以前的,是32位,或者出厂安装的是Windows XP。
if Ubuntu is the only operating system on your computer, then it does not matter, you can install Ubuntu in EFI mode or not.
如果你的电脑里没其它系统,那么你接下来安装Ubuntu随便安装在哪种模式。
2,General principle
2,通用规则
To install Ubuntu in EFI mode:
在EFI模式下安装Ubuntu:
Use a 64bit disk of Ubuntu (32bit installer does not detect EFI)
使用64位Ubuntu的光盘(32位系统不能检测到EFI固件)
Use the last version of Ubuntu. Support for UEFI appeared in 11.10, but has become more reliable in next versions. Support for UEFI SecureBoot appeared in 12.10.
使用最新的Ubuntu。首先是在Ubuntu11.10中支持UEFI,在后来的版本中支持得更好。12.10还支持UEFI的安全启动模式
Set up your firmware (BIOS) to boot the disk in UEFI mode (see the "Identifying if the computer boots the HDD in EFI mode" paragraph below)
设置你的固件(主板的BIOS)启动硬盘为UEFI模式(参考“如果电脑在EFI模式启动硬盘的识别”段落)
Then:
nothing special is required if you use the automatic installer of Ubuntu ("Install Ubuntu alongside others" or "Erase the disk and install Ubuntu"). Important: if you have a pre-installed Windows and you want to keep it, do not choose "Erase the disk and install Ubuntu".
然后:
如果你使用自动安装Ubuntu那么就不需要其它特别的要求(“与其它系统共存的安排Ubuntu”或者“擦除硬盘安装Ubuntu“)。重要:如果你的硬盘前已经安装了Windows,并且你想保存这个系统,就不要选择”擦除硬盘安装Ubunut”这个选项(PS:我选择就是“Install Ubuntu alongsie others”)
if you use the manual partitioning ("Something else"), the difference is that you will have to create and use an EFI partition (see the "Creating an EFI partition" paragraph below).
如果你使用的是手动分区,不同点就是你必须要创建一个EFI分区(参考“创建一个EFI分区”段落)
3,Identifying if the computer boots the HDD in EFI mode
3,
区别计算机在EFI模式下的硬盘启动
This is possible only if you have already installed Ubuntu on the HDD, or by the BIOS setup (see paragraph below).
如果你的已经在你的硬盘安装了Ubuntu,或者通过你查找你的BIOS设置,你将看到EFI相关信息。
From an Ubuntu installed on the HDD (neither liveCD nor liveUSB), open a terminal (Ctrl+Alt+T), then type the following command:
从你已经安装的Ubuntu(而不是Ubuntu安装盘或者U盘),打开一个终端(Ctrl+Alt+T),然后输入以下命令:
[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"
Remark: if the result is "Legacy boot on HDD", then either the BIOS is not UEFI type, or the BIOS is not set up to boot the HDD in UEFI mode.
备注:如果显示的结果是“Legacy boot on HDD”,那你的BIOS不是UEFI的类型,或者BIOS没有设置硬盘启动为UEFI模式。
4,Identifying if the computer boots the CD in EFI mode
4,
区别计算机在EFI模式下的CD光驱启动
Warning: even if your PC boots the CD in EFI mode, it might boot the HDD in Legacy mode (and the contrary).
提示:就是你的PC的光盘启动是在EFI模式,你的硬盘启动也许是在传统的模式。
When booting on a 64-bit Ubuntu disk:
当你启动64位的光盘系统
- If the BIOS is set up to boot the CD in EFI mode, then you will see the screen below:
-如果你的BIOS设置为光盘启动为EFI模式,就将会看到以下信息:
- If the BIOS is NOT set up to boot the CD in EFI mode, or if the disk is not 64-bit, then you will see the screen below:
-如果你的BIOS设置的光盘启动不是EFI模式,或者 你的光盘不是64位的系统,你将会看到以下信息:
5,Set up the BIOS in EFI or Legacy mode
Some recent computers (>2011) allow to set up the boot either in UEFI mode or in Legacy (not-EFI) mode. The way to carry out this setting depends on the computers, but generally this setting is located in the "Boot order" tab of the BIOS (to access the BIOS screens, it is generally necessary to press a key during the PC startup).
2011以后的PC允许用户设置启动为UEFI模式或者传统的模式。这是一种方法让用户根据自己的电脑去设置,但是一般来说这种设备是位于BIOS的Boot order分区(当让PC进入BIOS,需要按特殊一些键)。
Remark: Some BIOSes allow one to set up the boot mode for the optical drive separately from the boot mode for the HDD.
备注:有一些BIOS允许用户去设置启动模式,从几个不同的硬盘分区去选择进入。
For example, below:
1,
the "UEFI Hitachi" line allows to boot the HDD in EFI mode,
2,
the "P1: Hitachi" line allows to boot the HDD in Legacy (not-EFI) mode,
3,the "P3: DVD" line allows to boot the Ubuntu CD in Legacy mode
4,the "UEFI: USB" lin allows to boot the Ubuntu liveUSB in EFI mode.
例如:
1,“UEFI Hitachi”允许用户从EFI模式硬盘启动,
2,“P1:Hitachi”允许用户从传统模式硬盘启动,
3,“P3:DVD”允许用户从传统模式光盘启动,
4,“UEFI:USB”允许用户从EFI模式启动USB系统。
Here is a 2nd example of BIOS, simpler, where the "Boot Mode" parameter allows one to choose the boot mode ("UEFI" or "Legacy") for all media (hard disk, CD, USB...) at the same time.
这是BIOS设置的第2种情况,很简单,在BIOS设置的“Boot Mode”选项中允许用户去选择启动模式(UEFI或者传统),适用启动的任何的启动媒介(硬盘,CD,U盘)。
Some other firmwares (BIOSes) propose an "UEFI/Legacy Boot:" option with the following choices: [Legacy only], [UEFI only] and [Both]. This last one boots in EFI mode when possible, then in Legacy mode if no EFI files are detected.
还有其它的一些一些BIOS固件计划同时支持“UEFI/传统启动"选项,一般有以下几种选项:[Legacy only], [UEFI only] 和 [Both]。最后一个是首先尝试EFI模式启动,如果没有检测到EFI固件,然后就从传统模式启动。
Creating an EFI partition
6,生成一个EFI分区
An EFI partition is necessary to install Ubuntu in EFI mode via the manual Ubuntu installer.
Since Ubuntu 12.04, it is possible to re-use an existing Windows7 EFI partition (without formatting it). If you use a previous version of Ubuntu, or if you have several installations of GNU/Linux in EFI mode, it is safer to create a new EFI partition EFI.
通过Ubuntu手动选择Ubuntu在EFI模式,那么,新建一个EFI分区是有必要的。
自从Ubuntu12.04以后,可以重用Windows7的EFI分区(不用格式化这个分区)。如果你使用一个之前的Ubuntu版本,或者你在EFI模式下,已经安装了一些GNU/Linux,那你新建一个EFI分区也是安全的。
An EFI partition can be created via a recent version of GParted (the Gparted version included in the 12.04 disk is OK), and must have the following attributes:
可以能一个现在版本的Gparted(Ubuntu12.04自带这个Gparted版本)来创建一EFI分区,你必须需要以下属性:
1,
Mount point: /boot/efi (remark: no need to set this mount point when using the manual partitioning, the Ubuntu installer will detect it automatically)
挂载点:/boot/efi(备注:不 需要手动去设置这个挂载点,Ubuntu安装器会自动检测)
2,
Size: between 100MB and 250MB
大小:100-200MB
3,
Type: FAT32
格式:FAT32
4,
Other: must be located at the start of a GPT disk, and must have a "boot" flag.
其它:必须位于GPT硬盘的开始位置,而且要有启动标志。
Identifying if an Ubuntu has been installed in EFI mode
An Ubuntu installed in EFI mode can be detected the following way:
一个在EFI模式下已经安装的Ubuntu系统能够通过以下几种方式检测:
1,
its /etc/fstab file contains an EFI partition (mount point: /boot/efi)
在/etc/fstab文件包含EFI分区(挂载点:/boot/efi)
2,
it uses the grub-efi bootloader (not grub-pc)
能够使用grub-efi bootlaoder(而不是grub-pc)
3,
from the installed Ubuntu, open a terminal (Ctrl+Alt+T) then type the following command:
在一个已经安装的Ubuntu系统里,打开一个终端(Ctrl+Alt+T),然后输入以下命令:
[ -d /sys/firmware/efi ] && echo "Installed in EFI mode" || echo "Installed in Legacy mode"
[ -d /sys/firmware/efi ] && echo "Installed in EFI mode" || echo "Installed in Legacy mode"
Converting Ubuntu into EFI or Legacy mode
Converting Ubuntu into EFI mode
Ubuntu转换为EFI模式
Start Boot-Repair, click on "Advanced options", go to the "GRUB location" tab.
启动boot-repair,选择”Advanced Options“,进入”GRUB Location“选项
If you do not see a "Separate /boot/efi partition" line, this means that your PC does not have any EFI partition. In this case, exit Boot-Repair, then create an EFI partition (see the "Creating an EFI partition" paragraph above).
如果你没有看到“Separate /boot/efi artition”字样,那么意味着你的PC没有EFI分区,这种情况下,退出boot-repair,然后参考上面创建EFI段落
If you see a "Separate /boot/efi partition" line, tick it then click the "Apply" button.
如果你看到“Separate /boot/efi partition”字样,选择它, 然后点击“Apply”按键。
Set up your BIOS so that it boots the HDD in EFI mode (see the ""Set up the BIOS in EFI or Legacy mode" paragraph above).
设置你的BIOS,那么就能够从EFI模式下硬盘启动你的系统了(详情参考上面段落)。
Converting Ubuntu into Legacy mode
把Ubuntu转换成传统模式
If Ubuntu is installed on a GPT disk (you can check it via the 'sudo parted -l' command), use Gparted to create a BIOS-Boot partition (1MB, unformatted filesystem, bios_grub flag) at the start of its disk.
如果你的Ubuntu安装在GPT盘(见附录1)(完全可以通过这个命令来检查“sudo parted -l”),在这个硬盘的开始处,使用Gparted去创建一个BIOS-Boot分区(1MB,不格式化文件系统,有bios_grub 标志)
Start Boot-Repair, click on "Advanced options", go to the "GRUB location" tab.
Untick the "Separate /boot/efi partition" option
Click the "Apply" button.
启动Boot-Repair,点击“Advanced Options”,选择“GRUB Location”选项页。
点击“Apply”按钮
Set up your BIOS so that it boots the HDD in Legacy mode (see the ""Set up the BIOS in EFI or Legacy mode" paragraph above).
设置你的BIOS,那么你的硬盘启动就是在传统的模式(详参上述段落)
SecureBoot
安全启动模式。
"Secure Boot" is a new UEFI feature that appeared in 2012, with Windows8 preinstalled computers. The support for this feature has started with Ubuntu 12.10 64bit (see this article), but it is not fully reliable yet, so you may need to disable it in order to be able to boot Ubuntu.
“安全启动”是在2012年新预装的WIN8的PC的UEFI新的特征。Ubuntu12.04 64bit的版本也支持这一特性,但是没有不具可靠性,所以为能够很好启动Ubuntu,你需要禁用这个功能。
Here is an example of BIOS showing that "Secure Boot" is enabled:
下面是“安全启动”使能的样子。
To disable or enable Secure Boot, find a similar option in your BIOS, and use the keyboard to switch it to Enabled/Disabled.
为了禁用或者使能安全启动模式,使用键盘去切换使其禁用或者使能。
See also
参考:
- UEFIBooting (older documentation, maybe useful for Mac)
UEFIBooting(老的版本,也许适用MAC)
- EasyBCD cannot be used in UEFI mode: thread on EasyBCD forum. But it can be used from version 2.2.
EasyBCD 不能在UEFI模式下使用:在BCD论坛,但是这个可以在2.2的版本中使用。
from:
https://help.ubuntu.com/community/UEFI