首页 > 其他 > 详细

legacy/uefi 双启动

时间:2020-05-30 14:18:35      阅读:60      评论:0      收藏:0      [点我收藏+]

分区要求:

1  biosboot

2  EFi  分区

3 根分区

分区顺序 根分区要求必须是最后一个,不然根分区没法扩展

 

大致步骤

1 安装vm 从uefi 启动。

2 安装bios 的grub、 grub2-install  grub2-mkconfig  sed linuxefi/linux  grub.cfg

这样 vm 镜像 从 uefi/legacy 就都可以启动了.

问题,这样的镜像有2份 grub

1  ESP/distio/grub.cfg

2  /boot/grub2/grub/cfg

legacy/uefi 各自使用一份grub  不好维护。

 

使用 BOOT_LOADER_SPECIFICATION  可以做到兼容。使用同一份grub(efi 的)

bios 的

search --no-floppy --set efi --file /efi/distro/grub.cfg
configfile ($efi)/efi/distro/grub.cfg

 

boot 分区要求必须是 vfat 格式的。 

 

We define two directories below $BOOT:

  • $BOOT/loader/ is the directory containing all files needed for Type #1 entries
  • $BOOT/loader/entries/ is the directory containing the drop-in snippets. This directory contains one .conf file for each boot menu item.

Note: In all cases the /loader/ directory should be located directly in the root of the file system.

Specifically, if $BOOT is the ESP, then /loader/ directory should be located directly in the root directory of the ESP, and not in the /EFI/ subdirectory.

 

如果是bios 启动的, loader 目录应该放在根目录下面

如果是uefi 启动的。boot 在EFI 分区下, loader 目录应该在EFI 分区的根目录下面,/boot/efi     应该在/boot 下面,而不是  /boot/efi 的子目录下面。

 

legacy/uefi 双启动

原文:https://www.cnblogs.com/jkklearn/p/12991876.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!