| 
 | 
 
########################直接启动配置############################ 
if [ :$bMainMenu: != :m: ];then 
 
#菜单默认为素颜 
set LANG=cn  
#设置中文菜单 
#set LANG=cn  
#设置英文菜单 
#set LANG=en  
#自定义中文字体(带路径) 
#set chinesefont=($boot)/efi/unicode.pf2 
if [ -n "$LANG" -a -e ($devcfg)/efi/unicode.pf2;then set chinesefont=($devcfg)/efi/unicode.pf2; fi 
#背景图片(带路径) 支持JPG/PNG 
#set mybackground=($curdrv)/efi/background.jpg 
if [ -n "$LANG" -a -e ($devcfg)/efi/background.jpg;then set mybackground=($devcfg)/efi/background.jpg; fi 
 
#函数loadlang ["中文字体文件/en/no/raw/auto"]  ["背景图片/no/auto"] 
#初始化屏幕,加载中文字体,加载图片。  
#空参数表示自动(auto) 
#字体 en/no:英文 
#raw:原本屏幕,相当于没调这个函数 
#图片 no:没有图片 
 
#8pe启动文件 
#set ldr=/efi/boot/boot${arch0}.efi 
 
 
############显示菜单############# 
if [ :$LANG: = :cn: -a  $CURLANG: != :cn: ];then clear; loadlang "$chinesefont"  "$mybackground"; fi 
if [ :$LANG: = :en: -a  $CURLANG: != :en: ];then clear; loadlang "en"  "$mybackground"; fi 
if [ -n "$LANG" -a -e ($devcfg)/efi/theme/theme.txt;then theme=($devcfg)/efi/theme/theme.txt; export theme; else 
  if [ -n "$LANG" -a -e ($boot)/efi/theme/theme.txt;then theme=($boot)/efi/theme/theme.txt; export theme;fi 
fi 
fi 
 
TITLEExt="PE(EFI) UDM Ext BOOT" 
TITLENor="PE(EFI) UDM Nor BOOT" 
TITLELinux="Start Slitaz Linux(EFI)" 
TITLEEfiShell="Start EFI SHELL" 
TITLEReboot=Reboot 
TITLEPoweroff="Power Off" 
TITLEDirectBCD="DIRECTLY BOOT BCD " 
TITLEEFIBCD="BOOT EFI-BCD" 
TITLEEFIBCDRET="RESTORE DISK" 
TITLELocalSystem="Local System" 
TITLELocalDiskPT="Local DiskSystem " 
HlpNoEfiLdr="No EFI Loader found! Reboot after 60 seconds:" 
FAILBACKS="(FAILBACK)" 
RETURNMAINMENU="RETURN MAIN MENU" 
HlpHalt="Sysytem is ready. I'll power off. Push Pown-On-Button manually." 
TITLERebootOrHalt="Switch reboot/poweroff for PE" 
__TITLE="EFI UDms BOOT MENU GRUB 2.02 ${arch0}" 
__PROMPT="grub>" 
__TIP_TIMOUT_T="The default menu will boot after %d seconds,enter any key yo cancel..." 
__TIP1_T="- enter <up><down> to select menu, or <Ener> to boot" 
__TIP2_T="- enter 'e' to edit then selected menu" 
__TIP3_T="- enter 'c' yo enter commandline" 
NO_MENU="NO MENU" 
TITLEUSR="USER PT" 
TITLMAINPT="Main PT" 
if [ :$CURLANG: = :cn: ];then 
  TITLEExt="PE(EFI) UDM 特别启动" 
  TITLENor="PE(EFI) UDM 正常启动" 
  TITLELinux="启动 Slitaz Linux 系 统" 
  TITLEEfiShell="启动EFI SHELL" 
  TITLEReboot="重启" 
  TITLEPoweroff="关机" 
  TITLEDirectBCD="直接启动BCD" 
  TITLEEFIBCD="启动 EFI-BCD" 
  TITLEEFIBCDRET="恢复磁盘" 
  TITLELocalSystem="本地系统" 
  TITLELocalDiskPT="本地硬盘系统" 
  HlpNoEfiLdr="没有找到 EFI Loader! 60秒后重启:" 
  FAILBACKS="(上次启动失败)" 
  RETURNMAINMENU="返回主菜单" 
  TITLERebootOrHalt="辅助重启/关机切换" 
  HlpHalt="系统已准备好。自动关机后,按开机按钮启动系统。" 
  __TITLE="EFI 多UDm启动菜单 GRUB 2.02 ${arch0}" 
  __TIP_EDIT="Emacs式的小型屏幕编辑器.TAB键补全. 按 Ctrl-x 或 F10 启动, Ctrl-c 或 F2 进入命令行,ESC 放弃编辑回到GRUB菜单." 
  __TIP1="用 %C 和 %C 键 选择并加亮菜单." 
  __TIP2="按回车键启动选择的系统菜单, 'e' 键编辑, 'c'键 进入命令行.ESC 返回之前的菜单." 
  __TIP3="按回车键启动选择的系统菜单, 'e' 键编辑, 'c'键 进入命令行." 
  __TIP_TIMOUT="高亮的菜单%d 秒后自动执行.";export __TIP_TIMOUT 
  __HEAD="BASH式的小型屏幕编辑器. 对于首词,TAB键补全. 其它地方TAB键列出可能的设备或文件. %s" 
  __HEAD_ESC="ESC退出." 
  __PROMPT="命令>" 
  __TIP_TIMOUT_T="默认选项系统将在 %d 秒后启动,按任意键可终止..." 
  __TIP1_T="- 按上下键选择高亮菜单,按回车键启动" 
  __TIP2_T="- 按 'e' 键编辑所选菜单的命令行" 
  __TIP3_T="- 按 'c' 进入程序命令行" 
  NO_MENU="无菜单" 
  TITLEUSR="用户区" 
  TITLMAINPT="主盘" 
fi 
if [ :$bMainMenu: != :m: ];then if [ $udm_boot != F ];then FAILBACKS=; RETURNMAINMENU=; fi; fi 
 
 
 
#颜色 
#set color_normal=green/black 
#set color_highlight=white/cyan 
#echo menu of /efi/mbrosefi.cfg;  sleep 15 
export boot_dev; export boot_part; set efihd=$boot_dev; export efihd; set efipt=1; export efipt 
 
function runwgo 
{ 
  set wgodiskf="$1" 
  set wldr=; set pager_bak="$pager"; set pager=0; unset wgo2 
  ifind -f ($rooti)/ "efi/ldr.wgo"  wgo2 
  if [ -n "$2" ];then ifind -f ($root_dev,$2)/ efi/boot/boot${arch0}.efi  wldr; fi 
  if [ -n "$wldr" ];then set root=($root_dev,$2); if chainloader $wldr;then Xclear; boot;fi; set wldr=; fi 
  if [ -z "$wldr" ];then 
  set wgodiskfx="${wgodiskf}"; if [ -z "$wgodiskfx" ];then set wgodiskfx=boot.vhd; fi 
  if [ -n "${wgodiskfx}" -a -n "$udmid" ];then ifind -f ($efihd,1)/ "udm${udmid}.${wgodiskfx}.ldr.efi"  wldr; fi 
  if [ -z "$wldr" -a -n "${wgodiskfx}" -a -n "$udmid" ];then ifind -f ($efihd,1)/ "udm${udmid}.${wgodiskfx}.ldr.efi.vhd"  wldr; fi 
  if [ -z "$wldr" -a -n "${wgodiskfx}" -a -n "$udmid" ];then ifind -f ($efihd,1)/ "udm${udmid}.${wgodiskfx}.ldr.efi.vhdx"  wldr; fi 
  #if [ -z "$wldr" -a -n "$rooti0" -a -n "${wgodiskf}" ];then ifind -f ($rooti0)/ "${wgodiskf}.ldr.efi"  wldr; fi 
  if [ -z "$wldr" -a -n "$rooti" -a -n "${wgodiskf}" ];then ifind -f ($rooti)/ "${wgodiskf}.ldr.efi"  wldr; fi 
  if [ -z "$wldr" -a -n "$rooti" -a -n "${wgodiskf}" ];then ifind -f ($rooti)/ "${wgodiskf}.ldr.efi.vhd"  wldr; fi 
  if [ -z "$wldr" -a -n "$rooti" -a -n "${wgodiskf}" ];then ifind -f ($rooti)/ "${wgodiskf}.ldr.efi.vhdx"  wldr; fi 
  if [ -z "$wldr" ];then ifind -f ($rooti)/ efi/ldr.efi  wldr; fi 
  if [ -z "$wldr" ];then ifind -f ($rooti)/ efi/ldr.efi.vhd  wldr; fi 
  if [ -z "$wldr" -a -n "$rooti0" -a -n "${wgodiskfx}" ];then ifind -f ($rooti0)/ "${wgodiskfx}.ldr.efi"  wldr; fi 
  if [ -z "$wldr" -a -n "$rooti0" -a -z "${wgodiskf}" ];then ifind -f ($rooti0)/ boot.vhd.ldr.efi  wldr; fi 
  if [ -z "$wldr" ];then ifind -f ($rooti)/ efi/ldr.vhd  wldr; fi 
  if [ -z "$wldr" ];then ifind -f ($rooti)/ efi/ldr.dat  wldr; fi 
  if [ -z "$wldr" ];then ifind -f ($rooti)/ efi/ldr.dat.vhd  wldr; fi 
  if [ -z "$wldr" ];then set wldr=($rooti)/efi/ldr.efi; fi 
  set wbcd=; 
  if [ -z "$wbcd" -a -n "${wgodiskfx}" -a -n "$udmid" ];then ifind -f ($efihd,1)/ "udm${udmid}.${wgodiskfx}.bcd_VHD"  wbcd; fi 
  if [ -z "$wbcd" -a -n "$rooti0" -a -n "${wgodiskf}" ];then ifind -f ($rooti0)/ "${wgodiskf}.bcd_VHD"  wbcd; fi 
  if [ -n "$wgo2" -a -z "$wbcd" -a -n "$rooti0" -a -n "${wgodiskfx}" ];then ifind -f ($rooti0)/ "${wgodiskfx}.bcd_VHD"  wbcd; fi 
  if [ -z "$wbcd" -a -n "$rooti" -a -n "${wgodiskf}" ];then ifind -f ($rooti)/ "${wgodiskf}.bcd_VHD"  wbcd; fi 
  if [ -z "$wgo2" -a -z "$wbcd" ];then ifind -f ($rooti)/ "$direfi/microsoft/boot/bcd_VHD"  wbcd; fi 
  if [ -z "$wbcd" -a -n "$rooti0" -a -z "${wgodiskf}" ];then ifind -f ($rooti0)/ boot.vhd.bcd_VHD  wbcd; fi 
  if [ -z "$wbcd" -a -n "$rooti0" -a -n "${wgodiskfx}" ];then set _= 
    if [ -n "$rooti" ];then ifind -f ($rooti)/ "efi/mbrosefi_qx.ini"  _; fi 
    if [ -z "$_" ];then ifind -f ($rooti0)/ "${wgodiskfx}.bcd_VHD0"  wbcd;fi; unset _ 
  fi 
  if [ -z "$wbcd" ];then set wbcd="($rooti)/$direfi/microsoft/boot/bcd_VHD"; fi 
  set _efi= 
  if [ -z "$_efi" -a -n "${wgodiskfx}" -a -n "$udmid" ];then ifind -f ($efihd,1)/ "udm${udmid}.${wgodiskfx}.boot${arch0}.efi" _efi; fi 
  if [ -z "$_efi" -a -n "$rooti0" -a -n "${wgodiskf}" ];then ifind -f ($rooti0)/ "${wgodiskf}.boot${arch0}.efi" _efi; fi 
  if [ -z "$_efi" -a -n "$rooti" -a -n "${wgodiskf}" ];then ifind -f ($rooti)/ "${wgodiskf}.boot${arch0}.efi" _efi; fi 
  if [ -n "$_efi" ];then set efi=$_efi;fi 
  if [ -z "$efi" ];then ifind -f ($rooti)/ efi/boot/boot${arch0}.efi.udm efi;fi 
  if [ -z "$efi" ];then ifind -f ($rooti)/ efi/boot/boot${arch0}.efi efi;fi 
  if [ -z "$efi" ];then ifind -f ($rooti)/ efi/boot/boot${arch0}.efi_wgs efi;fi 
  if [ -z "$efi" ];then set efi=($rooti)/efi/boot/boot${arch0}.efi;fi 
  set ptbcd=; if [ -n "$rooti0" -a $udm_part -gt 0 ];then ifind -f ($rooti0)/ ${wgodiskfx}.bcd ptbcd;fi 
  if [ -n "$ptbcd" ];then runudm  "@bcd=${ptbcd}"   "@boot${arch0}.efi=${efi}" 
  else runudm  "@bcd=${wbcd}"   "@boot${arch0}.efi=${efi}"   "@${wgodiskfx}=${wldr}"; fi 
  fi 
  set pager="$pager_bak"; unset pager_bak 
} 
export __TITLE; export __TIP_EDIT; export __TIP1; export __TIP2; export __TIP3; export __HEAD; export __HEAD_ESC; 
export TITLEExt; export TITLENor; export TITLEEfiShell; export TITLEReboot; export TITLEPoweroff; export FAILBACKS 
export HlpNoEfiLdr; export RETURNMAINMENU; export TITLERebootOrHalt; export HlpHalt; export TITLEDirectBCD; export TITLEEFIBCD; export TITLEEFIBCDRET; export TITLELocalDiskPT 
 
####################### 
 |   
 
 
 
 |