缺少 /etc/default/grub/ 文件。需要编辑启动顺序。Grub 重新安装似乎无法重新生成它

缺少 /etc/default/grub/ 文件。需要编辑启动顺序。Grub 重新安装似乎无法重新生成它

我有一台 EFI 双启动 Win10/Ubuntu 18.04 Surface-Linux 机器。全新安装运行良好。我可以毫无问题地浏览 grub 菜单,并且我已验证 Linux 已安装在 efi 分区中。

由于某种原因,我没有/ect/default/grub应该生成的文件。我已经运行了命令sudo update-grub。我还重新安装并清除了 grub(无论如何我相信,再次列出命令,我会运行它)。

我需要此文件的原因(系统没有其他问题,不打算重新安装)是因为 Surface 修改了内核,我已经下载了一个,希望它成为 grub 菜单中自动启动的选项。grub 目前运行良好,据我所见没有列出任何错误。

感谢您的帮助。当我最初在旧的 Windows 10 上安装 ubuntu 时,我在 Windows 上分离了分区。我从 USB 安装了 Linux - 并且有 20 GB 的 / 和 70 GB 的 /home 以及 16 GB 的交换空间。

这是我的fdisk -l输出:

Disk /dev/loop0: 3.7 MiB, 3887104 bytes, 7592 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: 34.7 MiB, 36323328 bytes, 70944 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: 2.3 MiB, 2355200 bytes, 4600 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: 14.5 MiB, 15208448 bytes, 29704 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: 2.3 MiB, 2433024 bytes, 4752 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: 87.9 MiB, 92114944 bytes, 179912 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: 13 MiB, 13619200 bytes, 26600 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: 86.9 MiB, 91099136 bytes, 177928 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: 238.5 GiB, 256060514304 bytes, 500118192 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
Disklabel type: gpt
Disk identifier: F52F55BD-D86F-443D-B197-124D7B418188

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048    534527    532480   260M EFI System
/dev/nvme0n1p2    534528    796671    262144   128M Microsoft reserved
/dev/nvme0n1p3    796672 215191551 214394880 102.2G Microsoft basic data
/dev/nvme0n1p4 215191552 291303423  76111872  36.3G Microsoft basic data
/dev/nvme0n1p5 496103424 500117503   4014080   1.9G Windows recovery environment
/dev/nvme0n1p6 291303424 322553855  31250432  14.9G Linux swap
/dev/nvme0n1p7 322553856 361615359  39061504  18.6G Linux filesystem
/dev/nvme0n1p8 361615360 496103423 134488064  64.1G Linux filesystem

Partition table entries are not in disk order.


Disk /dev/loop8: 13 MiB, 13619200 bytes, 26600 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: 140.9 MiB, 147722240 bytes, 288520 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: 173.3 MiB, 181760000 bytes, 355000 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: 140.7 MiB, 147496960 bytes, 288080 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: 34.2 MiB, 35827712 bytes, 69976 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: 3.7 MiB, 3878912 bytes, 7576 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: 14.5 MiB, 15196160 bytes, 29680 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

我不知道所有循环内容是什么,但是 efi 分区是 p1、windows、随机 ntfs 分区和 p3/p4/p5 上的 windows 恢复 - linux 是 p6、p7、p8。

再次感谢有关如何获取 grub-customizer/生成文件的任何建议/ect/default/grub!!!

相关内容