UEFI SHELL startup.nsh
https://blog.csdn.net/qq_44807736/article/details/141472223
BIOS 進(jìn)入U(xiǎn)efi Shell界面后,會(huì)自動(dòng)執(zhí)行startup.nsh文件,上傳到/boot/efi/下就會(huì)執(zhí)行自己編寫的nsh文件。
當(dāng)需要進(jìn)入不同的文件系統(tǒng)FS0 、FS1 去執(zhí)行刷新操作時(shí),要找到startup.nsh 在哪個(gè)FS后,執(zhí)行FSx:進(jìn)入
寫一段代碼
for %i in 0 1 2 3 4 5 6 7 8 9 10 if exists FS%i:\startup.nsh then FS%i: goto FileFound endif endfor :FileFound
echo "start test" > upgrade.log
date >> upgrade.log
reset # 重啟
這樣系統(tǒng)再啟動(dòng)后,/boot/efi/下會(huì)有日志文件upgrade.log

浙公網(wǎng)安備 33010602011771號(hào)