无忧启动论坛

标题: ufi 启动模板 [打印本页]

作者: yhhxlp    时间: 2015-7-10 21:02
标题: ufi 启动模板
这是个不成熟的半成品,由于本人时间有限,搞了几个晚上,也才搞成个半成品给大家共同讨论,希望有技术有精神的人把它搞好!
ufi启动shell菜单后再引导其他菜单xorboot grub2  refind 等等菜单
主要菜单 startup.nsh yhhxlp64.nsh yhhxlp32.nsh
grub2  菜单 请自己学习后改写
refind菜单请学习http://bbs.wuyou.net/forum.php?mod=viewthread&tid=369552

xorboot菜单请http://bbs.wuyou.net/forum.php?m ... &extra=page%3D1学习

其他的也自己学习 我也不会 哈哈哈

先来说说 startup.nsh菜单

echo -off
#测试系统是32位还是64位
echo Platform : %Platform%
if %Platform% == x86 then
  goto 32BIT
endif
if %Platform% == x64 then
  goto 64BIT
else
  echo Accident1,Can't use this U disk tool.
  echo Please remake the USB Memory.
  goto END
endif


:32BIT
for %i in 0 1 2 3 4 5 6 7 8 9
  if exist fs%i:EFI\yhh then
    echo EFI Volume: fs%i
    fs%i:
    cd efi\32bit
    goto FOUND_32BIT
  endif
endfor

echo Accident2,Can't use this U disk tool.
  echo Please remake the USB Memory.
goto END
  
:FOUND_32BIT
  yhhxlp32.nsh
  goto END


:64BIT
for %i in 0 1 2 3 4 5 6 7 8 9
  if exist fs%i:EFI\yhh then
    echo EFI Volume: fs%i
    fs%i:
    cd efi\64bit
    goto FOUND_64BIT
  endif
endfor

echo Accident3,Can't use this U disk tool.
  echo Please remake the USB Memory.
goto END
  
:FOUND_64BIT
  yhhxlp64.nsh
  goto END
  
:END

自动认x86或x64系统 后自动跳到该系统菜单
以x64系统为列yhhxlp64.nsh
echo -off
CD yhhxlp64
:MAIN_MENU
cls
echo ******************************************************************
echo ************************[www.4068.net]****************************
echo ******************************************************************
echo [1] win8pex64
echo [2] xorboot
echo [3] grubx64
echo [4] refind_x64
echo [5] konbootdxe
echo [6] r*e*s*e*t*
echo [7] Samsung
echo [8] memtestx
echo [9] reset
echo [0] Exit to UEFI Shell
echo ******************************************************************
#这个是输入efi
ValueInput.efi /msg "Select a menu ..." /var:InputValue /len:1
if %InputValue% == 1 then
  goto win8pex64
endif
if %InputValue% == 2 then
  goto xorboot
endif
if %InputValue% == 3 then
  goto grubx64
endif
if %InputValue% == 4 then
  goto refind_x64
endif
if %InputValue% == 5 then
  goto konbootdxe
endif
if %InputValue% == 6 then
  goto end
endif
if %InputValue% == 7 then
  goto Samsung
endif
if %InputValue% == 8 then
  goto memtestx
endif
if %InputValue% == 9 then
  goto reset
endif
if %InputValue% == 0 then
  goto FINISH
else
  goto MAIN_MENU
endif
goto FINISH
#*******************************************pause***********************
#这个我还没测试成功
:pause
pause 5
goto xorboot
#******************************************win8pex64********************
#多个pe菜单 我还没测试  不过一个还是没问题的
:win8pex64
cls
CD \
CD EFI\microsoft\boot
bootmgfw.efi
goto MAIN_MENU
# **********************************refind_x64**************************
:refind_x64
cls
CD \
CD EFI\boot
refind_x64.efi
goto MAIN_MENU
#--------------------xorboot--------------------------------
:xorboot
cls
CD \
CD EFI\boot
xorboot.efi
goto MAIN_MENU
#----------------------grubx64------------------------------
:grubx64
cls
CD \
CD EFI\boot
grubx64.efi
#------------------------konbootdxe-------------------------
#这个测试不成功 就是绕过密码的启动系统的东西
:konbootdxe
cls
cd \
cd efi\boot
KonBootDxeX64.efi
#-----------------------Samsung ---------------------
:Samsung
cls
cd \
cd efi\boot
Samsung.nsh
goto MAIN_MENU

#-----------------------------memtestx--------------------------------------
#内存测试efi
:memtestx
cls
cd \
cd efi\boot
MEMTESTX64.efi
#----------------------------reset-------------------------------------------
#重启
:reset
cls
reset
#----------------------- Finish ---------------------
:FINISH
CD ..
cls
#--------------------------double_finish--------------------------------------
:DOUBLE_FINISH
CD ..
cd ..
cd ..
echo exit menu.
#--------------------------end------------------------------------
:end

很多东西 还不明白 shell的用法也知道的太少  百度也搜不到太多东西 google又上不了 悲剧中
本人认为shell菜单兼容性应该是最好的 哈哈哈 瞎猜的
http://pan.baidu.com/s/1mg7W5eg


哈哈哈  再发几张测试照片吧






不看帖子的 发个妹子 给大家看看





dark_no_shadow.png (1.87 MB, 下载次数: 152)

dark_no_shadow.png

作者: yhhxlp    时间: 2015-7-10 21:06
求efi shell  2.5版本

求最新的版本 哈哈哈  自己不会搞 只能要现成的了
作者: 寒风飘过    时间: 2015-7-10 22:42
你的 shell是什么版本   我的是2.0  目前不会用

作者: tulongwa    时间: 2015-7-11 09:30
本帖最后由 tulongwa 于 2015-7-11 09:32 编辑

完全看不懂,不过在网上找到了一篇文章。
EFI Shell命令的使用说明
http://blog.sina.com.cn/s/blog_4a44ac500100g6rh.html
博主还有几篇关于UEFI的文章
作者: gaowazou    时间: 2015-7-11 15:26
图片很清纯
作者: 2011wanggq    时间: 2015-7-13 23:23
我只是看到美女才来在这里了;。
作者: 4401    时间: 2015-7-14 17:12
美颜过渡,人物失真!
作者: zhoubin    时间: 2015-9-23 09:08
本帖最后由 zhoubin 于 2015-9-23 09:40 编辑

光盘能用不,光盘引导文件有没有?
konbootdxe是不是应该引导:
  1. efi\boot\KONBOOT64.EFI          `KONBOOT光盘\efi\boot\bootx64.EFI改名而来
  2. efi\boot\KONBOOT32.efi          `KONBOOT光盘\efi\boot\bootia32.EFI改名而来
复制代码

KonBoot光盘在:[求助] 谁会做UEFI版的konboot ,具体没有条件测试...
你试试看吧!!!
另外,如果合盘的话:
  1. efi\boot\bootx64.EFI
  2. efi\boot\bootia32.efi
复制代码

这两个文件和我的光盘里的文件同名,该怎么处理?
你提供的启动模板文件有点多,能不能再精简掉些?
谢谢楼主!!!
作者: devilma    时间: 2015-9-24 12:23
不错,试试看,谢谢楼主的美女图片
作者: tulongwa    时间: 2015-10-17 10:27
我进入gurb菜单以后,选择引导x64PE,
menuentry "☆ 启动UEFI主板的64-bit PE系统(如果有)" --class windows --class os {
search --no-floppy --file --set=root /EFI/boot/bootx64.efi
chainloader /EFI/boot/bootx64.efi
}
但是出现这个
http://wuyou.net/forum.php?mod=attachment&aid=MjI5NDgyfGFlYTFmMThhODgwYzVlMzM2NWM5YWQ3YzlmODJkYzk3fDE3MTUyNTg0MjY%3D&request=yes&_f=.jpg
然后就回到了主菜单界面

新建截图-20151017102339.jpg (27.34 KB, 下载次数: 147)

新建截图-20151017102339.jpg

作者: tulongwa    时间: 2015-10-17 15:30
解决了,是bootx64.efi文件位置没放对,不过又发现你的文件包里缺少grubx32.efi文件,希望补齐,谢谢!
作者: tulongwa    时间: 2015-10-19 18:35
最好顺便开启gurb2的中文模式和自定义背景




欢迎光临 无忧启动论坛 (http://wuyou.net/) Powered by Discuz! X3.3