You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过Windows引导程序实现UEFI模式下Windows 10与Ubuntu双启动

Hey there, let's tackle this together—you're looking to install Ubuntu on your secondary drive and add it to Windows' bootloader instead of relying on GRUB, right? Since your laptop has a pre-installed UEFI Windows 10, we can do this safely without risking your primary system. Let's break it down step by step:

Install Ubuntu to Secondary Drive & Add to Windows Boot Manager (UEFI)

We’ll keep all Ubuntu-related changes on your secondary drive and only add a boot entry to Windows’ native bootloader—no messing with your primary drive’s critical boot files.

1. Pre-Install Prep

  • Backup Critical Data: Even low-risk operations deserve a safety net—save important files to an external drive or cloud storage first.
  • Make a UEFI-Compatible Ubuntu USB: Download the Ubuntu ISO, then use Rufus to create a bootable USB. In Rufus, select "UEFI (non-CSM)" mode to ensure it works with your system’s UEFI setup.
  • Free Up Space on Secondary Drive: Open Windows’ Disk Management, right-click your secondary drive, and shrink a volume to create unallocated space (aim for at least 50GB for Ubuntu—more if you plan to store large files). Leave this space unformatted.

2. Install Ubuntu to Secondary Drive

  1. Plug in your USB, restart your laptop, and press the brand-specific key (F12, Esc, F2, etc.) to open the UEFI boot menu. Select the UEFI-mode USB entry (avoid any "Legacy" labeled options).
  2. Boot into Ubuntu’s trial mode, confirm it recognizes your secondary drive, then click "Install Ubuntu".
  3. Walk through language, keyboard, and network settings. When you reach the "Installation Type" screen, select "Something else"—this lets us manually control partitions.
  4. Create Ubuntu partitions on the secondary drive’s unallocated space:
    • Root Partition: Click the "+" button, set size to your desired amount (e.g., 50GB), set mount point to /, file system to ext4, and partition type to "Primary".
    • (Optional) Swap Partition: If your physical RAM is under 8GB, create a partition equal to your RAM size, set file system to "swap area" (acts as virtual memory).
  5. Critical Step: In the "Device for boot loader installation" dropdown, select your secondary drive’s ESP partition (labeled "EFI System")—if there isn’t one, select the secondary drive itself (e.g., /dev/sdb). This installs GRUB to the secondary drive’s boot area, leaving Windows’ primary boot loader untouched.
  6. Finish the installation, restart, and remove the USB—your laptop will boot straight into Windows (this is normal; we haven’t added Ubuntu to the boot menu yet).

3. Add Ubuntu to Windows Boot Manager

We’ll use Windows’ native bcdedit tool to add an Ubuntu boot entry safely:

  1. Boot into Ubuntu: Restart, open the UEFI boot menu again, and select the secondary drive’s Ubuntu entry (this loads Ubuntu’s GRUB, where you can select Ubuntu).
  2. Locate Ubuntu’s EFI file:
    • Open Terminal and run:
      sudo fdisk -l
      
      Find your secondary drive’s EFI System partition (e.g., /dev/sdb1).
    • Mount the partition:
      sudo mkdir /mnt/esp
      sudo mount /dev/sdb1 /mnt/esp
      
    • Verify the EFI file exists:
      ls /mnt/esp/EFI/ubuntu
      
      You’ll see either shimx64.efi (preferred) or grubx64.efi—note this filename.
  3. Restart back into Windows, then open Command Prompt as Administrator (right-click Start → Windows Terminal (Admin)).
  4. Assign a drive letter to the secondary drive’s ESP partition:
    • Open Disk Management, right-click the secondary drive’s EFI partition, select "Change Drive Letter and Paths", and assign a letter (e.g., S:).
  5. Create a new boot entry in Windows:
    • Run this command first—it will return a GUID (e.g., {12345678-1234-1234-1234-1234567890ab}):
      bcdedit /create /d "Ubuntu" /application bootsector
      
    • Replace {YOUR_GUID} and S: with your GUID and ESP drive letter, then run:
      bcdedit /set {YOUR_GUID} device partition=S:
      bcdedit /set {YOUR_GUID} path \EFI\ubuntu\shimx64.efi
      
    • Add the entry to Windows’ boot menu:
      bcdedit /displayorder {YOUR_GUID} /addlast
      

4. Test & Cleanup

Restart your laptop—you’ll now see a Windows boot menu with an "Ubuntu" option. Select it to boot into Ubuntu, or pick Windows as usual.

If you ever want to remove Ubuntu:

  1. Delete the Ubuntu partitions from Windows’ Disk Management.
  2. Run bcdedit /delete {YOUR_GUID} in Admin Command Prompt to remove the boot entry.

内容的提问来源于stack exchange,提问作者Blaine

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 04:29:07