我尝试了所示的替代方法这里在系统完全没有检测到 linux 引导加载程序后使用boot-repair
(只有 windows 选项和光盘(我不知道它为什么会出现)在 bios 启动顺序选项和启动菜单中)。现在 BIOS 检测到引导加载程序(ubuntu 已添加到列表中),但处于这种最小 bash 模式。
我必须输入以下几行才能使其显示通常的启动画面,就像我自定义的那样:
set root=(hd0, gpt5) (this is my root partition)
set prefix=(hd0, gpt5)/boot/grub
insmod normal
normal
为什么每次启动时都要输入这个?我该如何解决?我也尝试使用 boot-repair 完全重新安装 grub,勾选清除 grub 选项,但仍然不起作用
编辑:请求的信息
~ ❯ sudo parted -l
Model: SSSTC CL1-4D512 (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 274MB 273MB fat32 EFI system partition boot, esp
2 274MB 290MB 16.8MB Microsoft reserved partition msftres
3 290MB 262GB 262GB ntfs Basic data partition msftdata
5 262GB 510GB 248GB ext4 (Unlabelled root)
6 510GB 511GB 629MB fat32 (Unlabelled boot) boot, esp
4 511GB 512GB 1049MB ntfs Basic data partition hidden, diag
sudo cat /boot/efi/EFI/ubuntu/grub.cfg
cat: /boot/efi/EFI/ubuntu/grub.cfg: No such file or directory (this doesn't look good)
~ ❯ sudo ls /boot/efi/EFI
BOOT Linux pop Pop_OS-4ce634ae-abfa-41e3-8b20-28dabe16a83d systemd
~ ❯ sudo mount /dev/nvme0n1p6 /mnt
~ ❯ sudo ls -R /mnt
/mnt:
BootInfo boot-sav EFI loader 'System Volume Information'
/mnt/BootInfo:
FD
/mnt/BootInfo/FD:
sda
/mnt/BootInfo/FD/sda:
/mnt/boot-sav:
nvme0n1p1 nvme0n1p3 nvme0n1p4
/mnt/boot-sav/nvme0n1p1:
/mnt/boot-sav/nvme0n1p3:
/mnt/boot-sav/nvme0n1p4:
/mnt/EFI:
BOOT Linux pop Pop_OS-4ce634ae-abfa-41e3-8b20-28dabe16a83d systemd
/mnt/EFI/BOOT:
bkpbootx64.efi bootx64.efi fbx64.efi grubx64.efi mmx64.efi
/mnt/EFI/Linux:
/mnt/EFI/pop:
BOOTX64.CSV grub.cfg grubx64.efi mmx64.efi shimx64.efi
/mnt/EFI/Pop_OS-4ce634ae-abfa-41e3-8b20-28dabe16a83d:
cmdline initrd.img initrd.img-previous vmlinuz.efi vmlinuz-previous.efi
/mnt/EFI/systemd:
systemd-bootx64.efi
/mnt/loader:
entries loader.conf random-seed
/mnt/loader/entries:
Pop_OS-current.conf Pop_OS-oldkern.conf
'/mnt/System Volume Information':
~ ❯ sudo mount /dev/nvme0n1p1 /mnt
~ ❯ sudo ls -R /mnt
/mnt:
'$RECYCLE.BIN' BOOT EFI 'System Volume Information'
'/mnt/$RECYCLE.BIN':
desktop.ini
/mnt/BOOT:
BOOT.SDI
/mnt/EFI:
Boot Microsoft pop UpdateCapsule
/mnt/EFI/Boot:
bkpbootx64.efi bootx64.efi fbx64.efi grubx64.efi mmx64.efi
/mnt/EFI/Microsoft:
Boot Recovery
/mnt/EFI/Microsoft/Boot:
BCD bootmgfw.efi da-DK es-ES fr-CA ja-JP kd_02_15b3.dll kd_07_1415.dll lt-LT pl-PL ro-RO sv-SE zh-TW
BCD.LOG bootmgr.efi de-DE es-MX fr-FR kd_02_10df.dll kd_02_1969.dll kd_0C_8086.dll lv-LV pt-BR ru-RU tr-TR
BCD.LOG1 BOOTSTAT.DAT el-GR et-EE hr-HR kd_02_10ec.dll kd_02_19a2.dll kdnet_uart16550.dll memtest.efi pt-PT sk-SK uk-UA
BCD.LOG2 boot.stl en-GB fi-FI hu-HU kd_02_1137.dll kd_02_1af4.dll kdstub.dll nb-NO qps-ploc sl-SI winsipolicy.p7b
bg-BG cs-CZ en-US Fonts it-IT kd_02_14e4.dll kd_02_8086.dll ko-KR nl-NL Resources sr-Latn-RS zh-CN
/mnt/EFI/Microsoft/Boot/bg-BG:
bootmgfw.efi.mui bootmgr.efi.mui
/mnt/EFI/Microsoft/Boot/cs-CZ:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/da-DK:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/de-DE:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/el-GR:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/en-GB:
bootmgfw.efi.mui bootmgr.efi.mui
/mnt/EFI/Microsoft/Boot/en-US:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/es-ES:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/es-MX:
bootmgfw.efi.mui bootmgr.efi.mui
/mnt/EFI/Microsoft/Boot/et-EE:
bootmgfw.efi.mui bootmgr.efi.mui
/mnt/EFI/Microsoft/Boot/fi-FI:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/Fonts:
chs_boot.ttf jpn_boot.ttf malgun_boot.ttf meiryo_boot.ttf msjh_boot.ttf msyh_boot.ttf segmono_boot.ttf segoe_slboot.ttf
cht_boot.ttf kor_boot.ttf malgunn_boot.ttf meiryon_boot.ttf msjhn_boot.ttf msyhn_boot.ttf segoen_slboot.ttf wgl4_boot.ttf
/mnt/EFI/Microsoft/Boot/fr-CA:
bootmgfw.efi.mui bootmgr.efi.mui
/mnt/EFI/Microsoft/Boot/fr-FR:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/hr-HR:
bootmgfw.efi.mui bootmgr.efi.mui
/mnt/EFI/Microsoft/Boot/hu-HU:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/it-IT:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/ja-JP:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/ko-KR:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/lt-LT:
bootmgfw.efi.mui bootmgr.efi.mui
/mnt/EFI/Microsoft/Boot/lv-LV:
bootmgfw.efi.mui bootmgr.efi.mui
/mnt/EFI/Microsoft/Boot/nb-NO:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/nl-NL:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/pl-PL:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/pt-BR:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/pt-PT:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/qps-ploc:
memtest.efi.mui
/mnt/EFI/Microsoft/Boot/Resources:
bootres.dll en-US
/mnt/EFI/Microsoft/Boot/Resources/en-US:
bootres.dll.mui
/mnt/EFI/Microsoft/Boot/ro-RO:
bootmgfw.efi.mui bootmgr.efi.mui
/mnt/EFI/Microsoft/Boot/ru-RU:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/sk-SK:
bootmgfw.efi.mui bootmgr.efi.mui
/mnt/EFI/Microsoft/Boot/sl-SI:
bootmgfw.efi.mui bootmgr.efi.mui
/mnt/EFI/Microsoft/Boot/sr-Latn-RS:
bootmgfw.efi.mui bootmgr.efi.mui
/mnt/EFI/Microsoft/Boot/sv-SE:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/tr-TR:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/uk-UA:
bootmgfw.efi.mui bootmgr.efi.mui
/mnt/EFI/Microsoft/Boot/zh-CN:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Boot/zh-TW:
bootmgfw.efi.mui bootmgr.efi.mui memtest.efi.mui
/mnt/EFI/Microsoft/Recovery:
BCD BCD.LOG BCD.LOG1 BCD.LOG2
/mnt/EFI/pop:
grubx64.efi shimx64.efi
/mnt/EFI/UpdateCapsule:
CapsuleUpdateFile1000.bin
'/mnt/System Volume Information':
AadRecoveryPasswordDelete ClientRecoveryPasswordRotation IndexerVolumeGuid WPSettings.dat
'/mnt/System Volume Information/AadRecoveryPasswordDelete':
'/mnt/System Volume Information/ClientRecoveryPasswordRotation':
更新:没关系,电脑又坏了(不是我的原因,主板坏了第二次,希望能换掉整个主板)。感谢那些试图帮助我的人
答案1
因为你还没有修复 grub。到目前为止,你所做的只是允许自己从 grub 终端启动。完全启动后,你需要从终端输入以下内容:
sudo update-grub
sudo grub-install /dev/sda
shutdown -r now