拔下 Ubuntu SSD 后笔记本电脑无法启动 - 移动 grub

拔下 Ubuntu SSD 后笔记本电脑无法启动 - 移动 grub

我有一台运行 Windows 10 的 MSI 笔记本电脑,出于工作目的,我在 SSD 上安装了 Ubuntu 20.04,运行良好

当我打开插入 SSD 的笔记本电脑时,会出现一个菜单,我可以在菜单中选择使用:

  • Ubuntu
  • Ubuntu(恢复模式)
  • Windows 10

从那时起我就可以选择我想要的一个,而且它运行良好

我的问题如下:当我打开装有 SSD 的笔记本电脑时不是插入电源后操作系统没有启动,我必须使用电源按钮关闭笔记本电脑

我每天都需要切换,所以我不想每次打开笔记本电脑时都进入 BIOS

我应该使用什么 BIOS 配置以便:

  • 当 SSD 未插入时:Windows 正常启动
  • 插入 SSD 后:Ubuntu 启动或者我必须选择(对我来说,两种方式都可以)

编辑:据我所知,我需要使用 将 grub 移动到我的 Windows 磁盘上grub-install,但是当我使用 查看磁盘时,fdisk -l我得到了很多结果。我应该选择哪个磁盘以及相应的命令行是什么?

以下是我得到的所有结果:

Disk /dev/loop0: 55,52 MiB, 58204160 bytes, 113680 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/loop1: 4 KiB, 4096 bytes, 8 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/loop2: 55,45 MiB, 58130432 bytes, 113536 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/loop3: 248,78 MiB, 260841472 bytes, 509456 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/loop4: 61,93 MiB, 64917504 bytes, 126792 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/loop5: 65,1 MiB, 68259840 bytes, 133320 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/loop6: 61,91 MiB, 64897024 bytes, 126752 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/loop7: 50,98 MiB, 53432320 bytes, 104360 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/nvme0n1: 476,96 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: KINGSTON OM8PCP3512F-AI1                
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: 7FA82927-BACB-47AD-89CA-8A0DC9CABADB

Device             Start        End   Sectors   Size Type
/dev/nvme0n1p1      2048     616447    614400   300M EFI System
/dev/nvme0n1p2    616448     878591    262144   128M Microsoft reserved
/dev/nvme0n1p3    878592  954718207 953839616 454,8G Microsoft basic data
/dev/nvme0n1p4 954718208  956561407   1843200   900M Windows recovery environment
/dev/nvme0n1p5 956561408 1000214527  43653120  20,8G Windows recovery environment


Disk /dev/sda: 465,78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Portable SSD T5 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0x2728b716

Device     Boot Start       End   Sectors   Size Id Type
/dev/sda1  *     2048 976773167 976771120 465,8G 83 Linux


Disk /dev/loop8: 129,4 MiB, 135671808 bytes, 264984 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/loop9: 65,22 MiB, 68378624 bytes, 133552 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/loop10: 219 MiB, 229638144 bytes, 448512 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/loop11: 43,6 MiB, 45703168 bytes, 89264 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/loop12: 219 MiB, 229638144 bytes, 448512 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/loop13: 295,73 MiB, 310079488 bytes, 605624 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/loop14: 64,87 MiB, 68001792 bytes, 132816 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/loop15: 54,24 MiB, 56872960 bytes, 111080 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

答案1

这是正常的,因为 GRUB 安装在你的 SSD 上。

在 UEFI/BIOS 中更改启动顺序并重新检查行为。但如果您想定期切换操作系统,您仍需要从启动菜单中进行选择。

我已经安装了双启动,但在同一磁盘上。同时,如果您使用 Windows 作为主启动,则可以在 GRUB 中更改启动顺序。

相关内容