我尝试安装 Ubuntu 18.04,但安装失败grub2
,并且我丢失了以前的操作系统,因为我使用(Ubuntu)iso 文件从 grub 菜单进行安装,而我的 BIOS 不允许我从 USB 驱动器启动。
现在我可以重新安装 Ubuntu Xenial(之前就在那里),但我的笔记本电脑说它看不到可启动设备,我应该安装操作系统。我可以使用该boot from UEFI file
选项进行启动,然后从我的电脑上看到以下输出efibootmgr
:
$ sudo efibootmgr -v
BootCurrent: 003D
BootOrder: 0000,3000,2001,2002,2003
Boot0000* ubuntu HD(1,GPT,8ccf22f4-daf3-4aa6-80af-1a7ed10b68dd,0x800,0x100000)/File(\EFI\ubuntu\shimx64.efi)
Boot2001* USB Drive (UEFI) RC
Boot2002* Internal CD/DVD ROM Drive (UEFI) RC
Boot3000* Internal Hard Disk or Solid State Disk RC
Boot3001* Internal Hard Disk or Solid State Disk RC
Boot3002* Internal Hard Disk or Solid State Disk RC
Boot3003* Internal Hard Disk or Solid State Disk RC
我注意到我有这个:BootCurrent: 003D
,我希望看到Boot****
所以我不确定是什么003D
意思以及如何让我的系统正常启动。
我按照建议尝试了几种选择:
https://ubuntuforums.org/showthread.php?t=2147295,
https://ubuntuforums.org/showthread.php?t=2238714
这是我/boot/efi
按照上面链接中的说明操作后的文件夹结构:
.
└── EFI
├── Boot
│ └── bootmgfw.efi
├── Microsoft
│ └── Boot
│ └── bootmgfw.efi
└── ubuntu
├── fw
├── fwupx64.efi
├── grub.cfg
├── grubx64.efi
├── mmx64.efi
└── shimx64.efi
我还注意到,当我尝试运行以下命令时会得到此结果:
sudo efibootmgr -c -L "UEFI Hard Drive" -l "\EFI\Boot\bootx64.efi"
efibootmgr: Could not set variable Boot0001: No such file or directory
efibootmgr: Could not prepare boot variable: No such file or directory
显然我缺少file
或目录needed by
efibootmgr`。
这是我的分区方案:
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 vfat 7086-1111 /boot/efi
├─sda2 ext4 69a49ce7-993e-4fc3-8ad1-062041b7e411 /
└─sda3 swap 340dd345-6ac1-4772-b014-9e508124b371 [SWAP]
来自sudo gdisk /dev/sda
:
Number Start (sector) End (sector) Size Code Name
1 2048 1050623 512.0 MiB EF00 EFI System Partition
2 1050624 1936889855 923.1 GiB 8300
3 1936889856 1953523711 7.9 GiB 8200
运行sudo efibootmgr -c -L "Windows Boot Manager" -l "\EFI\Boot\shimx64.efi"
出现如下错误:
efibootmgr: Could not set variable Boot0001: No such file or directory
efibootmgr: Could not prepare boot variable: No such file or directory
更新:
我仍在尝试恢复我的正常启动行为,并使用了该命令sudo bootctl --path /boot/efi status
并得到了以下结果:
Failed to read EFI variable LoaderDevicePartUUID: No such file or directory
System:
Firmware: n/a (n/a)
Secure Boot: disabled
Setup Mode: user
Loader:
Product: n/a
Partition: n/a
File: └─n/a
Boot Loader Binaries:
ESP: /dev/disk/by-partuuid/570d26cf-ecca-489b-849b-e1a562b99226
systemd-boot not installed in ESP.
File: └─/EFI/Boot/bootmgfw.efi
Boot Loader Entries in EFI Variables:
Title: ubuntu
ID: 0x0000
Status: active, boot-order
Partition: /dev/disk/by-partuuid/8ccf22f4-daf3-4aa6-80af-1a7ed10b68dd
File: └─/EFI/ubuntu/shimx64.efi
有人可以帮忙翻译一下吗?
我已经添加了文件夹的树形布局/boot/efi
,有人可以告诉我是否有任何问题:
.
├── EFI
│ ├── BOOT
│ │ ├── bootmgfw.efi
│ │ └── BOOTX64.EFI
│ ├── Microsoft
│ │ └── bootmgfw.efi
│ ├── systemd
│ │ └── systemd-bootx64.efi
│ └── ubuntu
│ ├── fw
│ ├── fwupx64.efi
│ ├── grub.cfg
│ ├── grubx64.efi
│ ├── mmx64.efi
│ └── shimx64.efi
└── loader
├── entries
└── loader.conf