安装 Ubuntu 24.04 作为双启动后,Windows 10 无法启动。
我最近在 Dell Precision Tower 3620 上安装了 Ubuntu 24.04.2 LTS,之前它只运行 Windows 10。我按照这些说明进行操作,并且 Ubuntu 安装运行良好 - 耶!但是 GRUB 无法识别 Windows 10 的存在,如果我尝试通过重新排序 BIOS 启动来启动 Windows 10,那么它只会挂在 Dell OEM 屏幕上。
我怀疑问题出在我已经有两个 efi 启动分区,一个在/dev/sda1
,另一个在(新的?)/dev/sda6
已自动挂载为/boot/efi
。这是根据 GParted 的当前硬盘布局:
通过进入 BIOS 启动顺序,我设法以某种方式激活了 Windows 启动恢复过程(我不记得怎么做了!),但它显示黑屏并显示以下错误消息并进入重启循环:
Microsoft Secure Boot Recovery Version 1.0
Visit https://aka.ms/securebootrecovery to learn more about this application.
Checking Secure Boot Certificate Configuration...
The Secure Boot Certificate database already contains the Microsoft UEFI 2023 certificate.
No changes required. If you continue to see this message each time the system starts,
the UEFI firmware boot configuration may be missing an entry for 'Windows Boot Manager'
or the Windows entry was moved too low in the boot order.
System will reboot in 10 seconds.
其他想法:
- 这台电脑只有一个硬盘,但我可以使用可启动的 USB 记忆棒。
- 我尝试不改变除启动顺序之外的任何 UEFI/BIOS 设置(例如安全启动仍然启用)
- 我可以挂载并查看整个分区
/dev/sda3
,即原始 Win10 位置。那里似乎没有损坏。
这是 的输出find /boot/efi
。
/boot/efi
/boot/efi/EFI
/boot/efi/EFI/ubuntu
/boot/efi/EFI/ubuntu/grubx64.efi
/boot/efi/EFI/ubuntu/shimx64.efi
/boot/efi/EFI/ubuntu/mmx64.efi
/boot/efi/EFI/ubuntu/BOOTX64.CSV
/boot/efi/EFI/ubuntu/grub.cfg
/boot/efi/EFI/BOOT
/boot/efi/EFI/BOOT/fbx64.efi
/boot/efi/EFI/BOOT/mmx64.efi
/boot/efi/EFI/BOOT/bkpbootx64.efi
/boot/efi/EFI/BOOT/bootx64.efi
/boot/efi/EFI/BOOT/grubx64.efi
sudo os-prober
运行但不打印任何输出
这是我的/etc/default/grub
(删除了注释行):
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || echo Ubuntu`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_DISABLE_OS_PROBER=false
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
#GRUB_TERMINAL=console
#GRUB_GFXMODE=640x480
#GRUB_DISABLE_LINUX_UUID=true
#GRUB_DISABLE_RECOVERY="true"
GRUB_INIT_TUNE="480 440 1"
这是的输出sudo mount /dev/sda1 /mnt/efi1; find /mnt/efi1 -maxdepth 3
;
/mnt/efi1
/mnt/efi1/EFI
/mnt/efi1/EFI/ubuntu
/mnt/efi1/EFI/ubuntu/shimx64.efi
/mnt/efi1/EFI/ubuntu/grubx64.efi
/mnt/efi1/EFI/Microsoft
/mnt/efi1/EFI/Microsoft/Boot
/mnt/efi1/EFI/Microsoft/Recovery
/mnt/efi1/EFI/Boot
/mnt/efi1/EFI/Boot/bkpbootx64.efi
/mnt/efi1/EFI/Boot/bootx64.efi
/mnt/efi1/EFI/Boot/grubx64.efi
/mnt/efi1/EFI/dell
/mnt/efi1/EFI/dell/bios
/mnt/efi1/System Volume Information
如何让 Windows 10 启动?
后续问题(如果相关):
- 我是否必须以某种方式合并两个启动分区并删除其中一个?如果是这样,我将非常感激傻瓜指南指针/说明。我几乎从不接触分区或更改启动设置,因为我知道我会弄坏一些东西!
- 如果/当我可以启动 Windows 10 时,os-prober 会自动检测 Windows 10 吗?
终于设法让 Win10 正常工作了。由于没有更专业的答案,我将发布自己的答案。感谢 @oldfred 提供的初步建议。虽然最终的解决方案是面向 Windows 的,但我不会在 Windows 论坛上发帖,因为:
解决问题的步骤(从挂在 OEM 屏幕上的 Windows 10 双启动的 Ubuntu 开始):
/dev/sda1
(使用 提供的 UUIDlsblk -f
)/dev/sda6
似乎这些标志需要应用于 /dev/sda1,以便下一步工作sudo os-prober
它现在将 Windows 作为可用操作系统sudo update-grub
它将 Windows 添加为 Grub 菜单中的一个选项/dev/sda3
应可用C:\
但仅在 diskpart 中可见)GUID 类型“Linux-filesystem”(0F63DAF-8483-4772-8E79-3D69D8477DE4)更改为 GUID 类型“基本分区”。类型在此处给出:https://en.wikipedia.org/wiki/GUID_Partition_Table 我认为这是关键阶段之一。重新进入 Windows 恢复命令提示符时,/dev/sda3 现在自动挂载为C:\
(耶!)。但它仍然无法启动!根据此处提供的信息https://www.techtarget.com/searchenterprisedesktop/tip/Four-ways-to-solve-Windows-10-boot-problems在 notepad.exe 中查看C:\Windows\System32\Logfile\Srt\SrtTrail
提示启动程序仍然对分区(X:\
恢复分区和C:\
实际 Windows 分区)感到困惑。dism /image:c:\ /cleanup-image /restorehealth /source:wim:X:\source\install.wim:1
。这大约需要 20 分钟才能运行,下次重新启动时会出现通常的 Win10 登录屏幕。摘要:我认为 Ubuntu 安装以某种方式将 Windows 分区的 GUID 类型更改为“Linux 文件系统”,然后导致 Windows 恢复修复启动设置的所有尝试都失败。我认为 Linux 不会关注 GUID 类型,但如果分区设置不正确,Windows 会完全忽略它。
其他有用信息来自这里:https://forums.tomshardware.com/threads/windows-10-bootrec-rebuildbcd-and-scanos-say-0-windows-installations-detected.3661383/(例如
diskpart
list disk
select disk 0
list partition
list volume
select volume 3
assign letter C:
)