![在预装 Windows 的同时安装 Ubuntu 时出现问题](https://linux22.com/image/1197591/%E5%9C%A8%E9%A2%84%E8%A3%85%20Windows%20%E7%9A%84%E5%90%8C%E6%97%B6%E5%AE%89%E8%A3%85%20Ubuntu%20%E6%97%B6%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98.png)
虽然我浏览了之前发布的许多类似问题的解决方案,但我仍然无法成功。
主要问题是,在 USB 棒(使用 Rufus 创建)中安装 Ubuntu 22.04 时,安装程序无法识别 Windows 安装,因此没有同时安装 Ubuntu 和 Windows 的选项。显示以下消息:“此计算机未检测到操作系统。”
我有一台联想 Idepad Y510p,1 TB SSD,运行 Windows 10(从 Win7 升级)。
我完成了所有建议的验证和程序,例如:
- 使用 Windows 磁盘分区实用程序缩小 Windows 分区,为 Ubuntu 操作系统保留大约 250 GB,如下所示:Win10 - 磁盘管理
- 在Win10控制面板中,禁用快速启动。
- 在 BIOS 中,UEFI 已启用;安全启动已禁用。
在安装过程中,在 Try Ubuntu 的桌面环境中启动 Ubuntu 终端,相关输出为sudo fdisk -l
:
Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDC WDS100T2B0A
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 96EA98AE-983E-4E85-BA24-623AC01B5DAA
Device Start End Sectors Size Type
/dev/sda1 2048 2050047 2048000 1000M Windows recovery environment
/dev/sda2 2050048 2582527 532480 260M EFI System
/dev/sda3 2582528 4630527 2048000 1000M Microsoft basic data
/dev/sda4 4630528 4892671 262144 128M Microsoft reserved
/dev/sda5 4892672 1385627647 1380734976 658.4G Microsoft basic data
/dev/sda6 1867975281 1869787760 1812480 885M Windows recovery environment
/dev/sda7 1869787761 1953522288 83734528 39.9G Microsoft basic data
和sudo gdisk -l /dev/sda
:
ubuntu@ubuntu:~$ sudo gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.9
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Model: WDC WDS100T2B0A
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 96EA98AE-983E-4E85-BA24-623AC01B5DAA
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 482352493 sectors (230.0 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 2050047 1000.0 MiB 2700 r Cópia para Partiç...
2 2050048 2582527 260.0 MiB EF00
3 2582528 4630527 1000.0 MiB 0700
4 4630528 4892671 128.0 MiB 0C01
5 4892672 1385627647 658.4 GiB 0700
6 1867975281 1869787760 885.0 MiB 2700
7 1869787761 1953522288 39.9 GiB 0700
gdisk
最后, on sda5
(NTFS Windows 分区)的输出为:
ubuntu@ubuntu:~$ sudo gdisk -l /dev/sda5
GPT fdisk (gdisk) version 1.0.9
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory.
***************************************************************
Exact type match not found for type code 7200; assigning type code for
'Linux filesystem'
Exact type match not found for type code 6C00; assigning type code for
'Linux filesystem'
Warning! Secondary partition table overlaps the last partition by
2508946357 blocks!
You will need to delete this partition or resize it in another utility.
Disk /dev/sda5: 1380734976 sectors, 658.4 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 379908E8-D060-45AF-9DCF-9B7C6C41AE75
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1380734942
Partitions will be aligned on 32-sector boundaries
Total free space is 1380734909 sectors (658.4 GiB)
Number Start (sector) End (sector) Size Code Name
1 1920221984 3736432267 866.0 GiB 8300 Linux filesystem
2 1936028192 3889681299 931.6 GiB 8300 Linux filesystem
可能的原因是上面指出的分区表重叠。
在Windows分区上运行fixparts
,输出为:
ubuntu@ubuntu:~$ sudo fixparts /dev/sda5
...
Problem: MBR partitions 1 and 2 overlap!
Warning: Deleting oversized partition #1! Start = 1920221984, length = 1816210284
Warning: Deleting oversized partition #2! Start = 1936028192, length = 1953653108
MBR command (? for help):
我不太确定调整分区大小(如 fixparts 所示)是否能解决 Ubuntu 安装问题。
有了所有这些信息,有人能建议我该如何继续吗?