如果我买了一台装有Windows8和secure boot的电脑,我还能安装linux吗?

新的UEFI安全引导系统在windows8中引起了很大的混乱,尤其是在双引导程序中。请继续阅读,以澄清有关Windows8和Linux双引导的误解。...

如果我买了一台装有Windows8和secure boot的电脑,我还能安装linux吗?

新的UEFI安全引导系统在windows8中引起了很大的混乱,尤其是在双引导程序中。请继续阅读,以澄清有关Windows8和Linux双引导的误解。

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的问答网站分组。

问题

超级用户读者harshak对新的UEFI系统很好奇。他写道:

I’ve heard a lot about how Microsoft is implementing UEFI Secure Boot in Windows 8. Apparently it prevents “unauthorized” bootloaders from running on the computer, to prevent malware. There’s a campaign by the Free Software Foundation against secure boot, and a lot of people have been saying online that it’s a “power grab” by Microsoft to “eliminate free operating systems”.

If I get a computer that has Windows 8 and Secure Boot preinstalled, will I still be able to install Linux (or some other OS) later? Or does a computer with Secure Boot only ever work with Windows?

那交易是什么?双引导者真的不走运吗?

答案

超级用户贡献者Nathan Hinkle对UEFI是什么和不是什么进行了精彩的概述:

First of all, the simple answer to your question:

  • If you have an ARM tablet running Windows RT (like the Surface RT or the Asus Vivo RT), then you will not be able to disable Secure Boot or install other OSes. Like many other ARM tablets, these devices will only run the OS they come with.
  • If you have a non-ARM computer running Windows 8 (like the Surface Pro or any of the myriad ultrabooks, desktops, and tablets with an x86-64 processor), then you can disable Secure Boot completely, or you can install your own keys and sign your own bootloader. Either way, you can install a third party OS like a Linux distro or FreeBSD or DOS or whatever pleases you.

Now, on to the details of how this whole Secure Boot thing actually works: There’s a lot of misinformation about Secure Boot, especially from the Free Software Foundation and similar groups. This has made it hard to find info about what Secure Boot actually does, so I’ll try my best to explain. Note that I have no personal experience with developing secure boot systems or anything like that; this is just what I’ve learned from reading online.

First of all, Secure Boot is not something that Microsoft came up with. They’re the first to widely implement it, but they didn’t invent it. It’s part of the UEFI specification, which is basically a newer replacement for the old BIOS that you’re probably used to. UEFI is basically the software that talks between the OS and the hardware. UEFI standards are created by a group called the “UEFI Forum“, which is made up of computing industry representatives including Microsoft, Apple, Intel, AMD, and a handful of computer manufacturers.

Second most important point, having Secure Boot enabled on a computer does not mean that computer can never boot any other operating system. In fact, Microsoft’s own Windows Hardware Certification Requirements state that for non-ARM systems, you must be able to both disable Secure Boot and change the keys (to allow other OSes). More on that later though.

What does Secure Boot do?

Essentially, it prevents malware from attacking your computer through the boot sequence. Malware that enters through the bootloader can be very difficult to detect and stop, because it can infiltrate low-level functi*** of the operating system, keeping it invisible to antivirus software. All that Secure Boot really does is it verifies that the bootloader is from a trusted source, and that it hasn’t been tampered with. Think of it like the pop-up caps on bottles that say “do not open if lid is popped up or seal has been tampered with”.

007Ys3FFgy1gphw4a259vj308x06kglo

At the top level of protection, you have the platform key (PK). There is only one PK on any system, and it is installed by the OEM during manufacturing. This key is used to protect the KEK database. The KEK database holds Key Exchange Keys, which are used to modify the other secure boot databases. There can be multiple KEKs. There is then a third level: the Authorized Database (db) and the Forbidden Datbase (dbx). These contain information about Certificate Authorities, additional cryptographic keys, and UEFI device images to allow or block, respectively. In order for a bootloader to be allowed to run, it must be cryptographically signed with a key that is in the db, and is not in the dbx.

007Ys3FFgy1gphw4aiht1j30bq0a174g

Image from Building Windows 8: Protecting the pre-OS environment with UEFI

How this works out on a real-world Windows 8 Certified system

The OEM generates its own PK, and Microsoft provides a KEK that the OEM is required to pre-load into the KEK database. Microsoft then signs the Windows 8 Bootloader, and uses their KEK to put this signature in the Authorized Database. When UEFI boots the computer, it verifies the PK, verifies Microsoft’s KEK, and then verifies the bootloader. If everything looks good, then the OS can boot.

007Ys3FFgy1gphw4ayisjj30g304lt8w Image from Building Windows 8: Protecting the pre-OS environment with UEFI

Where do third party OSes, like Linux, come in?

First, any Linux distro could choose to generate a KEK and ask OEMs to include it in the KEK database by default. They would then have every bit as much control over the boot process as Microsoft does. The problems with this, as explained by Fedora’s Matthew Garrett, are that a) it would be difficult to get every PC manufacturer to include Fedora’s key, and b) it would be unfair to other Linux distros, because their key wouldn’t be included, since **aller distros don’t have as many OEM partnerships.

What Fedora has chosen to do (and other distros are following suit) is to use Microsoft’s signing services. This scenario requires paying $99 to Verisign (the Certificate Authority that Microsoft uses), and grants developers the ability to sign their bootloader using Microsoft’s KEK. Since Microsoft’s KEK will already be in most computers, this allows them to sign their bootloader to use Secure Boot, without requiring their own KEK. It ends up being more compatible with more computers, and costs less overall than dealing with setting up their own key signing and distribution system. There are some more details about how this will work (using GRUB, signed Kernel modules, and other technical info) in the aforementioned blog post, which I recommend reading if you’re interested in this sort of thing.

Suppose you don’t want to deal with the hassle of signing up for Microsoft’s system, or don’t want to pay $99, or just have a grudge against large corporati*** that start with an M. There is another option to still use Secure Boot and run an OS other than Windows. Microsoft’s hardware certification requires that OEMs let users enter their system into UEFI “custom” mode, where they can manually modify the Secure Boot databases and the PK. The system can be put into UEFI Setup Mode, where the user could even specify their own PK, and sign bootloaders themselves.

Furthermore, Microsoft’s own certification requirements make it mandatory for OEMs to include a method to disable Secure Boot on non-ARM systems. You can turn Secure Boot off! The only systems where you can’t disable Secure Boot are ARM systems running Windows RT, which function more similarly to the iPad, where you can’t load custom OSes. Although I wish that it would be possible to change the OS on ARM devices, it is fair to say that Microsoft is following the industry standard with regard to tablets here.

So secure boot is not inherently evil?

So as you can hopefully see, Secure Boot is not evil, and is not restricted only to use with Windows. The reason the FSF and others are so upset about it is because it does add extra steps to using a third-party operating system. Linux distros may not like paying to use Microsoft’s key, but it is the easiest and most cost-effective way to get Secure Boot working for Linux. Fortunately, it is easy to turn Secure Boot off, and possible to add different keys, thus avoiding the need to deal with Microsoft.

Given the amount of increasingly advanced malware, Secure Boot seems like a reasonable idea. It’s not meant to be an evil plot to take over the world, and is a lot less scary than some free software pundits will have you believe.

007Ys3FFgy1gphw4bcpysj304l06gdfq

Additional reading:

  • Microsoft Hardware Certification Requirements
  • Building Windows 8: Protecting the pre-OS environment with UEFI
  • Microsoft presentation on Secure Boot deployment and key management
  • Implementing UEFI Secure Boot in Fedora
  • TechNet Secure Boot Overview
  • Wikipedia article on UEFI

TL;DR: Secure boot prevents malware from infecting your system at a low, undetectable level during boot. Anybody can create the necessary keys to make it work, but it’s hard to convince computer makers to distribute your key to everyone, so you can alternatively choose to pay Verisign to use Microsoft’s key to sign your bootloaders and make them work. You can also disable Secure Boot on any non-ARM computer.

Last thought, with regards to the FSF’s campaign against Secure boot: Some of their concerns (i.e. it makes it harder to install free operating systems) are valid to a point. Saying that the restricti*** will “prevent anyone from booting anything but Windows” is dem***trably false though, for the reas*** illustrated above. Campaigning against UEFI/Secure Boot as a technology is short-sighted, misinformed, and unlikely to be effective anyways. It’s more important to ensure that manufacturers actually follow Microsoft’s requirements for letting users disable Secure Boot or change the keys if they so desire.

 


有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。

 

 

 

  • 发表于 2021-04-11 20:56
  • 阅读 ( 235 )
  • 分类:互联网

你可能感兴趣的文章

7个地方你可以在线购买一台专用的linux pc或笔记本电脑

在现有的笔记本电脑或台式电脑上安装Linux很容易。但是如果你想省吃俭用呢?有没有可能买一台已经安装了您所选择的操作系统的Linux电脑? ...

  • 发布于 2021-03-12 14:15
  • 阅读 ( 223 )

我没有windows或mac:我只使用linux的8个原因

...不是出于怨恨,也不是为了恶作剧。我只是想先说清楚,如果你想从Linux上完成所有的计算,你可以。Linux不再仅仅是一个程序员的地方,他们对机器如何工作有着深厚的技术知识。我可能知道如何在终端中键入一些命令,但我...

  • 发布于 2021-03-13 02:59
  • 阅读 ( 183 )

你的电脑不再支持windows 10?这是你能做的!

...2014年间销售的、最初运行Windows 8的二合一PC。他们升级到windows8.1或利用免费的windows10升级服务都没有问题。 ...

  • 发布于 2021-03-13 10:03
  • 阅读 ( 253 )

如何将一个完整的操作系统从一台旧电脑移到一台新电脑上

... 如果您运行的是Linux,那么这个过程是无痛的。但是在Windows上,你更容易遇到问题。 ...

  • 发布于 2021-03-14 05:27
  • 阅读 ( 332 )

什么是uefi?它如何让您更安全?

...PC被认证为与Windows 8兼容,需要支持安全引导。因此,当Windows8在2012年发布时,人们对安全引导功能非常感兴趣。 ...

  • 发布于 2021-03-17 19:25
  • 阅读 ( 180 )

2020年前从Windows7升级到10的4种最佳方法

... 由于Windows7和Windows10非常流行,人们很容易忘记Windows8.1的存在。虽然对该版本的主流支持在2018年初结束,但Windows8.1将获得延长支持,直到2023年1月10日。 ...

  • 发布于 2021-03-18 02:36
  • 阅读 ( 209 )

如何确保您的计算机可以运行Windows10

... 虽然您可能坚持使用Windows7或Windows8,但您的计算机很有可能运行Windows10。下面是如何检查你的电脑是否可以运行Windows以及下一步该怎么做。 ...

  • 发布于 2021-03-19 03:52
  • 阅读 ( 187 )

如何禁用uefi安全引导到双引导任何系统

... 如果Secure Boot无法识别您试图安装的代码,它将阻止您。安全引导可方便地防止恶意代码在系统上运行。但它也会阻止你启动一些合法的操作系统,比如kalilinux、androidx86或...

  • 发布于 2021-03-20 03:43
  • 阅读 ( 401 )

我选择google pixelbook而不是macbook的10个原因

如果你想买一台小巧轻便的笔记本电脑,你可能会考虑买一台苹果MacBook。但你也应该考虑谷歌的像素书吗? ...

  • 发布于 2021-03-24 04:11
  • 阅读 ( 195 )

Windows7今天死掉了:下面是你需要知道的

...脑时间太长了,那可能是时候买一台新电脑了。如果你在Windows8发布后的七年里没有升级过硬件,你会发现现代电脑(尤其是带有固态存储器的电脑)的性能有了显著的提高,电池寿命也更长。 这并不意味着如果你不喜欢Windows10...

  • 发布于 2021-04-02 18:40
  • 阅读 ( 388 )
会写诗的六叔
会写诗的六叔

0 篇文章

相关推荐