Qubes 破坏了我的启动,如何重新启用 efi 启动?

Qubes 破坏了我的启动,如何重新启用 efi 启动?

我有一台“测试所有操作系统”笔记本电脑,运行 Windows 和 Ubuntu MATE,并使用 rEFInd 作为启动管理器。

昨天我安装了库布斯在驱动器的最后三分之一处。我从此读过为什么你不应该但对于只是测试操作系统我仍然不介意这样做。

不幸的是我无法再启动旧操作系统:es。 rEFInd 都没有。经过一番阅读后,我猜 Qubes 只是传统启动,但我不知道为什么它完全破坏了我对旧系统的 UEFI 启动。

Qubes 安装 grub 启动正常,但如果我尝试从中启动 rEFInd,则会失败:

grub> ls
(hd0) (hd0, gpt10) (hd0, gpt9) (hd0, gpt8) (hd0, gpt7) (hd0, gpt6) (hd0, gpt5) (hd0, gpt4) (hd0, gpt3) (hd0, gpt2) (hd0, gpt1)
grub> chainloader (hd0,gpt3)/efi/Boot/bootx64.efi
error: invalid signature

手动尝试选择 efi 文件如果计算机固件失败,当固件尝试列出硬盘驱动器中的可用 efi 文件时,鼠标甚至会挂起。

引导安装在拇指驱动器上的 rEFInd 工作正常,因此我得出结论,机器上的固件完好无损,但硬盘驱动器被 Qubes 安装程序弄乱了。

它对我的驱动器做了什么?我怎样才能恢复它?

答案1

使用 gdisk 查看驱动器呈现:

root@ubuntu-mate:~# gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): v

Warning: The 0xEE protective partition in the MBR is marked as active. This is
technically a violation of the GPT specification, and can cause some EFIs to
ignore the disk, but it is required to boot from a GPT disk on some BIOS-based
computers. You can clear this flag by creating a fresh protective MBR using
the 'n' option on the experts' menu.

No problems found. 2925 free sectors (1.4 MiB) available in 2
segments, the largest of which is 2014 (1007.0 KiB) in size.

按照 gdisk 的说明进行操作:

Command (? for help): ?   
b   back up GPT data to a file
c   change a partition's name
d   delete a partition
i   show detailed information on a partition
l   list known partition types
n   add a new partition
o   create a new empty GUID partition table (GPT)
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   sort partitions
t   change a partition's type code
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Command (? for help): r

Recovery/transformation command (? for help): ?
b   use backup GPT header (rebuilding main)
c   load backup partition table from disk (rebuilding main)
d   use main GPT header (rebuilding backup)
e   load main partition table from disk (rebuilding backup)
f   load MBR and build fresh GPT from it
g   convert GPT into MBR and exit
h   make hybrid MBR
i   show detailed information on a partition
l   load partition data from a backup file
m   return to main menu
o   print protective MBR data
p   print the partition table
q   quit without saving changes
t   transform BSD disklabel partition
v   verify disk
w   write table to disk and exit
x   extra functionality (experts only)
?   print this menu

Recovery/transformation command (? for help): x

Expert command (? for help): ?
a   set attributes
c   change partition GUID
d   display the sector alignment value
e   relocate backup data structures to the end of the disk
g   change disk GUID
h   recompute CHS values in protective/hybrid MBR
i   show detailed information on a partition
l   set the sector alignment value
m   return to main menu
n   create a new protective MBR
o   print protective MBR data
p   print the partition table
q   quit without saving changes
r   recovery and transformation options (experts only)
s   resize partition table
t   transpose two partition table entries
u   replicate partition table on new device
v   verify disk
w   write table to disk and exit
z   zap (destroy) GPT data structures and exit
?   print this menu

Expert command (? for help): n

Expert command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /dev/sda.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.

重新启动后,rEFInd 再次向我打招呼! Qubes 当然不会再启动了。

问题似乎出在 Qubes 创建的保护性 MBR 上。

相关内容