Linux | Ubuntu 与 Windows 双系统安装 / 高频故障 / UEFI 安全引导禁用

注:本文为 “buntu 与 Windows 双系统及高频故障解决” 相关文章合辑

英文引文,机翻未校。


How to install Ubuntu 20.04 and dual boot alongside Windows 10

如何将 Ubuntu 20.04 和双启动与 Windows 10 一起安装

Dave’s RoboShack
Published in Feb 17, 2021

Switching to Linux can be a big decision, depending on how you use your computer. Sometimes, you just need Windows for specific applications, and sometimes you need Linux for other applications. Whether you are just curious or you need it for work or a personal project, having both operating systems on one computer can be useful.

切换到 Linux 可能是一个重大决定,具体取决于您如何使用计算机。有时,您只需要 Windows 来运行特定的应用程序,有时您只需要 Linux 来运行其他应用程序。无论您是好奇还是需要它来工作或个人项目,将两个作系统放在一台计算机上都很有用。

In this article, I will explain the steps you need to install Ubuntu 20.04 next to your existing Windows 10 system.

在本文中,我将解释在现有 Windows 20.04 系统旁边安装 Ubuntu 10 所需的步骤。

Get your tools

获取您的工具

Before you can create an installation media, you first need the right tools to create one. The first thing is to download the Ubuntu ISO file that you want to install. An ISO file is simply a file that contains the actual operating system in a compact format. Go to https://ubuntu.com/download#download and click on the 20.04 LTS button.

在创建安装媒体之前,您首先需要正确的工具来创建一个安装媒体。第一件事是下载要安装的 Ubuntu ISO 文件。ISO 文件只是一个以紧凑格式包含实际作系统的文件。转到 https://ubuntu.com/download#download 并单击 20.04 LTS 按钮。

LTS stands for Long-Term-Support which simply means that this version gets support for 5 year unlike the other releases that are only supported for 9 months. Going for LTS is for many people the best option.

LTS 代表长期支持,这仅仅意味着此版本获得 5 年的支持,而其他版本仅支持 9 个月。对许多人来说,选择 LTS 是最好的选择

img

Download page of Ubuntu 20.04

Your browser might ask you if you want to save the file or open it. I’d recommend to save it. The ISO file is about 2.8 GB in size, so be prepared that it will take a while. This is the perfect time to get some tea.

您的浏览器可能会询问您是要保存文件还是打开文件。我建议保存它。ISO 文件的大小约为 2.8 GB,因此请准备好需要一段时间。这是喝茶的最佳时机。

The next tool that you need is a software to create the installation media. There are several tools available such as UNetbootin. or Rufus.. I personally am a big fan of balena Etcher..

您需要的下一个工具是用于创建安装媒体的软件。有几种工具可用,例如 UNetbootin 或 Rufus。我个人是 balena Etcher 的忠实粉丝。

img

  • Website of balena Etcher
    https://etcher.balena.io/

Etcher is available on Windows, MacOS and Linux and pretty easy to use. After the download has finished, you need to install it.

Etcher 可在 Windows、MacOS 和 Linux 上使用,并且非常易于使用。下载完成后,您需要安装它。

img

Installation of balena Etcher

Getting your system ready

准备您的系统

After you installed Etcher and downloaded the ISO file, you can create the installation media. You can either use a CD (yes, those still exist) or simply a USB stick. Using the USB stick is the most convenient as you do not need a CD drive which start to be come a rare artifact. Make sure the USB stick is empty as all the data will be erased in the next step.

安装 Etcher 并下载 ISO 文件后,您可以创建安装介质。您可以使用 CD(是的,那些仍然存在)或简单地使用 USB 记忆棒。使用 U 盘是最方便的,因为您不需要 CD 驱动器,而 CD 驱动器开始成为一种罕见的产物。确保 U 盘是空的,因为所有数据将在下一步中被删除。

When you open Etcher, you have a very simple interface.

当您打开 Etcher 时,您有一个非常简单的界面。

img

balena Etcher for creating the installation media

First, you select the ISO file that you want to use. You can probably find it in your downloads folder. Just navigate to it and select the ISO file. Then, you need to select the USB stick that you plugged into your computer and that you want to use as installation media. Take care that you select the correct one as you don’t want to wipe your internal hard drive or an external drive. The easiest is to look at the size of the different options and select the one with the memory size that your USB stick has.

首先,选择要使用的 ISO 文件。您可能可以在下载文件夹中找到它。只需导航到它并选择 ISO 文件。然后,您需要选择插入计算机并要用作安装介质的 U 盘。请注意选择正确的一个,因为您不想擦除内部硬盘驱动器或外部驱动器。最简单的方法是查看不同选项的大小,然后选择具有 U 盘内存大小的选项。

When the ISO and the USB stick are selected, click on the Flash!. button. This will also take a while.

选择 ISO 和 USB 记忆棒后,单击 Flash!按钮。这也需要一段时间。

img

Flashing the installation media

Getting Windows Ready

为 Windows 做好准备

There is one more step you need to do as preparation before the actual installation. You need to make some free space on your hard drive so your computer knows where to install Ubuntu. For this, you need to open the partitions software with the name “Create and format hard disk partitions”. You can simple type the word “partition” in the search bar of the start menu.

在实际安装之前,您还需要做一个准备工作。您需要在硬盘驱动器上腾出一些可用空间,以便您的计算机知道将 Ubuntu 安装在何处。为此,您需要打开名称为 “Create and format hard disk partitions” 的分区软件。您只需在开始菜单的搜索栏中键入 “partition” 一词即可。

img

Start menu for partitioning software

When starting the partitioning software, a new window called Disk Management should open up. This program should show you all the mass storage devices connected to your computer, internally and externally. In my case, I only have one hard drive because I already removed the USB stick and I only have one small hard drive in my demo setup.

启动分区软件时,应打开一个名为 “磁盘管理” 的新窗口。该程序应向您显示连接到您的计算机的所有内部和外部大容量存储设备。就我而言,我只有一个硬盘驱动器,因为我已经移除了 USB 记忆棒,并且我的演示设置中只有一个小硬盘驱动器。

img

Disk management tool

Many computers nowadays have one smaller SSD hard drive and a larger HDD hard drive. You will probably want to install Ubuntu on your SSD drive, given that you have enough disk space.

现在许多计算机都有一个较小的 SSD 硬盘驱动器和一个较大的 HDD 硬盘驱动器。如果您有足够的磁盘空间,您可能希望在 SSD 驱动器上安装 Ubuntu。

For a bare minimum installation, you should have at least 9 GB. If you also want to install some programs and save some files on Ubuntu, then you probably want a little bit more storage for your Ubuntu system. I would recommend at least 36 GB to make sure you don’t run out of disk space when have all the Ubuntu partitions on one hard drive. You can use less if you want to install Ubuntu on two hard drives: one for the system and one for storing your personal files. More on that later.

对于最低限度的安装,您至少应有 9 GB。如果您还想在 Ubuntu 上安装一些程序并保存一些文件,那么您可能希望为您的 Ubuntu 系统增加一点存储空间。我建议至少 36 GB,以确保当所有 Ubuntu 分区都位于一个硬盘驱动器上时,磁盘空间不会耗尽。如果您想在两个硬盘驱动器上安装 Ubuntu,您可以减少使用量:一个用于系统,一个用于存储您的个人文件。稍后会详细介绍。

Right click the partition that you want to shrink to make free space available on. Then, click on the “Shrink Volume…” button in the context menu.

右键单击要收缩的分区,使其上有可用空间。然后,单击 “Shrink Volume…” 按钮。

img

Selecting the partition to shrink

Next, you need to choose how much storage you want to make available. Enter the amount of Mega Bytes you want to have for your Ubuntu installation. Again, I would recommend to have at least 36 GB. Click on the “Shrink” button.

接下来,您需要选择要提供的存储空间。输入您希望用于 Ubuntu 安装的兆字节数。同样,我建议至少有 36 GB。点击 “Shrink” 按钮。

img

Selecting the size of the empty partition

Creating the new empty partition takes a while and then it should be displayed as Unallocated.

创建新的空分区需要一段时间,然后它应该显示为 Unallocated。

img

New empty partition created

After this is done, you can proceed with the installation of Ubuntu. You may now shut down your computer.

完成此作后,您可以继续安装 Ubuntu。您现在可以关闭您的计算机。

Installing Ubuntu

安装 Ubuntu

Now it is time to plug in the flashed USB stick and restart your computer. When the splash screen of your computer’s manufacturer appears, you need to press either F1, F2, F12, ESC or DEL on your keyboard to enter the BIOS menu of your computer. Which key to press depends on the brand of your computer. Your computer might even tell you which key to press. Else, you might need to look it up either in the manual of your computer on online.

现在是时候插入闪存的 USB 记忆棒并重新启动计算机了。当计算机制造商的启动画面出现时,您需要按键盘上的 F1、F2、F12、ESC 或 DEL 进入计算机的 BIOS 菜单。按哪个键取决于计算机的品牌。您的计算机甚至可能会告诉您要按哪个键。否则,您可能需要在线查看计算机的手册。

Once you entered your BIOS, you need to find the option to change the boot order. The BIOS of each motherboard can be slightly different. You need to navigate through it by yourself to find the option to change the boot order. When you find it, you should place the entry for USB devices on the first position so when you restart the computer it will automatically boot from the USB stick with the Ubuntu installation media.

进入 BIOS 后,您需要找到更改启动顺序的选项。每个主板的 BIOS 可能略有不同。您需要自己浏览它以找到更改启动顺序的选项。找到它后,您应该将 USB 设备的条目放在第一个位置,这样当您重新启动计算机时,它将自动从 USB 记忆棒和 Ubuntu 安装介质启动。

img

As an alternative, some computers even allow to directly choose the boot device to continue. In that case, you don’t need to change the boot order and you can simply select the USB stick to boot the computer. Again, this depends on the manufacturer of the motherboard.

作为替代方案,某些计算机甚至允许直接选择启动设备以继续。在这种情况下,您无需更改启动顺序,只需选择 U 盘即可启动计算机。同样,这取决于主板的制造商。

Note: If possible, disable the fast-boot option from your BIOS as this can cause trouble when switching from Windows to Linux. The reason is that the fast-boot setting will prevent a full shutdown of the PC and when starting up in a different OS, this could cause some issues. Also, the secure-boot option might need to be disabled. If that is the case, Ubuntu will let you know during the installation process. You will need to type a password during the installation process and then again when rebooting. This password will only be asked once.

注意:如果可能,请从 BIOS 中禁用 fast-boot 选项,因为这可能会在从 Windows 切换到 Linux 时造成麻烦。原因是快速启动设置会阻止 PC 完全关闭,并且在不同的作系统中启动时,这可能会导致一些问题。此外,可能需要禁用 secure-boot 选项。如果是这种情况,Ubuntu 会在安装过程中通知您。您需要在安装过程中键入密码,然后在重新启动时再次键入密码。此密码只会被询问一次。

When your computer is booting from the USB stick, it will show to you the Ubuntu logo. It might even perform a system check.

当您的计算机从 U 盘启动时,它会向您显示 Ubuntu 徽标。它甚至可能会执行系统检查。

img

Ubuntu boot screen

After the file check is complete, your computer will show you the Ubuntu welcome screen where you can choose whether you want to “Try Ubuntu” or “Install Ubuntu”. The first option is suited for testing if everything works such as the Wi-Fi drivers or other hardware. You will choose the second option for the installation.

文件检查完成后,您的计算机将向您显示 Ubuntu 欢迎屏幕,您可以在其中选择是要 “试用 Ubuntu” 还是 “安装 Ubuntu”。第一个选项适用于测试是否一切正常,例如 Wi-Fi 驱动程序或其他硬件。您将选择第二个安装选项。

img

Ubuntu welcome screen

The first thing to do is selecting your keyboard lay out. This can be changed later and you can also add multiple layouts int he settings menu once the installation is finished. If you don’t know what your keyboard layout is, Ubuntu can help you to find your layout.

首先要做的是选择您的键盘布局。这可以稍后更改,您也可以在安装完成后在设置菜单中添加多个布局。如果您不知道您的键盘布局是什么,Ubuntu 可以帮助您找到您的布局。

img

Ubuntu keyboard selection

After you selected the keyboard layout and pressed on the “Continue” button, you will probably be prompted to select a WiFi network. In my setup, I use a Ethernet connection which is why this step is omitted by the system. Simply select the network and enter the password and that’s it.

选择键盘布局并按下 “继续” 按钮后,系统可能会提示您选择 WiFi 网络。在我的设置中,我使用以太网连接,这就是系统省略此步骤的原因。只需选择网络并输入密码即可。

Next, you have the option to install Ubuntu as normal installation or as minimal installation. If you are new to Linux, it doesn’t hurt to install the normal package including Libre Office, some games and some other tools. Also, you should check the boxes for downloading updates during the installation and to install third-party software which include the GPU drivers for Nvidia and codecs for MP3 files.

接下来,您可以选择将 Ubuntu 安装为普通安装或最小安装。如果您是 Linux 新手,安装包括 Libre Office、一些游戏和其他一些工具在内的普通软件包并没有什么坏处。此外,您还应选中用于在安装过程中下载更新的复选框,以及安装第三方软件,其中包括 Nvidia 的 GPU 驱动程序和 MP3 文件的编解码器。

img

Installing updates and third-party software

Now, you need to select how you want to install Ubuntu on your system: wipe your entire disk or install Ubuntu alongside Windows 10. I always use the third option called “Something else” as this gives me more control on how I have my partitions. Also, I have trust issues with the automatic installation alongside Windows.

现在,您需要选择要如何在系统上安装 Ubuntu:擦除整个磁盘或将 Ubuntu 与 Windows 10 一起安装。我总是使用名为 “Something else” 的第三个选项,因为这让我可以更好地控制我的分区。此外,我对 Windows 的自动安装存在信任问题。

img

Ubuntu dual boot setup

Now, you need to manually set up the partitions for the Ubuntu installation. As you can see, you have some free space on your hard drive. This is the space that you freed earlier in Windows.

现在,您需要手动设置 Ubuntu 安装的分区。如您所见,您的硬盘驱动器上有一些可用空间。这是您之前在 Windows 中释放的空间。

img

Ubuntu partition manager

You could also shrink the partitions here, but I recommend doing it on Windows as this allows Windows to shift files around according to the modifications. When doing it here, you risk to overwrite parts of the hard drive that were used for data.

您也可以在此处缩小分区,但我建议在 Windows 上执行此作,因为这允许 Windows 根据修改来移动文件。在此处执行此作时,您可能会覆盖硬盘驱动器中用于数据的部分。

Just select the free space partition and click on the plus symbol below to add a new partition. The first partition you will make is the SWAP partition. It serves as an extension to your RAM (Random Access Memory) which is the fast memory which it needs immediately to function. If your RAM is full, Ubuntu will then save additional data in the SWAP.

只需选择可用空间分区,然后单击下面的加号即可添加新分区。您将创建的第一个分区是 SWAP 分区。它用作 RAM(随机存取存储器)的扩展,RAM 是它立即运行所需的快速内存。如果您的 RAM 已满,Ubuntu 将在 SWAP 中保存其他数据。

Note: Most guides I know of recommend to use double the size of your RAM for your SWAP partition and at least the same amount of memory as your RAM. Technically, you can do without SWAP at all, but it doesn’t hurt to have some SWAP in case your RAM is not that big. Most systems nowadays have at least 8 GB of RAM.

注意:我所知道的大多数指南都建议将 RAM 大小的两倍用于 SWAP 分区,并且至少与 RAM 相同。从技术上讲,您可以完全不使用 SWAP,但如果您的 RAM 不是那么大,有一些 SWAP 并没有什么坏处。现在大多数系统至少有 8 GB 的 RAM。

The more RAM you have, the less likely you need the SWAP memory. On this computer, I have 8 GB of RAM. Therefore, I use 4 GB for this installation. That should be enough. Choose “Logical” for the partition type and select “swap area” from the drop down menu. Then clock “OK”.

您拥有的 RAM 越多,您就越不需要 SWAP 内存。在这台计算机上,我有 8 GB 的 RAM。因此,我使用 4 GB 进行此安装。这应该足够了。为分区类型选择 “Logical”,然后从下拉菜单中选择 “swap area”。然后时钟 “OK”。

img

Creating the SWAP partition

Next, you need the so called “root” partition which hosts all your system files necessary by Ubuntu to function. By default, this partition will also contain your personal files, but here we will create a separate partition only for your personal files, such as your “Downloads” folder or “Music” folder. This is why we need to create two more partitions.

接下来,您需要所谓的 “根” 分区,它托管 Ubuntu 运行所需的所有系统文件。默认情况下,此分区还将包含您的个人文件,但在这里我们将仅为您的个人文件创建一个单独的分区,例如您的 “下载” 文件夹或 “音乐” 文件夹。这就是为什么我们需要再创建两个分区。

Both partitions will be about 16 GB in size. For the “root” partition, select the “Primary” option for the partition type as this partition needs to be bootable. Then, in the drop down menu, select “Ext4 journaling file system” which is still the default file system for Linux. The mount point must be “/” which stands for the “root” partition.

两个分区的大小约为 16 GB。对于 “root” 分区,为分区类型选择 “Primary” 选项,因为此分区需要可引导。然后,在下拉菜单中,选择 “Ext4 journaling file system”,它仍然是 Linux 的默认文件系统。挂载点必须是 “/” ,它代表 “root” 分区。

img

Creating the root partition

Your last partition will be the “home” partition. Again, click on the plus icon to create a new partition and dedicate the remaining space to this partition. Again, select it to be a “Logical” partition and again choose the “Ext4” file system. This time, the mount point is “/home”.

您的最后一个分区将是 “home” 分区。再次单击加号图标以创建新分区并将剩余空间专用于此分区。再次选择它作为 “Logical” 分区,然后再次选择 “Ext4” 文件系统。这一次,挂载点是 “/home”。

This partition will store all your personal files. If you do not create a separate “home” partition, your personal files will be stored inside the “root” partition. The reason why I create it as a separate partition is, that you can follow the same procedure to create a partition on a second hard drive. This is especially useful when your “root” partition is on a SSD drive while your personal files are on a HDD drive. My setup did not have two hard drives, but the procedure would be the same, except that you need to pay attention which free space is used for the “root” and which for the “home” partition.

此分区将存储您的所有个人文件。如果您不创建单独的 “home” 分区,您的个人文件将存储在 “root” 分区中。我将其创建为单独分区的原因是,您可以按照相同的过程在第二个硬盘驱动器上创建分区。当您的 “根” 分区位于 SSD 驱动器上而您的个人文件位于 HDD 驱动器上时,这尤其有用。我的设置没有两个硬盘驱动器,但过程是相同的,只是您需要注意哪些可用空间用于 “root” 分区,哪些用于 “home” 分区。

img

Creating the home partition

Now that all the partitions have been created, you should not have any free space left. Make sure the boot loader will be installed on the correct hard drive. Usually, this is the same drive where your Windows 10 boot loader is installed. Hit the “Install Now” button and confirm the installation.

现在,所有分区都已创建,您应该不会留下任何可用空间。确保 boot loader 将安装在正确的硬盘驱动器上。通常,这是安装 Windows 10 引导加载程序的同一驱动器。点击 “立即安装” 按钮并确认安装。

img

Overview of the partitioning

In the next step, you simply select the country where you are. This is simply to set the time zone for your system clock. It also affects how the time is displayed such as the 12-hour format or 24-hour format, depending on your country’s default system.

在下一步中,您只需选择您所在的国家 / 地区。这只是为了设置系统时钟的时区。它还会影响时间的显示方式,例如 12 小时格式或 24 小时格式,具体取决于您所在国家 / 地区的默认系统。

img

Choose a location

Lastly, you need to create your user account on the system. Fill in your name and verify if the username that is suggested is fine for you. You can also change the name of the computer. In the “Your name:” field, you are supposed to type your full name. Also, you need to set a password. It can be as long as you want, it can contain numbers, letters and symbols. Make sure it is a password you can remember as you will need it every time you install new software or you want to update your system. It should not be too easy though as this would make the password useless.

最后,您需要在系统上创建您的用户帐户。填写您的姓名并验证建议的用户名是否适合您。您还可以更改计算机的名称。在 “Your name:” 字段中,您应该键入您的全名。此外,您还需要设置密码。它可以随心所欲,它可以包含数字、字母和符号。确保它是您可以记住的密码,因为每次安装新软件或想要更新系统时都需要它。不过,这不应该太容易,因为这会使密码变得毫无用处。

img

Create your user account

After you set up your user account, you can click on the “Continue” button and the installation will be executed. Installing Ubuntu will not take a while. This process will probably take around 20 minutes, depending on your system.

设置用户帐户后,您可以单击 “继续” 按钮,将执行安装。安装 Ubuntu 不会花费一段时间。此过程可能需要大约 20 分钟,具体取决于您的系统。

img

Installation of Ubuntu in progress

You do not need to do anything until the installation is finished. A good time for another cup of tea.

在安装完成之前,您无需执行任何作。这是再喝一杯茶的好时机。

After the installation is finished, you can restart the computer and remove the USB stick. Now, when the computer is starting, it will first show to you the GRUB boot screen.

安装完成后,您可以重新启动计算机并取出 USB 记忆棒。现在,当计算机启动时,它将首先向您显示 GRUB 启动屏幕。

img

GRUB boot screen

The GRUB boot screen will show you the installed systems such as Ubuntu and Windows 10. Now, every time you start your computer, you can select which operating system you want to use. Enjoy your Ubuntu system!

GRUB 启动屏幕将显示已安装的系统,例如 Ubuntu 和 Windows 10。现在,每次启动计算机时,您都可以选择要使用的作系统。享受您的 Ubuntu 系统!

Closing Thoughts

结束语

As you can see, the entire process is no wizardry. You just need to know which steps you need to do in order to proceed. There are many interesting Linux distributions such as Manjaro, Solus, Fedora or Elementary OS. The installation procedure is usually quite similar. Of course, you can also go for another Ubuntu flavor such as Kubuntu or the Ubuntu Unity Remix. The choice is up to you.

正如你所看到的,整个过程并不是魔法。您只需要知道需要执行哪些步骤才能继续。有许多有趣的 Linux 发行版,例如 Manjaro、Solus、Fedora 或 Elementary OS。安装过程通常非常相似。当然,您也可以选择其他 Ubuntu 风格,例如 Kubuntu 或 Ubuntu Unity Remix。选择权在您手中。

If you do not know which one to chose, it is never wrong to pic the default Ubuntu version to get started. It is very user friendly and has a big user base and likewise many tutorials and explanations that you can use as reference.

如果您不知道该选择哪一个,那么选择默认的 Ubuntu 版本以开始使用永远不会错。它非常用户友好,拥有庞大的用户群,同样有许多教程和解释可供您参考。


How to Install Ubuntu Alongside Windows 10

如何将 Ubuntu 与 Windows 10 一起安装

07 Jan 2023

Dual booting Linux with Windows is one of the most convenient ways of enjoying the two operating systems on the same computer.

将 Linux 与 Windows 双启动是在同一台计算机上享受两个作系统的最便捷方式之一。

You have both OS installed on the disk, on real hardware and when you power on your system, you can choose which operating system to use.

您将作系统安装在磁盘上,安装在实际硬件上,当您打开系统电源时,您可以选择要使用的作系统。

Dual Boot Grub Screen

In the dual boot, you can choose which operating system to boot into

In an earlier tutorial, I showed the steps to dual boot Ubuntu with Windows. 7 which comes with an MBR partition. The steps are almost the same for the newer systems that come preinstalled with Windows 10.

在前面的教程中,我展示了使用 Windows 7 双启动 Ubuntu 的步骤,Windows 7 附带一个 MBR 分区。对于预装 Windows 10 的较新系统,这些步骤几乎相同。

In this tutorial, I’ll show you how to install Ubuntu with Windows 10 already installed on the system.

在本教程中,我将向您展示如何在系统上已安装 Windows 10 的情况下安装 Ubuntu。

💡

Before you start following the tutorial, I advise reading it entirely first. See what you need and what you should do in this tutorial. Once you have a good idea about the procedure and have all the necessary things on hand, start the process. Dual-boot is not a complicated process. It just takes some time and patience.

The steps mentioned here apply to other Ubuntu versions such as Lubuntu, Kubuntu, Xubuntu. and Ubuntu-based Linux distributions such as Linux Mint, elementary OS, etc.

此处提到的步骤适用于其他 Ubuntu 版本,例如 Lubuntu、Kubuntu、Xubuntu 和基于 Ubuntu 的 Linux 发行版,例如 Linux Mint、elementary OS 等。

Dual boot Ubuntu Linux with Windows 10

双启动 Ubuntu Linux 与 Windows 10

Dual Boot Ubuntu Linux with Windows

Compatibility checks

兼容性检查

This tutorial is suitable for systems that come with Windows 10 pre-installed with UEFI secure boot and GPT partitioning system. Please check whether your system uses GPT or MBR..

本教程适用于预装了 UEFI 安全启动和 GPT 分区系统的 Windows 10 系统。请检查您的系统使用的是 GPT 还是 MBR。

Make sure your system uses UEFI: This tutorial is only applicable for systems with UEFI boot. If you have bought your system in the last 5-6 years, chances are that you should already have a UEFI system on GPT partition. However, there is no harm in verifying that your system uses UEFI.. If your system uses legacy BIOS with MBR partitioning system, please follow this dual boot tutorial..

确保您的系统使用 UEFI:本教程仅适用于具有 UEFI 启动的系统。如果您在过去 5-6 年内购买了您的系统,那么您很可能已经在 GPT 分区上拥有 UEFI 系统。但是,验证您的系统是否使用 UEFI 并没有什么坏处。如果您的系统使用带有 MBR 分区系统的旧版 BIOS,请按照此双启动教程进行作。

Bitlocker encryption process is different: Newer systems with Windows 10 Pro have their disk encrypted with Bitlocker. If you have such a system, please follow this tutorial to dual boot with Bitclocker encryption..

Bitlocker 加密过程不同:使用 Windows 10 专业版的较新系统使用 Bitlocker 加密其磁盘。如果您有这样的系统,请按照本教程使用 Bitclocker 加密进行双启动。

System with both SSD and HDD: If you have a system with both SSD and HDD, i.e. dual disk system, the process is pretty much the same. However, you’ll be a lot better following this dedicated tutorial on dual booting dual disk system..

同时具有 SSD 和 HDD 的系统:如果您的系统同时具有 SSD 和 HDD,即双磁盘系统,则过程几乎相同。但是,按照这个关于双启动双磁盘系统的专门教程,你会好得多。

Prerequisites: What do you need?

先决条件:您需要什么?

You’ll need the following things to easily and safely install Linux alongside Windows:

您需要以下物品才能轻松安全地将 Linux 与 Windows 一起安装:

  • A computer that comes preinstalled with Windows 10.

    预装 Windows 10 的计算机。

  • A USB key (pen drive or USB drive) of at least 4 GB in size and no data on it.

    大小至少为 4 GB 且没有数据的 USB 密钥(笔式驱动器或 USB 驱动器)。

  • Internet connection (for downloading Ubuntu ISO image and live USB creating tool). You can do this on any system, not necessarily on the system you are dual booting.

    互联网连接(用于下载 Ubuntu ISO 镜像和实时 USB 创建工具)。您可以在任何系统上执行此作,而不必在要进行双引导的系统上执行此作。

  • Optional: External USB disk for making back up of your existing data.

    可选:用于备份现有数据的外部 USB 磁盘。

  • Optional: Windows recovery or bootable disk (if you encounter any major boot issues, it could be fixed).

    可选:Windows 恢复或可启动磁盘(如果您遇到任何重大启动问题,可以修复)。

Let’s see the steps of installing Ubuntu alongside Windows 10. I have made a video of the entire process. You may watch that as well.

让我们看看将 Ubuntu 与 Windows 10 一起安装的步骤。我制作了整个过程的视频。你也可以看那个。

  • How to Dual Boot Ubuntu and Windows 10 - YouTube
    https://www.youtube.com/watch?v=u5QyjHIYwTQ

Step 1: Make a backup of your Windows system [optional]

第 1 步:备份您的 Windows 系统 [可选]

It is always nice to have a backup of your data, just in case you mess up with the system while dealing with disk partitions.

备份数据总是很好的,以防万一您在处理磁盘分区时弄乱了系统。

I advise copying all the essential data you cannot afford to lose on an external USB disk. You can use an external HDD (slower but cheaper) or SSD (faster but expensive) and copy the important files and folders.

我建议复制您无法承受丢失的所有重要数据在外部 USB 磁盘上。您可以使用外部 HDD(速度较慢但更便宜)或 SSD(更快但价格昂贵)并复制重要文件和文件夹。

Step 2: Download Ubuntu (or whichever Linux distribution you are using)

第 2 步:下载 Ubuntu(或您正在使用的任何 Linux 发行版)

Download Ubuntu Desktop
Head over to Ubuntu’s website and download the ISO file. The file should be around 2.5 GB in size. If you need to download Ubuntu via torrents., you can click the ‘alternative downloads.’

前往 Ubuntu 的网站并下载 ISO 文件。文件大小应约为 2.5 GB。如果您需要通过 torrent 下载 Ubuntu,您可以单击 “替代下载”。

  • Download Ubuntu ISO Image
    https://ubuntu.com/download/desktop

Step 3: Create a live USB/disk of Ubuntu

第 3 步:创建 Ubuntu 的实时 USB / 磁盘

I presume that you are using Windows to create the live USB. Several free applications allow you to create a live Ubuntu USB.. You can use any of these tools. Since I cannot show all of them, I’ll go with Rufus.

我假设您正在使用 Windows 创建实时 USB。几个免费的应用程序允许您创建实时 Ubuntu USB。您可以使用这些工具中的任何一个。既然我不能把它们都展示出来,我就选 Rufus 去。

Download Rufus for free from its website. It will download a .exe file.

从其网站免费下载 Rufus。它将下载一个 .exe 文件。

  • Download Rufus
    https://rufus.ie/

Plug in your USB. This device will be formatted so make sure you don’t have any important data on this USB disk.

插入您的 USB。此设备将被格式化,因此请确保您的 USB 磁盘上没有任何重要数据。

Run the Rufus tool you just downloaded. It automatically identifies the plugged-in USB but double-check it anyway. Now, browse to the location of the downloaded ISO image and ensure that it uses GPT partitioning scheme and UEFI target system.

运行您刚刚下载的 Rufus 工具。它会自动识别插入的 USB,但还是要仔细检查它。现在,浏览到下载的 ISO 映像的位置,并确保它使用 GPT 分区方案和 UEFI 目标系统。

Make Live Usb With Rufus
Hit the start button and wait for the process to complete. Your live Linux USB is ready.

点击开始按钮并等待该过程完成。您的实时 Linux USB 已准备就绪。

📋
Installing Ubuntu and creating the live Ubuntu USB process can be done on any computer. But the rest of the process takes on the system on which you are dual booting.
 
安装 Ubuntu 和创建随身 Ubuntu USB 进程可以在任何计算机上完成。但是这个过程的其余部分是在双引导的系统上进行的。

Step 4: Make some free space on your disk for Ubuntu installation

第 4 步:在磁盘上腾出一些可用空间用于 Ubuntu 安装

In many systems, while installing Ubuntu, it gives the option to make a disk partition for Ubuntu. However, that is not a surety. This is why making the required free space on the disk would be better before starting the installation procedure.

在许多系统中,在安装 Ubuntu 时,它提供了为 Ubuntu 创建磁盘分区的选项。然而,这并不能保证。这就是为什么在开始安装过程之前在磁盘上留出所需的可用空间会更好。

In the Windows menu, search for ‘disk partitions’ and go to ‘Create and format hard disk partitions.’

在 Windows 菜单中,搜索 “磁盘分区” 并转到 “创建和格式化硬盘分区”。

disc management windows
In the Disk Management tool, right-click on the drive which you want to partition and select shrink volume.

在磁盘管理工具中,右键单击要分区的驱动器,然后选择 shrink volume(压缩卷)。

If you have just one partition like this, you need to make some free space out of it for Linux. Use any of them except C drive if you have several partitions of considerable size because it may erase the data.

如果你只有一个这样的分区,你需要为它腾出一些空闲空间供 Linux 使用。如果您有多个相当大的分区,请使用除 C drive 之外的任何一个,因为它可能会删除数据。

The 256 GB in my system already had several partitions from the manufacturer but mainly for backup and other purposes. The primary partition was the C drive, around 220 GB, where Windows 10 is installed. In my case, I shrank the C drive to make some free space for Linux installation.

我系统中的 256 GB 已经有来自制造商的几个分区,但主要用于备份和其他目的。主分区是 C 盘,大约 220 GB,安装了 Windows 10。就我而言,我缩小了 C 盘,以便为 Linux 安装腾出一些可用空间。

making free space for dual boot
How much space do you need for Linux in dual boot?

双启动中的 Linux 需要多少空间?

This depends on how much total disk space you have. You may install Ubuntu on 15 or 20 GB but you’ll soon start running out of disk space. These days, you should have at least 120 GB of disk. In that case, go for 30-40 GB of disk for Linux. If you have 250 GB disk, allocate 60-80 GB or even more. If you have more disk space, allocate even more free space, if you want.

这取决于您拥有的总磁盘空间量。您可以在 15 GB 或 20 GB 上安装 Ubuntu,但您很快就会开始耗尽磁盘空间。如今,您应该至少有 120 GB 的磁盘。在这种情况下,请为 Linux 选择 30-40 GB 的磁盘。如果您有 250 GB 的磁盘,请分配 60-80 GB 甚至更多。如果有更多的磁盘空间,如果需要,可以分配更多的可用空间。

What if you have D, E or F drives?

如果您有 D、E 或 F 驱动器怎么办?

This is a common confusion for many people as they think Ubuntu can only be installed on the C drive. That’s not true. I had only one C drive, so I shrank it. If you have D, E or F drive, you may shrink one of those drives. You may also choose to delete the D, E or F drive. NEVER DELETE C DRIVE.

这是许多人常见的困惑,因为他们认为 Ubuntu 只能安装在 C 盘上。那不是真的。我只有一个 C 盘,所以我缩小了它。如果您有 D、E 或 F 驱动器,则可以缩小其中一个驱动器。您也可以选择删除 D、E 或 F 驱动器。切勿删除 C 盘。

Step 5: Boot from live Ubuntu USB

第 5 步:从实时 Ubuntu USB 启动

You created a live Ubuntu USB in step 3. Plug it into the system. Before you go and boot from the live USB, let’s have a quick word about the infamous secure boot.

您在第 3 步中创建了一个实时 Ubuntu USB。将其插入系统。在您开始从 live USB 启动之前,让我们简单介绍一下臭名昭著的安全启动。

Do I need to disable the secure boot for installing Linux?

安装 Linux 需要禁用安全启动吗?

6-8 years back, the UEFI secure boot was not well-supported by Linux; hence, you had to disable secure boot before installing Linux. Thankfully, Ubuntu and many other Linux distributions currently support secure boot very well. Usually, you should not need to do anything about it. However, if your system doesn’t allow booting from live USB or if you see any other related issue, you may disable the secure boot on Windows..

6-8 年前,Linux 并没有很好地支持 UEFI 安全启动;因此,您必须在安装 Linux 之前禁用安全启动。值得庆幸的是,Ubuntu 和许多其他 Linux 发行版目前都很好地支持安全启动。通常,您不需要对此执行任何作。但是,如果您的系统不允许从 live USB 启动,或者您看到任何其他相关问题,您可以在 Windows 上禁用安全启动。

Alright! Let’s see how to boot from the USB. You can go to the boot settings by pressing F2/F10 or F12 at the system start time and selecting to boot from the USB. However, some people find it difficult.

好!让我们看看如何从 USB 启动。您可以通过在系统启动时按 F2/F10 或 F12 并选择从 USB 启动来进入启动设置。然而,有些人觉得这很困难。

The longer but an easier step is to access the UEFI boot settings from within Windows.. In the Windows menu, search for UEFI and then click on ‘Change advanced startup options’:

较长但更简单的步骤是从 Windows 中访问 UEFI 启动设置。在 Windows 菜单中,搜索 UEFI,然后单击 “更改高级启动选项”:

Accessing Uefi Settings Windows
Go to the *Advanced startup* option and click on *Restart now* button.

转到高级启动选项,然后单击立即重新启动按钮。

Access Uefi Settings Windows
On the next screen, click on ‘Use a device’:

在下一个屏幕上,单击 “使用设备”:

Access UEFI Settings in Windows
Recognize the USB disk with its name and size. It *may also be displayed as EFI USB Device*.

识别 USB 磁盘及其名称和大小。它也可能显示为 EFI USB 设备。

Access UEFI Settings Windows
Now it will power off your system and reboot into the disk you chose which should be the live USB disk. You should see a screen like this after a few seconds:

现在它将关闭您的系统并重新启动到您选择的磁盘,该磁盘应该是实时 USB 磁盘。几秒钟后,您应该会看到如下屏幕:

Ubuntu Live Install Screen
The ‘Try Ubuntu without installing’ option allows you to experience Ubuntu from the live disk. The option to install Ubuntu can be found on the desktop.

“在不安装的情况下试用 Ubuntu” 选项允许您从实时磁盘体验 Ubuntu。安装 Ubuntu 的选项可以在桌面上找到。

The “Install Ubuntu” option will start the Ubuntu installation immediately.

“安装 Ubuntu” 选项将立即开始 Ubuntu 安装。

You can opt for either option based on your preference.

您可以根据自己的喜好选择任一选项。

Step 6: Installing Ubuntu along with Windows 10

第 6 步:将 Ubuntu 与 Windows 10 一起安装

Start the installation procedure. The first few steps are simple. You choose the language and keyboard layout.

开始安装过程。前几个步骤很简单。您可以选择语言和键盘布局。

Install Ubuntu 2

On the next screen, choose Normal installation. No need to download updates or install third-party software just yet. You may do it after the installation completes.

在下一个屏幕上,选择 Normal installation (正常安装)。目前无需下载更新或安装第三方软件。您可以在安装完成后执行此作。

Hit continue. It may take some time to go to the next step.

点击继续。可能需要一些时间才能进行下一步。

Installing Ubuntu in dual boot
Note: Some people try to download updates and install media codes while installing. In my experience, it sometimes creates issues during installation and may also cause the installation to fail. For this reason, I advise against them.

注意:有些人在安装时尝试下载更新并安装媒体代码。根据我的经验,它有时会在安装过程中产生问题,也可能导致安装失败。因此,我建议不要使用它们。

Important: Installation takes two approaches based on what you see on the next screen

重要说明:根据您在下一个屏幕上看到的内容,安装采用两种方法

Since this is a detailed tutorial, I’ll cover both aspects.

由于这是一个详细的教程,我将涵盖这两个方面。

Approach 1: You see the “Install Ubuntu alongside Windows Boot Manager”

方法 1:您会看到 “将 Ubuntu 与 Windows Boot Manager 一起安装 Ubuntu”

If you see the “Install Ubuntu alongside Windows Boot Manager” on the Installation type screen, you are in luck. You can select this method and hit continue.

如果您在安装类型屏幕上看到 “将 Ubuntu 与 Windows Boot Manager 一起安装 Ubuntu”,那么您很幸运。您可以选择此方法并点击 继续.

![Ubuntu Installation Type](https://i-blog.csdnimg.cn/img_convert/3f7ad0e82cb3ab77a8fe56561596cf83.png =900x
If you see the “Install Ubuntu alongside Windows Boot Manager”, choose it

The next screen will give you the option to create a partition for Ubuntu by dragging the divider. You can allocate appropriate disk space to Linux here. Ubuntu will create one partition of the allocated disk space and it will have root with home and a swapfile. of 2 GB in size under root itself.

下一个屏幕将为您提供通过拖动分隔线为 Ubuntu 创建分区的选项。您可以在此处为 Linux 分配适当的磁盘空间。Ubuntu 将创建一个已分配磁盘空间的分区,它将具有 root 和 home 以及 root 本身下大小为 2 GB 的交换文件。

disk partition dual boot ubuntu windowsApproach 2: You don’t see ‘Install Ubuntu alongside Windows Boot Manager’ option or it is greyed out

方法 2:您没有看到 “将 Ubuntu 与 Windows Boot Manager 一起安装 Ubuntu” 选项或显示为灰色

But if you are one of the unlucky ones who don’t see this option, no need to worry. Things are not that bad for you. You can still install Ubuntu with Windows.

但是,如果您是没有看到此选项的不幸者之一,则无需担心。事情对你来说并没有那么糟糕。您仍然可以在 Windows 上安装 Ubuntu。

On the Installation type screen, go with Something Else.

在 Installation type (安装类型) 屏幕上,选择 Something Other (其他内容)。

Install Ubuntu Something Else

It will take you to the partitioning screen. Remember you had created some free space beforehand?

它将带您进入分区屏幕。还记得您之前创建了一些空闲空间吗?

You may allocate the entire free space to root (swapfile and home will be created automatically under root) or separate root, swap and home partitioning. Both methods are acceptable.

您可以将整个空闲空间分配给 root (swapfile 和 home 将在 root 下自动创建)或单独的 root、swap 和 home 分区。两种方法都是可以接受的。

I show the steps for creating root, swap and home partitions separately. But feel free to use a single partition for all of them.

我将分别展示创建 root、swap 和 home 分区的步骤。但是请随意为所有这些 API 使用单个分区。

Select the free space and click on the + sign.

选择可用空间,然后单击 + 号。

partition on Ubuntu Windows 8 dual boot
It will provide you with the option to create a Linux partition. You are creating the Root partition. Anything above 25 GB is more than sufficient for it. Choose the size, select Ext 4 as the file type and / (means root) as the mount point.

它将为您提供创建 Linux 分区的选项。您正在创建 Root 分区。任何超过 25 GB 的东西都绰绰有余。选择大小,选择 Ext 4 作为文件类型,选择 /(表示 root)作为挂载点。

Installing_Windows8_Ubuntu_3
Clicking on OK in the previous step will bring you to the partition screen. Next, create a swap. Like previously, click on the + sign again. This time, use the file type as the Swap area.

单击上一步中的 OK 将带您进入分区屏幕。接下来,创建一个交换点。和以前一样,再次单击 + 号。这一次,使用文件类型作为 Swap 区域。

Ideal swap size in Linux. is debatable. If you have 2 GB or less RAM, use swap double the size of RAM. If you have 3-6 GB of RAM, use a swap of the same size as RAM. If you have 8 GB or more RAM, you may use swap half the size of RAM (unless you have plenty of disk space, and you want to use hibernation and in that case, use a swap of at least the same size as RAM).

Linux 中理想的交换大小是有争议的。如果您的 RAM 为 2 GB 或更少,请使用 ram 大小的两倍的 swap。如果您有 3-6 GB 的 RAM,请使用与 RAM 大小相同的交换空间。如果您有 8 GB 或更多的 RAM,则可以使用 RAM 一半大小的交换空间(除非您有足够的磁盘空间,并且您想使用休眠,在这种情况下,请使用至少与 RAM 大小相同的交换空间)。

If you feel like you have less swap on your system, don’t worry. You can easily create swapfile and add more swap space to your systems[].(https://itsfoss.com/create-swap-file-linux/).

如果您觉得系统上的交换空间较少,请不要担心。您可以轻松创建交换文件并向系统添加更多交换空间。

Installing_Windows8_Ubuntu_4
Similarly, create a Home partition. Allocate it maximum space (in fact allocate it the rest of the free space) because this is where you’ll save music, pictures and downloaded files.

同样,创建一个 Home 分区。为它分配最大的空间(实际上为它分配剩余的可用空间),因为这是您保存音乐、图片和下载文件的地方。

Installing_Windows8_Ubuntu_5
Once you are ready with Root, Swap and Home, click on Install Now:

准备好 Root、Swap 和 Home 后,单击立即安装:

Installing_Windows8_Ubuntu_6
Well, you have almost won the battle. You can smell victory now. Select a timezone when asked.

好吧,你几乎赢得了这场战斗。你现在可以闻到胜利的味道了。在询问时选择时区。

Installing Ubuntu Timezone Selection
Next, you’ll be asked to enter a username, hostname (computer’s name) and password.

接下来,系统会要求您输入用户名、主机名(计算机名称)和密码。

Installing Ubuntu Account Setup

Now it’s just a matter of waiting. It should take 8-10 minutes to complete the installation.

现在只是等待的问题。完成安装需要 8-10 分钟。

Installing Ubuntu
Once the installation finishes, restart the system.

安装完成后,重新启动系统。

Restart After Installing Ubuntu
Restart after installation completes

You’ll be asked to remove the USB disk. You can remove the disk at this stage without worrying. The system reboots after this.

系统将要求您移除 USB 磁盘。您可以在此阶段删除磁盘,而无需担心。在此之后,系统将重新启动。

Ubuntu Finished Installation

Remove USB and press enter

💡

You do not need the live USB disk to use Linux anymore. You have installed Ubuntu on your computer’s disk. Remove the USB and keep it for later if you want to use it for installing Linux on some other system. You may also format and use it for regular data storage or transfer.

If everything goes smoothly, you should see the grub screen once the system powers on. Here, you can choose Ubuntu to boot into Ubuntu and Windows boot manager to boot into Windows. Pretty cool, right?

如果一切顺利,您应该会在系统开机后看到 grub 屏幕。在这里,您可以选择 Ubuntu 启动到 Ubuntu 和 Windows 启动管理器启动到 Windows。很酷,对吧?

Dual Boot Grub Screen

You can choose the operating system from the grub screen

Dual boot did not succeed? Here are some troubleshooting tips

双启动未成功?以下是一些故障排除提示

Life is not even for everyone. For some, the dual boot might not succeed just yet. However, instead of giving up, you may follow a couple of tips and retry the installation procedure.

生活并不适合所有人。对于某些人来说,双启动可能还没有成功。但是,与其放弃,不如按照一些提示重新尝试安装程序。

Try changing the USB port

尝试更改 USB 端口

This may sound ridiculous but sometimes some USB ports cause issue with booting the USB or installing Linux. Changing the USB port could be a trick.

这听起来可能很荒谬,但有时某些 USB 端口会导致启动 USB 或安装 Linux 时出现问题。更改 USB 端口可能是一个技巧。

Try not using internet while installing Linux

安装 Linux 时尽量不要使用 Internet

I have experienced that sometimes Linux installation throws error if it is connected to the internet. If you encountered a “‘grub-efi-amd64-signed’ package failed to install into /target” error, please try installing Ubuntu without internet.

我经历过,如果 Linux 安装连接到 Internet,有时它会引发错误。如果您遇到 “‘grub-efi-amd64-signed’ 包无法安装到 /target” 错误,请尝试在没有 Internet 的情况下安装 Ubuntu。

Disable secure boot and/or fast boot

禁用安全启动和 / 或快速启动

In some rare cases, secure boot would not allow you to boot from live USB or install Linux. Disable secure boot.. You may also disable fast boot in some cases.

在极少数情况下,安全启动不允许你从 live USB 启动或安装 Linux。禁用安全启动。在某些情况下,您也可以禁用快速启动。

Dual boot finished but you don’t see the grub screen to boot into Ubuntu

双启动已完成,但您没有看到启动到 Ubuntu 的 grub 屏幕

Please check your boot order in the UEFI settings. Do you see Ubuntu/UEFI below Windows Boot Manager? If yes, move it up the order. If you don’t see grub at all, you may carefully try this. or this tutorial..

请在 UEFI 设置中检查您的启动顺序。您是否在 Windows 启动管理器下方看到 Ubuntu/UEFI?如果是,请将其向上移动。如果您根本没有看到 grub,您可以仔细尝试这个或这个教程。

Grub rescue error or no bootable device found after dual booting

双引导后出现 Grub 救援错误或未找到可引导设备

Use this tutorial for no bootable device found error.. And this one is for grub rescue error..

使用本教程解决 No bootable device found 错误。这个是针对 grub rescue 错误的。

Additional Tips: You’ll notice that there is a time difference between Windows and Ubuntu You can fix the time gap issue in dual boot easily.. Also, in the grub screen, Ubuntu is up the priority. You can also change the boot order to make Windows default. if you are going to use Windows more often than Linux. If you want to reverse the process, follow this guide to remove Ubuntu from dual boot with Windows..

其他提示: 您会注意到 Windows 和 Ubuntu 之间存在时差您可以轻松修复双启动中的时间间隔问题。此外,在 grub 屏幕中,Ubuntu 是优先级。如果您打算更频繁地使用 Windows,则还可以更改引导顺序以将 Windows 设为默认 Windows。如果您想反转该过程,请按照本指南从 Windows 的双启动中删除 Ubuntu。


How to Disable UEFI Secure Boot to Dual Boot Any System

如何禁用 UEFI 安全引导以双重引导任何系统

By Gavin Phillips
Published Jul 19, 2019

disable-uefi-ddual-boot

Have you ever tried to install a second operating system alongside Windows? Depending on the OS, you might have encountered the UEFI Secure Boot feature.

您是否曾经尝试过在 Windows 旁边安装第二个作系统?根据作系统,您可能遇到了 UEFI 安全启动功能。

If Secure Boot doesn’t recognize the code you’re trying to install, it will stop you. Secure Boot is handy for preventing malicious code running on your system. But it also stops you booting some legitimate operating systems, like Kali Linux, Android x86, or TAILS.

如果 Secure Boot 无法识别您尝试安装的代码,它将停止您。安全启动对于防止恶意代码在您的系统上运行非常方便。但它也会阻止您启动某些合法的作系统,例如 Kali Linux、Android x86 或 TAILS。

But there is a way around it. This short guide will show you how to disable UEFI Secure Boot to let you dual boot any operating system you like.

但有办法解决这个问题。这个简短的指南将向您展示如何禁用 UEFI 安全启动,让您双启动您喜欢的任何作系统。

What Is UEFI Secure Boot?

什么是 UEFI 安全启动?

Let’s take a second to consider precisely how Secure Boot keeps your system safe.

让我们花点时间仔细考虑一下 Secure Boot 如何确保您的系统安全。

Secure Boot is a feature of the Unified Extensible Firmware Interface (UEFI). UEFI itself is the replacement for the BIOS interface. found on many devices. UEFI is a more advanced firmware interface with many more customization and technical options.

安全启动是统一可扩展固件接口 (UEFI) 的一项功能。UEFI 本身是许多设备上 BIOS 界面的替代品。UEFI 是一个更高级的固件接口,具有更多的自定义和技术选项。

Computer Security, UEFI, BIOS, Dual Boot

Secure Boot is something of a security gate. It analyzes code before you execute it on your system. If the code has a valid digital signature, Secure Boot lets it through the gate. If the code has an unrecognized digital signature, Secure Boot blocks it from running, and the system will require a restart.

安全启动在某种程度上是一个安全门。它会先分析代码,然后再在系统上执行代码。如果代码具有有效的数字签名,则安全启动会允许它通过入口。如果代码具有无法识别的数字签名,则安全启动会阻止它运行,并且系统将需要重新启动。

At times, code that you know is safe, and comes from a reliable source, might not have a digital signature in the Secure Boot database.

有时,您知道是安全的并且来自可靠来源的代码可能在安全启动数据库中没有数字签名。

For example, you can download numerous Linux distributions directly from their developer site, even verifying the distribution checksum to check for tampering. But even with that confirmation, Secure Boot will still reject some operating systems and other types of code (such as drivers and hardware).

例如,您可以直接从他们的开发人员站点下载大量 Linux 发行版,甚至可以验证发行版校验和以检查是否被篡改。但即使进行了确认,安全启动仍会拒绝某些作系统和其他类型的代码(例如驱动程序和硬件)。

How to Disable Secure

Boot 如何禁用安全启动

Now, I don’t advise disabling Secure Boot lightly. It really does keep you safe (check out the Secure Boot vs. NotPetya Ransomware video below, for example), especially from some of the nastier malware variants like rootkits and bootkits (others would contend it was the security measure to stop Windows pirating). That said, sometimes it gets in the way.

现在,我不建议轻易禁用安全启动。它确实可以保证您的安全(例如,查看下面的 Secure Boot vs. NotPetya Ransomware 视频),尤其是来自一些更令人讨厌的恶意软件变体,如 rootkit 和 bootkit(其他人会争辩说这是阻止 Windows 盗版的安全措施)。也就是说,有时它会妨碍你。

Please note that turning Secure Boot back on may require a BIOS reset. This does not cause your system to lose any data. It does, however, remove any custom BIOS settings. Moreover, there are some examples where users are permanently no longer able to turn on Secure Boot, so please bear that in mind.

请注意,重新打开安全启动可能需要重置 BIOS。这不会导致您的系统丢失任何数据。但是,它确实会删除任何自定义 BIOS 设置。此外,在一些示例中,用户永久无法再打开安全启动,因此请记住这一点。

Okay, here’s what you do:

好的,这是你要做的:

  1. Turn your computer off. Then, turn it back on and press the BIOS entry key during the boot process. This varies between hardware types., but is generally F1, F2, F12, Esc, or Del; Windows users can hold Shift while selecting Restart to enter the Advanced Boot Menu. Then select Troubleshoot > Advanced Options: UEFI Firmware Settings.

    关闭计算机。然后,在启动过程中重新打开并按 BIOS 输入键。这因硬件类型而异,但通常是 F1、F2、F12、Esc 或 Del;Windows 用户可以在按住 Shift 的同时选择 Restart 进入 Advanced Boot Menu。然后选择 > 高级选项疑难解答:UEFI 固件设置。

  2. Find the Secure Boot option. If possible, set it to Disabled. It is usually found in the Security tab, Boot tab, or Authentication tab.

    找到 Secure Boot 选项。如果可能,请将其设置为 Disabled。它通常位于 Security (安全) 选项卡、Boot (启动) 选项卡或 Authentication (身份验证) 选项卡中。

  3. Save and Exit. Your system will reboot.

    保存并退出。您的系统将重新启动。

You have successfully disabled Secure Boot. Feel free you grab your nearest previously unbootable USB drive and finally explore the operating system. Our list of the best Linux distributions is a great place to start.!

您已成功禁用安全启动。随意拿起离您最近的以前无法启动的 USB 驱动器,最后探索作系统。我们的最佳 Linux 发行版列表是一个很好的起点!

How to Re-Enable Secure Boot

如何重新启用安全启动

Of course, you might want to turn Secure Boot back on. After all, it does help protect against malware and other unauthorized code.. If you directly install an unsigned operating system, you’ll need to remove all traces before attempting to turn Secure Boot back on. Otherwise, the process will fail.

当然,您可能希望重新打开安全启动。毕竟,它确实有助于防止恶意软件和其他未经授权的代码。如果直接安装未签名的作系统,则需要在尝试重新打开安全启动之前删除所有跟踪。否则,该过程将失败。

  1. Uninstall any unsigned operating systems or hardware installed when Secure Boot was disabled.

    卸载禁用安全引导时安装的任何未签名的作系统或硬件。

  2. Turn your computer off. Then, turn it back on and press the BIOS entry key during the boot process, as above.

    关闭计算机。然后,在启动过程中重新打开并按下 BIOS 输入键,如上所述。

  3. Find the Secure Boot option and set it to Enabled.

    找到 Secure Boot 选项并将其设置为 Enabled。

  4. If Secure Boot doesn’t enable, try to Reset your BIOS to factory settings. Once you restore factory settings, attempt to enable Secure Boot again.

    如果安全启动未启用,请尝试将 BIOS 重置为出厂设置。恢复出厂设置后,尝试再次启用安全启动。

  5. Save and Exit. Your system will reboot.

    保存并退出。您的系统将重新启动。

  6. In the event the system fails to boot, disable Secure Boot again.

    如果系统无法引导,请再次禁用安全引导。

Troubleshooting Secure Boot Enable Failure

安全启动启用失败疑难解答

There are a few small fixes we can try to get your system booting with Secure Boot enabled.

我们可以尝试一些小修复程序,让您的系统在启用安全启动的情况下启动。

  • Make sure to turn UEFI settings on in the BIOS menu; this also means making sure Legacy Boot Mode and equivalents are off.

    确保在 BIOS 菜单中打开 UEFI 设置;这也意味着确保 Legacy Boot Mode 和等效项处于关闭状态。

  • Check your drive partition type.. UEFI requires GPT partition style, rather than the MBR used by Legacy BIOS setups. To do this, type Computer Management in your Windows Start menu search bar and select the best match. Select Disk Management from the menu. Now, find your primary drive, right-click, and select Properties. Now, select the Volume. Your partition style is listed here. (If you need to switch from MBR to GPT there is only one option to change the partition style: back up your data and wipe the drive.)

    检查您的驱动器分区类型。UEFI 需要 GPT 分区样式,而不是传统 BIOS 设置使用的 MBR。为此,请在 Windows 开始菜单搜索栏中键入 Computer Management,然后选择最佳匹配项。从菜单中选择 Disk Management。现在,找到您的主驱动器,右键单击并选择 租房.现在,选择 卷.您的分区样式在此处列出。(如果您需要从 MBR 切换到 GPT,只有一个选项可以更改分区样式:备份数据并擦除驱动器。

  • Some firmware managers have the option to Restore Factory Keys, usually found in the same tab as the other Secure Boot options. If you have this option, restore the Secure Boot factory keys. Then Save and Exit, and reboot.

    某些固件管理器具有 Restore Factory Keys 选项,通常与其他安全启动选项位于同一选项卡中。如果有此选项,请恢复 Secure Boot 出厂密钥。然后 Save and Exit (保存并退出),然后重新启动。

Computer Security, UEFI, BIOS, Dual Boot

Trusted Boot

可信启动

Trusted Boot picks up where Secure Boot stops, but really only applies to the Windows 10 digital signature. Once UEFI Secure Boot passes the baton, Trusted Boot verifies every other aspect of Windows., including drivers, startup files, and more.

受信任的启动从安全启动停止的位置选取,但实际上仅适用于 Windows 10 数字签名。UEFI 安全启动传递接力棒后,受信任的启动将验证 Windows 的所有其他方面,包括驱动程序、启动文件等。

Much like Secure Boot, if Trusted Boot finds a corrupted or malicious component, it refuses to load. However, unlike Secure Boot, Trusted Boot can at times automatically repair the issue at hand, depending on the severity. The below image explains a little more about where Secure Boot and Trusted Boot fit together in the Windows boot process.

与安全启动非常相似,如果 Trusted Boot 发现损坏或恶意的组件,它会拒绝加载。但是,与安全启动不同的是,可信启动有时可以根据严重性自动修复手头的问题。下图详细介绍了安全启动和受信任启动在 Windows 启动过程中的匹配位置。

Computer Security, UEFI, BIOS, Dual Boot

Should You Turn Off Secure Boot?

您应该关闭安全启动吗?

Disabling Secure Boot is somewhat risky. Depending on who you ask, you’re potentially putting your system security at risk.

禁用安全启动在一定程度上存在风险。根据您询问的对象,您可能会将系统安全置于风险之中。

Secure Boot is arguably more useful than ever at the current time. Bootloader attacking ransomware is very real. Rootkits and other particularly nasty malware variants are also out in the wild. Secure Boot provides UEFI systems. with an extra level of system validation to give you peace of mind.

安全启动可以说目前比以往任何时候都更有用。攻击勒索软件的 Bootloader 非常真实。Rootkit 和其他特别令人讨厌的恶意软件变体也已广泛存在。安全启动为 UEFI 系统提供了额外的系统验证级别,让您高枕无忧。


Fix “No Bootable Device Found” Error After Installing Ubuntu Linux

修复安装 Ubuntu Linux 后出现的 “未找到可启动设备” 错误

Did you install Linux afresh or perhaps dual booted it? And now your system shows ‘no bootable device’ error while booting? Here’s what you could do to fix the issue.

Abhishek Prakash
24 Jan 2023

Usually, I dual boot Ubuntu and Windows. but this time I decided to go for a clean Ubuntu installation., i.e., eliminating Windows completely.

通常,我会双启动 Ubuntu 和 Windows,但这次我决定进行全新的 Ubuntu 安装,即完全消除 Windows。

After the clean install of Ubuntu, I ended up with a screen saying no bootable device found instead of the Grub screen. Clearly, the installation messed up with the UEFI boot settings.

全新安装 Ubuntu 后,我最终看到一个屏幕,显示未找到可启动设备,而不是 Grub 屏幕。显然,安装搞乱了 UEFI 引导设置。

My laptop screen looked like this:

我的笔记本电脑屏幕看起来像这样:

No Bootable Device Found After Installing Ubuntu
I am going to show you how I fixed no bootable device found error after installing Ubuntu in Acer laptops. It is important that I mention that I am using Acer Aspire R13 because we have to change things in firmware settings and those settings might look different from manufacturer to manufacturer and from device to device.

我将向您展示如何在 Acer 笔记本电脑中安装 Ubuntu 后修复未找到可启动设备错误。重要的是要提到我正在使用 Acer Aspire R13,因为我们必须更改固件设置中的内容,并且这些设置可能因制造商和设备而异。

So before you go on trying the steps mentioned here, let’s first see what state my computer was in during this error:

因此,在您继续尝试此处提到的步骤之前,让我们先看看我的计算机在此错误期间处于什么状态:

  • My Acer Aspire R13 came preinstalled with Windows and with UEFI boot manager

    我的 Acer Aspire R13 预装了 Windows 和 UEFI 启动管理器

  • Secure boot was not turned off (my laptop has just come from repair and the service guy had put the secure boot on again, I did not know until I ran up in the problem). You can read this post to know how to disable secure boot in Acer laptops.

    安全启动没有关闭(我的笔记本电脑刚刚修好,维修人员又打开了安全启动,直到我遇到问题才知道)。您可以阅读这篇文章以了解如何在 Acer 笔记本电脑中禁用安全启动

  • I chose to install Ubuntu by erasing everything i.e. existing Windows, various partitions etc.

    我选择通过擦除所有内容(即现有 Windows、各种分区等)来安装 Ubuntu。

  • After installing Ubuntu, I saw no bootable device found error while booting from the hard disk. Booting from live USB worked just fine

    安装 Ubuntu 后,我在从硬盘启动时看到 No bootable device found 错误。从 live USB 启动工作正常

In my opinion, not disabling the secure boot was the reason of this error. However, I have no data to backup my claim. It is just a hunch. Interestingly, dual booting Windows and Linux often ends up in common Grub issues like these two:

在我看来,不禁用安全启动是导致此错误的原因。但是,我没有数据来支持我的索赔。这只是一种直觉。有趣的是,双启动 Windows 和 Linux 通常会导致常见的 Grub 问题,例如以下两个:

  • error: no such partition grub rescue.
    错误:没有这样的分区 grub rescue

  • Minimal BASH like line editing is supported.
    支持最小 BASH 类行编辑

If you are in a similar situation, you can try the fix which worked for me.

如果您遇到类似的情况,您可以尝试对我有效的修复程序。

Fix no bootable device found error after installing Ubuntu

修复安装 Ubuntu 后未找到可启动设备错误

Pardon me for poor quality images. My OnePlus camera seems to be not very happy with my laptop screen.

请原谅我图像质量差。我的 OnePlus 相机似乎对我的笔记本电脑屏幕不太满意。

Step 1

Turn the power off and boot into boot settings. I had to press Fn+F2 (to press F2 key) on Acer Aspire R13 quickly. You have to be very quick with it if you are using SSD hard disk because SSDs are very fast in booting. Depending upon your manufacturer/model, you might need to use Del or F10 or F12 keys.

关闭电源并启动进入启动设置。我不得不在 Acer Aspire R2 上快速按 Fn+F2(按 F13 键)。如果您使用的是 SSD 硬盘,则必须非常快速地使用它,因为 SSD 的启动速度非常快。根据您的制造商 / 型号,您可能需要使用 Del 或 F10 或 F12 键。

Step 2

In the boot settings, make sure that Secure Boot is turned on. It should be under the Boot tab.

在引导设置中,确保 Secure Boot 已打开。它应该在 Boot 选项卡下。

Step 3

Go to Security tab and look for “Select an UEFI file as trusted for executing” and click enter.

转到 Security(安全)选项卡并查找 “Select an UEFI file as trusted for executing(选择受信任的 UEFI 文件执行)”,然后单击 Enter。

Fix no bootable device found
Just for your information, what we are going to do here is to add the UEFI settings file (it was generated while Ubuntu installation) among the trusted UEFI boots in your device. If you remember, UEFI boot’s main aim is to provide security and since Secure Boot was not disabled (perhaps) the device did not intend to boot from the newly installed OS. Adding it as trusted, kind of whitelisting, will let the device boot from the Ubuntu UEFI file.

仅供参考,我们在这里要做的是将 UEFI 设置文件(它是在 Ubuntu 安装时生成的)添加到您设备中受信任的 UEFI 启动中。如果您还记得,UEFI 启动的主要目的是提供安全性,并且由于安全启动未被禁用(可能),因此设备并不打算从新安装的作系统启动。将其添加为受信任的白名单,将允许设备从 Ubuntu UEFI 文件启动。

💡

Cannot select UEFI file? On Acer devices, you have to set a supervisor password first before it shows the option to select a UEFI file or disable secure boot. You must remember or keep this password safe because if you forget it, you won’t be able to make changes to your BIOS setting ever.

Step 4

You should see your hard disk like HDD0 etc here. If you have more than one hard disk, I hope you remember where did you install Ubuntu. Press Enter here as well.

您应该在此处看到您的硬盘,如 HDD0 等。如果你有多个硬盘,我希望你还记得你在哪里安装了 Ubuntu。在此处也按 Enter。

Fix no bootable device found in boot settings

Step 5

You should see here. Press enter.

你应该在这里看到 < EFI>。按 Enter。

Fix settings in UEFI

Step 6

You’ll see in next screen. Don’t get impatient, you are almost there 😃

您将在 < Ubuntu > 下一个屏幕中看到。不要急躁,你快到了:)

Fixing boot error after installing Ubuntu

Step 7

Fix no bootable device found
You’ll see shimx64.efi, grubx64.efi and MokManager.efi file here. The important one is shimx64.efi here. Select it and click enter.

您将在此处看到 shimx64.efi、grubx64.efi 和 MokManager.efi 文件。重要的是这里的 shimx64.efi。选择它并单击 Enter。

In next screen, type Yes and click enter.

在下一个屏幕中,键入 Yes 并单击 Enter。

No_Bootable_Device_Found_7

Step 8

Once we have added it as trused EFI file to be executed, press F10 to save and exit.

将其添加为要执行的 trused EFI 文件后,按 F10 保存并退出。

Save and exist firmware settings

Reboot your system and this time you should be seeing the familiar Grub screen. Even if you do not see Grub screen, you should at least not be seeing “no bootable device found” screen anymore. You should be able to boot into Ubuntu.

重新启动系统,这次您应该会看到熟悉的 Grub 屏幕。即使您没有看到 Grub 屏幕,您至少应该不会再看到 “no bootable device found” 屏幕。您应该能够启动到 Ubuntu。

If your Grub screen was messed up after the fix but you got to login into it, you can reinstall Grub to boot into the familiar purple Grub screen of Ubuntu.

如果您的 Grub 屏幕在修复后搞砸了,但您可以登录它,您可以重新安装 Grub 以启动到熟悉的 Ubuntu 紫色 Grub 屏幕。


How to Solve: error: no such partition grub rescue in Ubuntu Linux

解决方法:错误:Ubuntu Linux 中没有这样的分区 grub rescue

Abhishek Prakash
02 Sep 2023

The other day I was trying to extend my root partition of Ubuntu which I dual boot with Windows. The partition extension was successful except that I screwed up the Grub configuration. When I booted in my laptop after the partition changes, I was welcomed by the Death Screen of Linux saying:

前几天我试图扩展我的 Ubuntu 根分区,我用 Windows 双启动它。分区扩展很成功,只是我搞砸了 Grub 配置。当我在分区更改后启动笔记本电脑时,Linux 的死屏欢迎我说:

error: no such partition grub rescue

错误:没有这样的分区 Grub 救援

After googling a bit, I found this mega thread on Ubuntu forum. that helped me. But since it is a very complicated thread, I have re-written the tutorial so that one can follow it easily. So there are some assumption and some requirements to fix the error: no such partition grub rescue problem.

在谷歌上搜索了一会儿后,我在 Ubuntu 论坛上找到了这个对我有帮助的大型线程。但是由于这是一个非常复杂的线程,因此我重新编写了本教程,以便可以轻松理解它。所以有一些假设和一些要求来修复错误:没有这样的分区 grub rescue 问题。

Requirements and presumptions:

要求和假设:

  • You must have a live CD/DVD/USB of the same version of OS

    您必须拥有相同作系统版本的 live CD/DVD/USB

  • You must have internet connection

    您必须有互联网连接

  • You are dual booting Windows with Ubuntu (no Wubi installation)

    您正在使用 Ubuntu 双启动 Windows(未安装 Wubi)

  • You do not have a separate /boot partition

    您没有单独的 /boot 分区

Now let’s see how can you rescue the grub here.

现在让我们看看如何拯救这里的蛴螬。

🚧

This element indicates a warning or caution.

How To Fix: error: no such partition grub rescue

修复方法:error: no such partition grub rescue

You’ll be using chroot to rescue grub. The whole concept is that since grub configuration files have been deleted or corrupted, it need to be re-installed. And using the live CD of the exact OS version, we can install the grub configuration again. It will delete all the changes (if any) you have made to the grub.

您将使用 chroot 来拯救 grub。整个概念是,由于 grub 配置文件已被删除或损坏,因此需要重新安装它。使用确切 OS 版本的 live CD,我们可以再次安装 grub 配置。它将删除您对 grub 所做的所有更改(如果有)。

Please follow these steps to easily fix grub rescue problem in Ubuntu (or other Linux distributions):

请按照以下步骤轻松修复 Ubuntu(或其他 Linux 发行版)中的 grub rescue 问题:

Step 1: Know you root partition

第 1 步:了解你的根分区

Boot from live CD, DVD or USB drive. Try Ubuntu from live disk. Open a terminal (Ctrl+Alt+T) and use the following command:

从 live CD、DVD 或 USB 驱动器启动。从实时磁盘试用 Ubuntu。打开终端 (Ctrl+Alt+T) 并使用以下命令:

sudo su

fdisk -l

Here, you will see the drive name and partition number. It should look like sdXY. Where X is the drive letter and Y is the partition number. Usually it should be like sdaY. You have to recognize the partition where root has been installed.

在这里,您将看到驱动器名称和分区号。它应该看起来像 sdXY。其中 X 是驱动器号,Y 是分区号。通常它应该类似于 sdaY。 您必须识别已安装 root 的分区。

Step 2: Mount the root partition

第 2 步:挂载根分区

Once we have got the partition where root has been installed, we’ll mount the root partition where Ubuntu has been installed. Use the following commands to mount it:

一旦我们获得了安装了 root 的分区,我们将挂载安装了 Ubuntu 的 root 分区。使用以下命令挂载它:

sudo mkdir /mnt/temp

sudo mount /dev/sdXY/mnt/temp

Replace XY with appropriate values.

将 XY 替换为适当的值。

Step 3: Be the CHROOT

第 3 步:成为 CHROOT

Once we have the partition mounted, next step is to mount certain items in preparation of the chroot. Run the following commands one by one:

挂载分区后,下一步是挂载某些项目以准备 chroot。逐个运行以下命令:

for i in /dev/dev/pts/proc /sys; do sudo mount -B i / m n t / t e m p i /mnt/temp i/mnt/tempi; done

sudo cp /etc/resolv.conf/mnt/temp/etc/resolv.conf

sudo chroot /mnt/temp

If the above commands ran successfully, you’ll see root@ubuntu:/# in the terminal indicating that you are in chroot mode.

如果上述命令成功运行,您将在终端中看到 root@ubuntu:/#,表明您处于 chroot 模式。

Step 4: Purge Grub 2 packages

第 4 步:清除 Grub 2 软件包

Now when we are in chroot environment (you can think of it as if we are behaving as root for the mounted partition)., time to get rid of the Grub 2 packages but before that lets update the repository.

现在,当我们处于 chroot 环境中时(你可以把它看作是作为挂载分区的 root 用户).,是时候删除 Grub 2 包了,但在此之前让我们更新仓库。

apt-get update
apt-get purge grub grub-pc grub-common

While removing the grub, you’ll see a strange screen asking if you want to remove Grub 2 packages. Press TAB to select Yes. It will be highlighted once selected. Press enter to proceed.

在删除 grub 时,你会看到一个奇怪的屏幕,询问你是否要删除 Grub 2 包。按 Tab 键选择 Yes(是)。选择后,它将突出显示。按 enter 键继续。

Solving Error no such partition grub rescue in Ubuntu

Step 5: Re-install Grub packages

第 5 步:重新安装 Grub 软件包

As we deleted the previous Grub, we deleted the messed up settings as well as any favourite settings stored in it. Now we’ll install a new and fresh Grub. Few things to keep in mind before you go on with the command to install the Grub.

当我们删除之前的 Grub 时,我们删除了混乱的设置以及存储在其中的任何喜欢的设置。现在,我们将安装一个新的 Grub。在继续使用命令安装 Grub 之前,需要记住几件事。

  • While installing the new Grub, it will ask you to add extra kernel options. Just press TAB to go to OK and press enter to continue.

    在安装新的 Grub 时,它会要求您添加额外的内核选项。只需按 TAB 转到 OK 并按 Enter 继续。

  • It will bring you the installation notes. Press Tab to OK followed by enter and continue.

    它将为您带来安装说明。按 Tab 键确定,然后按 Enter 键并继续。

  • When it presents with you the device option (to ask on which partition should it install Grub), choose the option in the format of sdX. DO NOT select the drive partition in 4 letter format i.e. sda4 etc. When you select the partition, it should have an asterisk () before it like [] sdX. If it does not, highlight (with tab) and press SPACE to select it. Tab OK and press enter.

当它向您显示设备选项(询问它应该在哪个分区上安装 Grub)时,请选择 sdX 格式的选项。不要选择 4 个字母格式的驱动器分区,例如 sda4 等。当您选择分区时,它前面应该有一个星号 (),例如 [] sdX。如果没有,请突出显示 (带 Tab) 并按 Space 键将其选中。Tab 键 OK 并按 Enter。

It should look like this:

它应该看起来像这样:

Solve Error no such partition grub rescue in Ubuntu
Now when you taken all those things in mind, use the command below to install the Grub.

现在,当您牢记所有这些事情后,请使用下面的命令来安装 Grub。

apt-get install grub-common grub-pc

Update the grub. and exit the chroot:

更新 grub 并退出 chroot:

update-grub
exit

Step 6: Unmount the partition:

第 6 步:卸载分区:

We mounted something at the start, didn’t we? Well lets just unmount them.

我们一开始就安装了一些东西,不是吗?好吧,让我们卸载它们。

for i in /dev/pts/dev /proc/sys; do sudo umount /mnt/temp$i ; done

That’s it. Reboot your system and you should see the good old Grub boot screen as before.

就是这样。重新启动系统,您应该能像以前一样看到旧的 Grub 引导屏幕。


Windows+Ubuntu24.04 双系统及升级 Ubuntu Pro 教程

五月行秋已于 2024-10-06 17:24:34 修改

image-20241006171820979

准备一个空 U 盘,按如下步骤实现 Windows+Ubuntu 双系统,并升级至 Ubuntu Pro。

Rufus 创建 Ubuntu 启动盘

Ubuntu 镜像下载

  • 清华开源镜像站中下载 Ubuntu
    https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/

image-20240427123120199

Rufus 下载

  • Rufus 官网
    https://rufus.ie/zh/

    根据电脑系统下载对应版本,我选择 便携版 下载。

image-20240427123256919

刻录 U 盘

1、打开 Rufus:设置选项

  • 引导类型选择:选择 Ubuntu 的 iso 文件。

  • 持久区分大小:存储一些可以在重新启动之间保留下来的文件和程序。我选择4G

    • 如果只是用来安装双系统,可以指定持久分区大小为 0。

    • 如果需要创建持久化 U 盘,可以指定持久分区大小。

    • 作用:可以使得用户在使用 USB 驱动器时,将数据保存到持久化分区中,以便在重启或切换计算机时可以保存数据。

  • 其它按如图默认即可。

image-20240427134952128

2、 格式化 U 盘:弹出警告,点击 确认 清除 U 盘内容。

image-20240427135013900

3、等待格式化、镜像复制。

image-20240427135055704

预留磁盘空间

给要安装的第二个系统 Ubuntu24.04 预留磁盘空间,推荐分出一个磁盘专门给 Ubuntu24.04

管理磁盘空间:Win+X 打开功能菜单,选择 磁盘管理 或按 K 键,进入磁盘关联页面。

  • 留出空闲空间:可以通过 压缩卷 的方式,压缩部分空间至 未分配区

  • 按需分配磁盘大小:我选择磁盘 1 中的 300G 作为 Ubuntu24.04 的磁盘空间。

image-20240427192843995

安装 Ubuntu

设置开机 U 盘启动

插入 U 盘,关机重启,进入 BIOS 界面;点击 系统设置栏,展开 启动选项

image-20240522081021925

设置 U 盘 / USB 硬盘 为开机顺序第一位,并保存设置。

image-20240522080757265

安装 Ubuntu

1、开机时选择 Try or Install Ubuntu 进入 Ubuntu 安装程序。

image-20240522121916464

2、安装时首先会进入选择语言页面,选择你需要的系统语言。

image-20240522122211219

3、我选择中文(简体),点击 下一步

image-20240522122306488

4、可访问性,保持默认,点击 下一步

image-20240522122652363

5、键盘布局:选择 汉语,点击 下一步

image-20240522122749303

6、连接互联网:选择你的网络再连接即可,点击 下一步

image-20240522122911245

7、安装 Ubuntu,选择 安装 Ubuntu,点击 下一步

image-20240522123013871

8、交互安装:选择 交互安装,点击 下一步

image-20240522123117216

9、安装扩展:选择 扩展集合,点击 下一步

image-20240522123258828

10、安装额外软件:勾选 为图像和 WiFi 硬件安装第三方软件下载并安装对其他媒体格式的支持,点击 下一步

image-20240522123558658

11、手动分区:选择 手动分区,点击 下一步

image-20240522123909602

12、设置分区

  • 进入手动分区页面后,选择上文中预留 300G 空间所在的磁盘,我是选择 nvme0n1 中的 322.12G 剩余空间

预留磁盘大小显示不一致是因为硬盘制造商和操作系统对存储容量的计算方式不同

image-20240522124026203

  • 设置具体分区大小

    • Swap 分区:该分区用于在物理内存不足时,将一部分数据暂时转移到硬盘上的空间,以虚拟内存的形式释放物理内存空间,从而避免内存溢出。Swap 分区的大小取决于系统的物理内存大小。我分配 16G。

    • /boot 分区:该分区用于存储系统启动时所需的启动加载器(如 GRUB)和内核文件。分区大小取决于内核版本的数量和大小,以及启动加载器的需求,通常为 200MB—1GB。我分配 1G。

    • / 分区:该分区是 Linux 系统的主要分区,包含了系统文件和用户数据。分区大小取决于软件的安装数量和用户数据的大小。对于大多数桌面用户,分配 20-25GB 的空间通常是足够的。我分配 80G。

    • /home 分区:该分区用于存储用户的个人数据,如文档、音乐、视频等。分区大小建议为磁盘剩余所有空间,以确保有足够的空间存储个人文件和文件夹。我分配磁盘剩余大小。

image-20240522132011820

  • 分区完成后,点击 下一步

13、设置账户:设置您的账户信息,并勾选 登录时需要密码

image-20240523045709660

14、选择时区:保持默认 Shanghai 即可

image-20240523045729380

15、安装 Ubuntu

image-20240523045810278

16、安装中:等待系统安装,耐心等待~

image-20240523045857048

image-20240523045921560

17、安装完成,点击 重启系统,完成安装

image-20240523050021043

18、重启时,进入 BIOS 将开机顺序设置回去,接着保存设置即可;U 盘可以拔出了。

image-20240523050303509

Windows 中切换 Ubuntu 系统

当前系统是 Windows 开机时,可以通过下列方式去切换到 Ubuntu 系统, 也可以将电脑关机,在电脑启动时,进入 BIOS 来选择 Ubuntu 系统开机。

1、开机默认进入 Windows 系统,打开设置中的 系统和安全

image-20240523101808904

2、高级启动页面:选择 恢复 中的 立即重新启动

image-20240523101855767

3、点击 使用设备,进入选择设备页面

image-20240523102026615

4、进入 Ubuntu 系统:点击 ubuntu 即可进入 Ubuntu 系统

image-20240523102329815

5、输入账户密码,进入 Ubuntu 欢迎页

image-20240523050452857

升级为 Ubuntu Pro

长期支持的 Ubuntu 版本可享受针对主要 Ubuntu 资源库的五年标准安全维护。Ubuntu Pro 将针对主要资源库和总体资源库的这一安全维护承诺期限延至 10 年,为企业和最终用户等提供了一个巨大的安全开源软件库。个人可以在最多 5 台机器上免费使用 Ubuntu Pro。

简而言之,Ubuntu 24.04 免费升级为 UbuntuPro 24.04 后可以获得由 5 年到 10 年的安全维护。

1、欢迎页点击 前进 进入是否升级 Ubuntu Pro 的页面,勾选 Enable Ubunu 后点击 前进

image-20240523050542892

2、勾选 Or add token manually 后,接下来要获取 Ubuntu ProToken

image-20240523110207442

3、点击左侧 火狐浏览器,登录 Ubuntu 专业版官网:注册账号,登录成功后,点击 立即获取 Ubuntu Pro

  • 没有账号可以进入 注册账号页面 注册 Ubuntu 账号再登录

image-20240523111804783

4、勾选 Myself 用于个人使用,再点击 Register 进入个人订阅页面

image-20240523104943467

5、获取 Token:订阅页面复制 Free Personal Token 中的 Token

  • 如果未显示 Token,手动输入网址 https://ubuntu.com/pro/dashboard

image-20240523105234556

6、回到桌面,粘贴复制的 Token 后,点击 前进

image-20240523110207442

7、进入升级成功页面

image-20240523111520398


3 分钟解决进入 Ubuntu 系统时一直卡住或一直加载的问题

五月行秋已于 2024-10-12 19:59:54 修改

问题背景

电脑安装了 Windows10+Ubuntu24.04 双系统,在打开 Ubuntu 系统的时候,电脑一直处在文件系统检查页面,按 Ctrl+C 也取消不了,只能长按电源强制关机。

image-20241012122319753

解决方法

1. 选择 recovery mode 恢复模式进入 Ubuntu 系统

 
image-20241012122958345

2. 选择 Advanced options for Ubuntu 打开 Ubuntu 的高级选项

 
image-20241012123249818

3. 打开 root shell 命令行页面

选择 Drop to root shell prompt
 
image-20241012123412524

4. 修改 grub 文件

命令行中输入

sudo vi /etc/default/grub

image-20241012123609089

5. 修改 grub 文件

  1. 输入 i 进入编辑模式,通过键盘的 上下左右 按键来移动光标,再编辑文本

  2. GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    修改为
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

  3. Esc 退出编辑模式,再输入 :wq 保存 grub 文件

image-20241012123804740

6. 更新文件并重启

先更新引导程序的配置

sudo update-grub

再重启 Ubuntu

reboot

image-20241012124148832

7. 等待重启,即可成功进入 Ubuntu。


via:

  • How to install Ubuntu 20.04 and dual boot alongside Windows 10 | by Dave’s RoboShack | Linux For Everyone | Medium
    https://medium.com/linuxforeveryone/how-to-install-ubuntu-20-04-and-dual-boot-alongside-windows-10-323a85271a73

  • Beginners Guide to Install Windows With Ubuntu in Dual Boot
    https://itsfoss.com/install-ubuntu-1404-dual-boot-mode-windows-8-81-uefi/

  • How to Disable UEFI Secure Boot to Dual Boot Any System
    https://www.makeuseof.com/tag/disable-secure-uefi-dual-boot/

  • [Fixed] “No Bootable Device” Error After Installing Ubuntu
    https://itsfoss.com/no-bootable-device-found-ubuntu/

  • [Solved] error: no such partition grub rescue in Ubuntu
    https://itsfoss.com/solve-error-partition-grub-rescue-ubuntu-linux/

  • Windows+Ubuntu24.04 双系统及升级 Ubuntu Pro 教程 - CSDN 博客
    https://blog.csdn.net/qingxuly/article/details/139155827

  • 3 分钟解决进入 Ubuntu 系统时一直卡住或一直加载的问题<_ubuntu 卡在启动界面进不去 - CSDN 博客>
    https://blog.csdn.net/qingxuly/article/details/142875098

  • 轻松管理 EFI/UEFI 启动项 & 管理 EFI 系统分区 & 修复 EFI 系统启动问题!- EasyUEFI
    https://www.easyuefi.com/index-cn.html

  • EasyUEF 下载 - EasyUEFI 版官方免费下载 [2025 最新版]- 下载之家
    https://www.downza.cn/soft/212250.html

  • 使用 easyUEFI 引导从硬盘安装 Ubuntu 系统<_easy uefi-CSDN 博客>
    https://blog.csdn.net/qq_46753404/article/details/120974457

  • thinkpad x13 安装 Windows 10 + Ubuntu 20.04 双系统_install ubuntu alongside windows boot manager-CSDN 博客
    https://blog.csdn.net/weixin_42409052/article/details/116772155

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/978051.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

flutter 专题 八十二 Flutter路由框架Fluro简介

在Flutter应用开发过程中&#xff0c;除了使用Flutter官方提供的路由外&#xff0c;还可以使用一些第三方路由框架来实现页面管理和导航&#xff0c;如Fluro、Frouter等。 Fluro作为一款优秀的Flutter企业级路由框架&#xff0c;Fluro的使用比官方提供的路由框架要复杂一些&…

(十)趣学设计模式 之 外观模式!

目录 一、 啥是外观模式&#xff1f;二、 为什么要用外观模式&#xff1f;三、 外观模式的实现方式四、 外观模式的优缺点五、 外观模式的应用场景六、 总结 &#x1f31f;我的其他文章也讲解的比较有趣&#x1f601;&#xff0c;如果喜欢博主的讲解方式&#xff0c;可以多多支…

为AI聊天工具添加一个知识系统 之124 详细设计之65 人类文化和习俗,即文化上的差异-根本差异 之2

本文要点 要点 “取” 本身 是一个具有 主谓宾 三格的 多“格”词。 三“格”&#xff08;主/谓/宾&#xff09;分别是&#xff1a; 主取&#xff0c;取法&#xff08;能取&#xff1a;两组分别 是 析取取“异”&#xff08;三个“不同”&#xff09;和合取取“同”&#xf…

AXI协议详解及FPGA仿真

AXI协议详解及FPGA仿真 1 摘要 AMBA AXI 协议是以高性能&#xff0c;高频系统设计为目标&#xff0c;提供了很多适合高速亚微型系统互连的特征。为相邻存储器连续进行数据传输提供的一种高频率&#xff0c;高带宽&#xff0c;低延迟的总线协议&#xff0c;是一种突发传输协议…

互联网怎样利用人性-思维导图-markdown

互联网怎样利用人性 傲慢 留言、点评饥饿营销、吵架营销 懒惰 一键下单、扫二维码默认登录、多平台同步单点登录SSO美女论坛、美女头像事业线开箱防御力破女性装饰 贪婪 团购、秒杀、抽奖免费试吃、下载存储空间、在家赚钱晒单返现 窥视 订阅、悄悄关注名人博客微博、惊人标题…

javascript-es6 (五)

内置构造函数 在 JavaScript 中 最主要 的数据类型有 6 种&#xff1a; 基本数据类型&#xff1a; 字符串、数值、布尔、undefined、null 引用类型: 对象 但是&#xff0c;我们会发现有些特殊情况&#xff1a; //普通字符串 const str peiqi console.log(str.length) //…

Hive从入门到运用

hive简介 hive的设计思想&#xff08;本质是一个翻译器&#xff09; 上传安装包 解压&#xff0c;查看 运行hive&#xff08;一定要启动hadoop&#xff0c;是有依赖关系的。&#xff09; 测试启动方法&#xff0c;和建表 文件创建很上传到hdfs&#xff0c;直接上传到hive表的目…

RK3588部署YOLOv8(1):YOLOv8和YOLOv8-pose转ONNX及Python后处理代码实现

前言 由于种种原因&#xff0c;原始的YOLOv8系列的模型&#xff0c;在RK3588上难以部署&#xff0c;在 .pt 转 .onnx 的时候需要去掉后处理层&#xff08;主要是DFL层&#xff09;。因此&#xff0c;模型的后处理需要自己来实现。 本文基于Rockship 官方给的源码&#xff08;导…

Lua的table(表)

Lua表的基本概念 Lua中的表&#xff08;table&#xff09;是一种多功能数据结构&#xff0c;可以用作数组、字典、集合等。表是Lua中唯一的数据结构机制&#xff0c;其他数据结构如数组、列表、队列等都可以通过表来实现。 表的实现 Lua的表由两部分组成&#xff1a; 数组部分…

权限(1)

权限1 一、shell命令及运行原理二、linux中的用户1、身份切换 2、sudo &#xff1a;指令的短暂提权&#xff08;输入用户自己的密码&#xff09;3、权限理解4、拥有者&#xff0c;所属组&#xff0c;other5&#xff0c;文件属性6、修改权限&#xff08;角色 / 属性&#xff09;…

【实战】使用PCA可视化神经网络提取后的特征空间【附源码】

《------往期经典推荐------》 一、AI应用软件开发实战专栏【链接】 项目名称项目名称1.【人脸识别与管理系统开发】2.【车牌识别与自动收费管理系统开发】3.【手势识别系统开发】4.【人脸面部活体检测系统开发】5.【图片风格快速迁移软件开发】6.【人脸表表情识别系统】7.【…

Lumoz Chain正式上线:AI 时代的新算力破局者

新的叙事和技术突破永远是推动行业前行的核心动力。当下&#xff0c;AI Agent无疑是最炙手可热的赛道之一。 当加密世界将目光投向AI领域时&#xff0c;大多数项目仍停留在以AI为工具或应用场景的层面&#xff0c;试图通过集成AI模型或优化链上功能来吸引用户。然而&#xff0c…

《如何利用看板工具提升学习效率?》

从零开始&#xff1a;用看板工具打造高效学习管理系统 在当今这个信息爆炸的时代&#xff0c;知识更新换代的速度快得惊人&#xff0c;无论是学生、职场人士还是终身学习者&#xff0c;都面临着如何有效管理学习过程、提升学习效率的难题。而板栗看板这款软件&#xff0c;或许…

基于STM32的智能垃圾分类与回收系统

1. 引言 传统垃圾处理方式存在分类效率低、资源浪费严重等问题&#xff0c;难以满足城市可持续发展的需求。本文设计了一款基于STM32的智能垃圾分类与回收系统&#xff0c;通过视觉识别、多传感器融合与自动化分拣技术&#xff0c;实现垃圾精准分类、压缩存储与资源回收&#…

C++:dfs,bfs各两则

1.木棒 167. 木棒 - AcWing题库 乔治拿来一组等长的木棒&#xff0c;将它们随机地砍断&#xff0c;使得每一节木棍的长度都不超过 5050 个长度单位。 然后他又想把这些木棍恢复到为裁截前的状态&#xff0c;但忘记了初始时有多少木棒以及木棒的初始长度。 请你设计一个程序…

Web端——超级马里奥【简化版】

1.介绍 这是一个简单的受超级马里奥启发的平台游戏演示&#xff01;这个基于网络的游戏包括&#xff1a; 角色移动&#xff1a;使用箭头键让马里奥向左和向右移动&#xff0c;空格键或向上箭头键跳跃。跳跃平台&#xff1a;游戏中有多个可以跳跃的平台&#xff0c;包括经典的…

PEFT介绍及其源码解析

PEFT库介绍 PEFT&#xff08;Parameter-Efficient Fine-Tuning&#xff0c;参数高效微调&#xff09;是由 Hugging Face 开源的一个高效微调库&#xff0c;旨在通过少量可训练参数实现对大型预训练模型的快速适应&#xff0c;从而显著降低计算和存储成本。 核心功能与优势 多…

osgEarth安装总结

第一步&#xff1a;安装OSG 直接通过git下载源码&#xff0c;使用cmake进行编译&#xff0c; git clone --depth 1 https://github.com/openscenegraph/OpenSceneGraph.git mkdir build cd build cmake .. make sudo make isntall编译过程中缺什么库&#xff0c;就安装什么库 …

实体机器人在gazebo中的映射

这一部分目的是将真实的机器人映射到gazebo中&#xff0c;使得gazebo中的其他虚拟机器人能识别到真实世界的wheeltec机器人。 真实机器人的型号的wheeltec旗下的mini_mec。 一、在wheeltec官方百度云文档中找到URDF原始导出功能包.zip 找到对应的包 拷贝到工作空间下 在原有…

8、HTTP/1.0和HTTP/1.1的区别【高频】

第一个是 长连接&#xff1a; HTTP/1.0 默认 短连接&#xff0c;&#xff08;它也可以指定 Connection 首部字段的值为 Keep-Alive实现 长连接&#xff09;而HTTP/1.1 默认支持 长连接&#xff0c;HTTP/1.1是基于 TCP/IP协议的&#xff0c;创建一个TCP连接是需要经过三次握手的…