[Bug #4900] 42系统集成uefi功能
修改: new_partition/interface_partition.py 新文件: operation/finish_install/99exec_install_efi.sh 修改: text/ri_newt.py Signed-off-by: zhang <dpzhang@linx-info.com>
This commit is contained in:
29
operation/finish_install/99exec_install_efi.sh
Executable file
29
operation/finish_install/99exec_install_efi.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
efimode=`cat /proc/cmdline | sed 's/.*efimode=\([^ ]*\).*/\1/'`
|
||||
upgrubcmd="/usr/sbin/update-grub"
|
||||
|
||||
if [ $efimode == "y" ];then
|
||||
|
||||
source ./functions
|
||||
|
||||
efi_dir="/Rocky/boot-efi"
|
||||
|
||||
mkdir -p $TARGET/boot/efi/efi/boot
|
||||
|
||||
cp ${efi_dir}/bootx64.efi $TARGET/boot/efi/efi/boot
|
||||
|
||||
cp -r ${efi_dir}/x86_64-efi $TARGET/boot/efi/efi/boot
|
||||
|
||||
cp $TARGET/boot/grub/grub.cfg $TARGET/boot/efi/efi/boot/x86_64-efi
|
||||
|
||||
#echo 'exec grub-mkconfig -o /boot/efi/efi/boot/x86_64-efi/grub.cfg $@ ' >> $TARGET/$upgrubcmd
|
||||
|
||||
sed -i 's/\/boot\/grub\/grub.cfg/\/boot\/efi\/efi\/boot\/x86_64-efi\/grub.cfg/' $TARGET/$upgrubcmd
|
||||
|
||||
ln -snf /boot/efi/efi/boot/x86_64-efi/grub.cfg $TARGET/boot/grub/grub.cfg
|
||||
|
||||
echo -e "Install efi successfully !"
|
||||
else
|
||||
echo -e "not efi mode !"
|
||||
fi
|
||||
Reference in New Issue
Block a user