日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux 单文件4g,[史上最伟大网管]miniLinux网启server撒旦单文件版使用技巧和ipxe脚本解释20190814...

發布時間:2023/12/31 linux 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux 单文件4g,[史上最伟大网管]miniLinux网启server撒旦单文件版使用技巧和ipxe脚本解释20190814... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

本帖最后由 江南一根蔥 于 2019-8-14 19:27 編輯

工具及下載鏈接:http://bbs.wuyou.net/forum.php?mod=viewthread&tid=415752&page=1&extra=#pid3836856

前炎:向睪手丸家們致敬,睪手就不需要細看帖子享受我的班門弄腐了,本帖適合入門學習黨,比如會問“為什么 啟不來pe啊?為什么開機執行不了我指定的批處理啊?”這類菜鳥(我是老菜鳥)新手玩家(95后00后叫萌新)

傳統bios:直接用我的tftpboot目錄,啟動時會chain app/config/tinycore.ipxe,對此腳本文件的建議和解釋如下:

#!ipxe

#這句腳本是讀取本地文件用,不用管

ifopen net0

#同上

ifstat

#設置pe的路徑

set pe64wimfile= /boot/pe64.wim

set pe32wimfile= /boot/pe32.wim

#設置efi和bios下環境的不同菜單

iseq ${platform} pcbios && set mainmenu grub4dos ||

iseq ${platform} efi && set mainmenu grub2 ||

#這個我自己調試用的

set getfile /app/config/tinycore.ipxe

#設置菜單超時時間

set menu-timeout 8000

#設置菜單默認選中啟動的項

set menu-default netgrubfm

:boot

#找不到next-server變量就把dhcp-server的變量值給它

isset ${next-server} || set next-server ${dhcp-server}

#找不到proxydhcp/next-server變量就把proxydhcp/dhcp-server的變量值給它

isset ${proxydhcp/next-server} || set proxydhcp/next-server ${proxydhcp/dhcp-server}

#如果proxydhcp/next-server變量值存在,那么賦給booturl,不然就使用next-server的變量值

isset ${proxydhcp/next-server} && set booturl ${proxydhcp/next-server} || set booturl ${next-server}

#備用 prompt --key 0x02 --timeout 2000 Press Ctrl-B for the iPXE command line... && shell ||

:menu

goto start

#菜單項我就不解釋了

:start

menu Choose An Existing Server!??Serverip:${serverip} bootfile: ${getfile}

item --gap --? ?? ?? ?? ? --------------------------------PXE BOOT-----------------------------

item ${mainmenu}? ?? ?? ? ${mainmenu} menu

item win10pex64? ?? ?? ???win10pe x64

item win10pex32? ?? ?? ???win10pe x32

item gitcloud? ?? ?? ?? ?? ?? ? Cloud Boot

item retry? ?? ?? ?? ?? ?? ?? ?? ? set filename

item --gap --? ?? ?? ?? ? ---------------------------- Advanced options -----------------------

item --key c config? ?? ? Configure settings? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ???-- c

item --key p pxelinux? ???Load PXELinux menu? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ???-- p

item shell? ?? ?? ?? ?? ? Drop to iPXE shell

item reboot? ?? ?? ?? ?? ?Reboot computer

item --key x exit? ?? ?? ?Exit iPXE and continue BIOS boot? ?? ?? ?? ?? ?? ?? ?-- x

choose --timeout ${menu-timeout} --default ${menu-default} selected

goto ${selected}

#云啟動

:gitcloud

echo Cloud Boot

goto start

#啟動bios版grub2文件管理器

:grub4dos

set next-server ${proxydhcp/next-server} && chain tftp://${booturl}/grub4dos/managerpxe ||

goto retryip

:grub2

isset ${proxydhcp/dhcp-server} && imgexec http://${proxydhcp/dhcp-server}/grub2/grubfmx64.efi proxydhcp=${proxydhcp/dhcp-server} ||

imgexec http://${dhcp-server}/grub2/grubfmx64.efi proxydhcp=${dhcp-server}

goto retryip

:wimboot

#假如取文件失敗就換個地址

kernel http://${booturl}/app/wimboot/wimboot || goto retryip

#前方高能!這個ghost.bat最終會出現在你所有pe的X:\windows\system32目錄下,不要再問來問去怎么啟動pxeautorun.txt了!取不到說明你沒放,會繼續啟動

#如果是我提供的pe,進入系統后會自動執行ghost.bat

initrd http://${booturl}/app/bat/ghost.bat ghost.bat || goto nextg

:nextg

#在bios和efi不同環境取相應的文件

iseq ${platform} pcbios && initrd http://${booturl}/app/wimboot/bootmgr??bootmgr ||

iseq ${platform} efi? ? && initrd http://${booturl}/app/wimboot/bootmgfw.efi bootx64.efi ||

iseq ${platform} pcbios && initrd http://${booturl}/app/wimboot/biosbcd??bcd ||

iseq ${platform} efi? ? && initrd http://${booturl}/app/wimboot/bcd??bcd ||

initrd http://${booturl}/app/wimboot/boot.sdi? ?boot.sdi??|| goto retry

initrd -n boot.wim http://${booturl}${wimfile} || goto retry

boot || goto retry

#設置選擇win10pe x64并啟動

:win10pex64

set wimfile ${pe64wimfile=}

goto wimboot

#設置選擇win10pe x32并啟動

:win10pex32

set wimfile ${pe32wimfile=}

goto wimboot

#我的云啟動

:retry

console

echo set Filename

read getfile

set menu-default gitcloud

goto start

#如果當前booturl變量值是proxydhcp/next-server,那么就換成next-server,反之亦然,我瞎寫的,不知道語法有沒有問題

:retryip

issq ${booturl} ${proxydhcp/next-server} && set booturl ${next-server} && goto start ||

set booturl ${proxydhcp/next-server} && goto start

#下面都是些進入命令行模式,重啟,退出,關機之類的,還有些備用項目,不用解釋

:shell

echo Type 'exit' to get the back to the menu

shell

goto start

:failed

echo Booting failed, dropping to shell

goto shell

:reboot

reboot

:exit

exit

:config

config

goto start

腳本應該還有些錯誤,待閑時更新

總結

以上是生活随笔為你收集整理的linux 单文件4g,[史上最伟大网管]miniLinux网启server撒旦单文件版使用技巧和ipxe脚本解释20190814...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。