2018年12月12日 星期三

grub2 for uefi

shim
grub2-efi

yum (re)install shim grub2-efi --installroot=/
remove all files underneath / exclude everything underneath ./boot/efi/EFI

rename ./boot/efi/EFI/redhat to ./boot/efi/EFI/QCT
patch ./boot/efi/EFI/QCT/*.CSV

Generate grub.cfg

for UEFI
rm -rf /dev/shm/firmware/*
mkdir -p /dev/shm/firmware/efi
mount -o bind /dev/shm/firmware /sys/firmware
grub2-mkconfig -o ./boot/efi/EFI/QCT/grub.cfg
umount  /sys/firmware

for Legacy
rm -rf /dev/shm/firmware/*
mkdir -p /dev/shm/firmware/
mount -o bind /dev/shm/firmware /sys/firmware
grub2-mkconfig -o ./boot/grub2/grub.cfg
umount  /sys/firmware

customize menuentry
/etc/os-release

沒有留言: