About grub2(fc30)

TAB for more information

Boot Entry

Linux

>root=(hd0,1) #linux img/linux root(hd0, gpt1), (hd1, msdos1)

>linux /boot/linuz-X.X.X.img root=/dev/sdb1

>initrd /boot/initramfs-X.X.X

>boot

 

Windows

>insmod fat #fat ex4

>set root=(hd0, gpt1) #windows efi root (hd1,msdos1)

>chainloader /efi/Microsoft/Boot/bootmgfw.efi or  chainloader /EFI/boot/bootx64.efi  or chainloader +1

>boot

 

 Change Default Entry

grub.cfg:/boot/grub2/grub.cfg

### BEGIN /etc/grub.d/00_header ###
...
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi
 

With Linux(fedora)

Q:grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.

A:sudo dnf install x86_64:grub2-efi-x64*

###update grub

grub2-mkconfig -o /boot/grub2/grub.cfg

 

posted @ 2020-03-15 10:40  sciapex  阅读(238)  评论(0编辑  收藏  举报