Windows 10 双启动问题

Windows 10 双启动问题

我已经从 DVD 安装了 Ubuntu 16,但仍然只能使用 Windows 10 登录。我选择了“与 Windows 10 一起安装”选项,并让它自动调整磁盘大小。

如何在登录时看到 Ubuntu?

sudo fdisk -l

上面的 cmd 输出:

Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/loop0: 1.4 GiB, 1459982336 bytes, 2851528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 21CEDCE4-4D19-414B-B17E-ABAD653E02D1

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    3606527    1024000   500M Lenovo boot partition
/dev/sda4     3606528    3868671     262144   128M Microsoft reserved
/dev/sda5     3868672 1037878334 1034009663 493.1G Microsoft basic data
/dev/sda6  1902323712 1953523711   51200000  24.4G Windows recovery environment
/dev/sda7  1037879296 1886214143  848334848 404.5G Linux filesystem
/dev/sda8  1886214144 1902323711   16109568   7.7G Linux swap

分区表条目不按磁盘顺序排列。

sudo fdisk -l /dev/sd*
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 21CEDCE4-4D19-414B-B17E-ABAD653E02D1

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    3606527    1024000   500M Lenovo boot partition
/dev/sda4     3606528    3868671     262144   128M Microsoft reserved
/dev/sda5     3868672 1037878334 1034009663 493.1G Microsoft basic data
/dev/sda6  1902323712 1953523711   51200000  24.4G Windows recovery environment
/dev/sda7  1037879296 1886214143  848334848 404.5G Linux filesystem
/dev/sda8  1886214144 1902323711   16109568   7.7G Linux swap

Partition table entries are not in disk order.
Disk /dev/sda1: 1000 MiB, 1048576000 bytes, 2048000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x73736572

Device      Boot      Start        End    Sectors   Size Id Type
/dev/sda1p1      1920221984 3736432267 1816210284   866G 72 unknown
/dev/sda1p2      1936028192 3889681299 1953653108 931.6G 6c unknown
/dev/sda1p3               0          0          0     0B  0 Empty
/dev/sda1p4        27722122   27722568        447 223.5K  0 Empty

Partition 4 does not start on physical sector boundary.
Partition table entries are not in disk order.
Disk /dev/sda2: 260 MiB, 272629760 bytes, 532480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x500a0dff

Device      Boot      Start        End    Sectors   Size Id Type
/dev/sda2p1      1948285285 3650263507 1701978223 811.6G 6e unknown
/dev/sda2p2               0          0          0     0B 74 unknown
/dev/sda2p4        28049408   28049848        441 220.5K  0 Empty

Partition 1 does not start on physical sector boundary.
Partition table entries are not in disk order.
Disk /dev/sda3: 500 MiB, 524288000 bytes, 1024000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x500a0dff

Device      Boot      Start        End    Sectors   Size Id Type
/dev/sda3p1      1948285285 3650263507 1701978223 811.6G 6e unknown
/dev/sda3p2               0          0          0     0B 74 unknown
/dev/sda3p4        28049408   28049848        441 220.5K  0 Empty

Partition 1 does not start on physical sector boundary.
Partition table entries are not in disk order.
Disk /dev/sda4: 128 MiB, 134217728 bytes, 262144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sda5: 493.1 GiB, 529412947456 bytes, 1034009663 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x73736572

Device      Boot      Start        End    Sectors   Size Id Type
/dev/sda5p1      1920221984 3736432267 1816210284   866G 72 unknown
/dev/sda5p2      1936028192 3889681299 1953653108 931.6G 6c unknown
/dev/sda5p3               0          0          0     0B  0 Empty
/dev/sda5p4        27722122   27722568        447 223.5K  0 Empty

Partition 4 does not start on physical sector boundary.
Partition table entries are not in disk order.
Disk /dev/sda6: 24.4 GiB, 26214400000 bytes, 51200000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x73736572

Device      Boot      Start        End    Sectors   Size Id Type
/dev/sda6p1      1920221984 3736432267 1816210284   866G 72 unknown
/dev/sda6p2      1936028192 3889681299 1953653108 931.6G 6c unknown
/dev/sda6p3               0          0          0     0B  0 Empty
/dev/sda6p4        27722122   27722568        447 223.5K  0 Empty

Partition 4 does not start on physical sector boundary.
Partition table entries are not in disk order.
Disk /dev/sda7: 404.5 GiB, 434347442176 bytes, 848334848 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sda8: 7.7 GiB, 8248098816 bytes, 16109568 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
ubuntu@ubuntu:~$ 

答案1

看起来您可能无意中将 grub 安装在了错误的驱动器上……可能是分区或 USB 驱动器上。

确保 Grub 安装在特定的启动驱动器上(最有可能/dev/sda)。您可以按照以下步骤重新安装 grub:

启动到您的实时媒体(您的实时 ubuntu 安装磁盘或 USB 棒)。运行该Try Ubuntu选项。然后转到终端 shell 并运行以下命令:

步骤1:

$ sudo mount /dev/sdaX /mnt # Make "X" the partition that has Ubuntu installed (i.e. /dev/sda2)

第2步:

$ for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt/$i"; done

步骤3:

$ sudo chroot /mnt

步骤4:

# update-grub

步骤5:

# grub-install /dev/sdX # (x is the hard drive that has linux installed (i.e. /dev/sda)
    update-grub

现在重新启动系统。


$ sudo fdisk -l /dev/sd*在我的系统上使用该命令显示:

Device     Boot     Start        End    Sectors  Size Id Type
/dev/sda1            2048  102402047  102400000 48.8G 83 Linux
/dev/sda2  *    102402048  204802047  102400000 48.8G 83 Linux
/dev/sda3       204802048  245762047   40960000 19.5G 82 Linux swap / Solaris
/dev/sda4       245762048 3907028991 3661266944  1.7T 83 Linux

在此示例中,Linux 安装在/dev/sda1和上/dev/sda2


最终解决方案

该问题已通过聊天解决,确保安装在 UEFI 模式下执行并选择UbuntuBios 启动选项。

Ubuntu 在 Grub 菜单中同时显示 Windows 和 Ubuntu 菜单选项。如果将 Bio Boot 选项(顺序)设置为,Windows系统将直接启动到 Windows。Windows 无法识别其他安装的操作系统。

相关内容