如果您在 PC 和Windows上安装了(Windows)Ubuntu ,但不想再使用Linux ,您会怎么做?现在,您的硬盘驱动器上有一个Linux 分区(Linux partition),它占用了您想用于Windows文件夹和文件的空间。
本文将向您展示如何在 Windows 10 双启动中安全卸载 Ubuntu,(Ubuntu in Windows 10 dual boot)而不会丢失数据或应用程序。
此过程的第一部分是删除Linux操作系统。请记住,这也会删除您所有的Ubuntu数据和系统文件。确保将您不想删除的任何内容保存在其他地方。该过程的第二部分是更改Windows引导加载程序。
在对计算机进行任何更改之前,您总是希望备份您的文件。即使您只使用Linux很短一段时间,也很可能会有您想要保存的数据。
此外,您还想备份Windows分区中的所有关键数据。使用外部硬盘驱动器、云存储或DVD(DVDs),以免丢失任何数据。
确保(Make)您有Windows的(Windows)USB或DVD。您可以从 Microsoft下载 Windows 10 的副本。(download a copy of Windows 10)
在 Windows 中删除 Linux 分区(Delete The Linux Partition In Windows)
- 首先登录Windows。按住Windows 键(Windows key)+ R并键入diskmgmt.msc以打开Windows磁盘管理工具。
Linux分区与(Linux)Windows不同,因为它们没有驱动器号和文件系统。
Windows 分区可以通过驱动器标签来识别,例如 C、D 和 E。它们通常也是FAT或NTFS文件。
- 要删除Linux分区,请右键单击每个分区并选择Delete Volume。
- 将弹出一个警告,让您知道您正在尝试删除不是由Windows创建的分区。然后,系统会询问您是否要删除它。选择是(Yes)。
删除分区将释放驱动器上的空间。
- 如果您有其他Linux分区,请以相同方式删除它们。右键单击可用空间(Free space)并选择删除分区。(Delete Partition. )然后在弹出对话框时单击是。(Yes)
- 现在可用空间更改为未分配空间。要扩展Windows分区以占用可用空间,请右键单击未分配(Unallocated)空间并从下拉选项中选择扩展卷。(Extend Volume)
- 然后将打开扩展卷向导。(Extend Volume Wizard)单击下一步(Next )>下一步(Next )>完成(Finish)。
该过程完成后,您将只看到一个卷,这意味着您已将所有磁盘空间归还给Windows。
从计算机中删除 Linux 分区后,Ubuntu的引导加载程序仍然存在,并且也需要删除。有几种方法可以做到这一点。
删除 Grub 引导加载程序(Remove the Grub Bootloader)
- 转到Windows 开始(Windows Start)菜单,然后单击电源图标。然后按住Shift键并选择Restart。
- 继续(Continue)按住 shift 键,直到看到选择一个选项(Choose an option)屏幕。
- 选择疑难解答(Troubleshoot )选项 >高级选项(Advanced options)>命令提示符(Command Prompt)。从命令提示符(Command Prompt)选项中选择您的用户帐户并输入您的密码。
- 这将打开一个命令行终端。键入bootrec /fixmbr并按Enter。查看操作已成功完成的消息。
- 接下来输入bootrec /fixboot > Enter。看到操作已成功完成的相同消息。键入另一个命令bootrec /scanos > Enter。此命令将扫描您的所有磁盘以查看是否有任何Windows 操作系统(Windows OS)实例。完成所需的时间取决于您的系统规格以及您安装的磁盘的大小和数量。扫描完成后,您将看到磁盘上的Windows安装。
- 要使Windows成为您的主要引导操作系统,请键入命令bootrec /rebuildbcd > Enter。
- 如果您有多个Windows安装,您将看到所有它们的列表以及它们在驱动器上的存储位置。键入A > Enter以完成该过程。
- 要关闭终端,请输入exit > Enter。您现在已经成功删除了与Ubuntu相关的所有内容。您的 PC 现在将直接启动到Windows。
使用 Windows 引导加载程序覆盖 Linux 引导加载程序(Overwrite the Linux Boot Loader with Windows Boot Loader)
- 要使用Windows(Windows)引导加载程序覆盖Linux引导加载程序,请将上面下载的USB Windows 安装程序(USB Windows Installer)插入计算机并重新启动。
- 从USB恢复盘启动系统后,单击修复计算机(repair your computer)。
- 在下一个屏幕中,选择疑难解答(Troubleshoot )选项。
- 从下一个高级选项(Advanced options)屏幕中选择命令提示符。(Command Prompt)
- 在命令提示符窗口中,输入bootrec.exe /fixmbr。这将修复Windows引导加载程序。
- 现在重新启动计算机将从硬盘驱动器启动它。Windows现在可以正常工作,Linux将不再在您的系统上。
如果您没有 Windows 安装 CD 或 USB 怎么办?(What if You Don’t Have a Windows Installation CD or USB?)
您仍然可以从Windows 10或Ubuntu卸载(Ubuntu)Ubuntu双启动,如下所述。
- 在Windows 10中,以(Windows 10)管理员(Administrator.)身份运行命令提示符。
- 运行以下命令将正确的EFI可执行文件设置为默认启动项:
bcdedit /set “{bootmgr}” path \efi\microsoft\boot\bootmgfw.efi
- 要查看上述命令是否有效,请重新启动计算机。如果成功,它应该直接启动到Windows。
- 要删除分区,请按照上述步骤,首先键入diskmgmt.msc(在 Windows 中删除 Linux 分区部分( Delete the Linux Partition in Windows section))
使用 UEFI 更改引导顺序(Change Boot Order Using UEFI)
- 您可以直接从固件 ( BIOS ) 设置更改 UEFI 引导顺序。(change the UEFI boot order)要从Windows 10访问BIOS,请单击开始(Start)按钮 >设置(Settings)>更新和安全(Updates & security)。
- 在左侧列中,单击Recovery。在高级启动(Advanced startup)下,单击立即(now)重新启动(Restart) 。
- 选择疑难解答(Troubleshoot)>高级选项(Advanced options)> UEFI 固件设置(UEFI Firmware Settings)。在UEFI 固件设置(UEFI Firmware Settings)屏幕上,单击重新启动(Restart)。然后您的计算机将重新启动并加载到BIOS。
从Windows 10(Windows 10)双启动卸载 Ubuntu并不困难。您可以按照上述方法之一执行此操作而不会丢失任何数据。
How to Uninstall Ubuntu in a Windows 10 Dual-Boot System
What do yoυ do if yoυ have installed Ubuntu on your PC alongside Windows but don’t want to use Linux anymore? You now have a Linux partition on your hard drive that is taking up space you want to use for your Windows folders and files.
This article will show you how to safely uninstall Ubuntu in Windows 10 dual boot without losing data or applications.
The first part of this process is to remove the Linux operating system. Keep in mind that this will also remove all your Ubuntu data and system files. Be sure to save anything you don’t want to delete somewhere else. The second part of the process is to change the Windows boot loader.
Before making any changes to your computer, you always want to back up your files. Even if you have only been using Linux for a short period, there will most likely be data you want to save.
Also, you want to back up all the critical data from your Windows partition. Use an external hard drive, cloud storage, or DVDs so that you don’t lose any data.
Make sure you have a USB or DVD of Windows. You can download a copy of Windows 10 from Microsoft.
Delete The Linux Partition In Windows
- Start by logging into Windows. Hold down the Windows key + R and type diskmgmt.msc to open the Windows disk management tool.
Linux partitions are differentiated from Windows because they don’t have a drive number and file system.
Windows partitions can be identified by the drive label such as C, D, and E. They are also usually FAT or NTFS files.
- To delete the Linux partitions, right-click on each one and choose Delete Volume.
- A warning will pop-up letting you know that you are trying to delete a partition that wasn’t created by Windows. Then, you will be asked if you want to delete it. Select Yes.
Deleting the partitions will free up space on your drive.
- If you have other Linux partitions, delete them in the same manner. Right-click on Free space and select Delete Partition. Then click Yes when the dialogue box pops up.
- Now the free space is changed to unallocated space. To expand your Windows partition to occupy the free space, right-click on the Unallocated space and choose Extend Volume from the dropdown options.
- The Extend Volume Wizard will then open. Click Next > Next > Finish.
After the process is complete, you will see only one volume meaning you have claimed all your disk space back to Windows.
Once you remove Linux partitions from your computer, the boot loader for Ubuntu is still there and needs to be removed as well. There are several ways to do this.
Remove the Grub Bootloader
- Go to the Windows Start menu and click on the power icon. Then press and hold down the Shift key and select Restart.
- Continue holding down the shift key until you see the Choose an option screen.
- Select the Troubleshoot option > Advanced options > Command Prompt. Choose your user account from the Command Prompt options and enter your password.
- This will open a command-line terminal. Type bootrec /fixmbr and hit Enter. See the message that the operation has completed successfully.
- Next type bootrec /fixboot > Enter. See the same message that the operation has completed successfully. Type another command bootrec /scanos > Enter. This command will scan all your disks to see if there are any instances of the Windows OS. The time it takes to complete depends upon your system specifications and the size and number of disks you have installed. When the scan is complete, you will see the Windows installations you have on your disk.
- To make Windows your primary boot OS, type the command bootrec /rebuildbcd > Enter.
- If you have multiple Windows installations, you will see a list of all of them and where they are stored on your drive. Type A > Enter to complete the process.
- To close the terminal, type exit > Enter. You have now successfully removed everything related to Ubuntu. Your PC will now boot directly to Windows.
Overwrite the Linux Boot Loader with Windows Boot Loader
- To overwrite the Linux boot loader with the Windows boot loader, insert the USB Windows Installer you downloaded above into your computer and restart it.
- After booting your system from the USB recovery disk, click on repair your computer.
- From the next screen, choose the Troubleshoot option.
- Choose Command Prompt from the next Advanced options screen.
- From the command prompt window, enter bootrec.exe /fixmbr. This will fix the Windows boot loader.
- Restarting your computer now will boot it from the hard drive. Windows will now work as it should, and Linux will no longer be on your system.
What if You Don’t Have a Windows Installation CD or USB?
You can still uninstall Ubuntu dual boot from Windows 10 or Ubuntu as explained below.
- From Windows 10, run the command prompt as Administrator.
- Run the command below to set the correct EFI executable as the default boot entry:
bcdedit /set “{bootmgr}” path \efi\microsoft\boot\bootmgfw.efi
- To see if the above command worked, reboot your computer. If successful, it should boot directly to Windows.
- To delete the partitions, follow the steps above, starting with typing diskmgmt.msc (the Delete the Linux Partition in Windows section)
Change Boot Order Using UEFI
- You can change the UEFI boot order directly from the firmware (BIOS) settings. To access the BIOS from Windows 10, click on the Start button > Settings > Updates & security.
- On the left-hand column, click on Recovery. Under Advanced startup, click Restart now.
- Choose Troubleshoot > Advanced options > UEFI Firmware Settings. On the UEFI Firmware Settings screen, click Restart. Your computer will then restart and load into the BIOS.
Uninstalling Ubuntu from Windows 10 dual boot is not difficult. You can follow one of the methods above to do so without losing any data.