将 PC 配置为默认开启状态
我正在为 PC 编写设备软件,为此,我希望 PC 可以用作设备。通电后,无需按电源按钮即可开机。 BIOS 设置中有电源选项,但只有在非正常关机时才会启动电脑。我关心的另一个问题是不干净的关闭会如何影响硬盘、文件系统和操作系统(XP 或 Linux)。
I am writing device software for a PC and for that, I want the PC to be usable as a device. When power is supplied, it should switch on without requiring to press the power button. There are power options in BIOS settings but it starts the PC only when its uncleanly shutdown. The other concern I have is how would unclean shutdown affect the hard disk, filesystem and the OS (XP or Linux).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要的是另一台电脑和连接到它的这些设备之一。
http:// www.relaypros.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=NCD&Category_Code=RS-232_Relay_Boards&gclid=CMna8_yOo5wCFQxM5QodWjoflQ
您要做的就是向其中之一发送一些 RS232 命令以快速关闭继电器。继电器连接到您要控制的计算机的开机引脚。
您可能会找到另一种用于交流电流的继电器触点闭合装置,它允许您在交流电流流动时闭合继电器,但您只想短暂地关闭一秒钟。
不安全的关闭可能会非常有害,具体取决于文件系统状态所在的位置。这对硬件也会造成很大的影响。
What you need is another PC and one of these devices attached to it.
http://www.relaypros.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=NCD&Category_Code=RS-232_Relay_Boards&gclid=CMna8_yOo5wCFQxM5QodWjoflQ
What you do is send this some RS232 commands for a quick closure on one of the relays. The relay is connected to the Power On pins of the computer you want to control.
You possibly could find another relay contact closure for AC current that allows you to close a relay when AC is flowing, but you would only want to for a brief second.
Unsafe shut downs can be quite detrimental depending where the filesystem state is in. It would be quite hard on the hardware too.
还有一种选择是从网络设备启动。快速搜索后,在 wikipedia 上找到了一些信息。另外,还有一个名为 预启动执行环境 的相关内容,它似乎与您正在寻找的类似为了。
There is also the alternative of booting from the network device. A quick search led to some information on wikipedia. Also, there is something related called preboot execution environment which seem to be something like what you are looking for.
一些软件选项 - 这些并不完全是您所要求的,但它们可能会有所帮助
Mac OS X:在节能器控制窗格的选项选项卡中,选择“电源故障后自动重新启动”。 shutdown -hu now 应该然后关闭系统,但给你 5 分钟时间来断电进行模拟不正常的关机,并在电源恢复时自动重新启动计算机,我认为这是一个稍微不正常的关机(即,它不会先注销您)
Windows:
我没有 Windows 机器,所以无法尝试此操作,但是您过去可以在选择关闭时告诉 Windows 不要关闭计算机,而是将其置于安全状态并显示“It现在可以安全地关闭您的计算机了”。也许您可以断开电源,让 BIOS 认为这是一次非正常关机,然后在电源恢复时再次打开机器。 此 Microsoft 帮助文档。 此论坛讨论似乎表明它可能适用于XP。窗口
Linux:不确定这个,但也许这个网站可以提供帮助。
我还没有尝试过这些,所以不能保证它们能够工作或安全工作。
Some software options - these aren't exactly what you asked for, but they might help
Mac OS X: In the energy saver control pane's options tab, select "Restart automatically after a power failue. shutdown -hu now should then bring the system down but give you 5 minutes to remove power to simulate a dirty shutdown, and have the computer reboot automatically when power is restored. It's a slightly dirty shutdown anyway, I think. (ie, it doesn't log you off first)
Windows:
I don't have a windows machine so I can't try this, but you used to be able to tell windows not to power down the computer when you select shut down, but rather to put it in a safe state and display "It is now safe to turn off your computer". Perhaps you could then remove the power and have the bios believe it was a non-clean shutdown, and turn the machine on again when power is restored. There are some instructions on how to do this in Windows Server 2003 at the bottom of this microsoft help document. This forum discussion seems to suggest it might work on XP.
Linux: Not sure about this one, but maybe this website can help.
I haven't tried any of these, so no guarantees that they'll work or work safely.