运行脚本启动选项apears前 [英] run script before boot options apears

查看:393
本文介绍了运行脚本启动选项apears前的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

做任何你们知道是否有可能运行一个脚本之前,我进入BIOS和操作系统启动前的选项?
例如:我要保护我的电脑与要求我在屏幕前preSS某些键在那里我有引导选项apears脚本(因为密码可以被破解,甚至BIOS,我不相信他们)

Do any of you guys know if it's possible to run a script before i get the option to enter bios and before OS boots? Example: i want to secure my pc with a script that requires me to press certain keys before the screen where i have the boot options apears (because passwords can be cracked, even bios, i don't trust them)

PS:我一直在寻找到这个问题了几个小时,我找不到任何东西:(我只需要知道用什么语言,要插入脚本

ps: i have been looking into this problem for a couple of hours and i couldn't find anything :(. i just need to know what language to use and where to insert the script.

在此先感谢!

推荐答案

有可能并没有那么难,当系统使用UEFI BIOS,这对于几乎所有的现代系统是真实的。

It is possible and not so hard when system use UEFI BIOS, which is true for almost all modern systems.

下面的解决方案是不是你想要什么,但它是最接近你可以得到什么。

Below solution is not exactly what you want but it is closest to what you can get.

有什么可以做的:


  1. 在C写的UEFI应用程序,它会等到正确的组合键pressed。如果不正确组合pressed然后重新启动或者等待另一次尝试。

  2. 影响使用执行bcfg UEFI Shell命令启动顺序。您应该使用执行bcfg 来把你的应用程序的启动顺序的顶部,因此,虽然设备启动第一项将是您的应用程序,而不是操作系统。如何使用执行bcfg 你可以阅读的在这里,第83页

  1. Write UEFI application in C that will wait until correct key combination pressed. If incorrect combination pressed then reboot or wait for another try.
  2. Affect boot order using bcfg UEFI Shell command. You should use bcfg to put your application on top of boot order, so while device is booting first entry would be your application and not OS. How to use bcfg you can read here, page 83

夫妇注:


  • 这种方法最大的问题是,有人可以进入BIOS设置和更改顺序,以便申请将不被执行,但是这可以通过固定设置菜单具有密码来解决。

  • UEFI应用程序都存储在某个地方。这取决于存储介质上,但应用程序应该在UEFI可读的分区,如果有人将断开存储,再开机选项将被跳过,保护将无法正常工作。

  • 大多数UEFI BIOS厂商禁用执行bcfg 命令,因为它可能是危险的,但可以左右从USB闪盘引导UEFI shell中的工作,如果你有这样的选择。

  • 在系统中添加和删除设备影响启动顺序。您应该测试,看看加入各种设备如何在系统中影响引导顺序。一些额外的配置可能需要BIOS设置菜单,以确保没有新​​的设备将您的应用程序之前进行探测。

  • Biggest problem with this approach is that someone can enter BIOS setup and change order so application will not be executed, but this can be solved with securing setup menu with password.
  • UEFI application have to be stored somewhere. It depends on storage medium, but application should be on UEFI readable partition, if someone will disconnect storage, then boot option will be skipped and protection will not work.
  • Most UEFI BIOS vendors disable bcfg command since it can be dangerous, but this can be worked around by booting UEFI Shell from USB stick, if you have that option.
  • Adding and removing devices in system affect boot order. You should test and see how adding various devices affect boot order in your system. Some additional configuration maybe needed in BIOS setup menu to make sure no new device will be probed before your application.

我写博客文章了解 UEFI应用开发模拟环境中,你应该考虑,而不是尝试在真实的硬件。

I wrote blog post about UEFI application development in emulated environment, which you should consider instead of experimenting on real hardware.

这篇关于运行脚本启动选项apears前的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆