2214 views|2 replies

222

Posts

2

Resources
The OP
 

How does Windows know the last startup failure? [Copy link]

If the power fails during the Windows startup process, the next startup will prompt something like "Last startup failed, do you want to enter safe mode?" So how is this done?

Write to hard disk before booting?

Write the boot status to a certain area of BIOS?

I have a project now, and I have made 2 kernels. Uboot automatically loads the first kernel. When the first kernel crashes, I can [manually] switch to the second kernel to start. So if I need Uboot to implement the Windows detection function, how should I do it?

My current idea is to write 1 byte of data to an unused register of the RTC chip: [such as an alarm]. The RTC is powered by a button battery, and this byte records [the number of failed startups]

This post is from Linux and Android

Latest reply

The Windows operating system has a special file for recording startup events. It is written after normal startup. If the startup fails, there will also be a corresponding record. The next time you start it, it will read it first and judge based on the read content. Similarly, the original poster's idea can be realized with the help of any power-off non-volatile memory. You can define a startup status information yourself, and one byte should be enough.   Details Published on 2020-3-18 13:15

7422

Posts

2

Resources
2
 
Linux checks the consistency of the file system log. Windows has an event system to record power on and off events. Uboot and Linux are two different things, so they can only rely on global state sharing. Kernel crashes can be output to a dump file, you can try to check this file. Or you can analyze the event text under /var/log in uboot in a more reliable way.
This post is from Linux and Android
 
 

1w

Posts

143

Resources
3
 

The Windows operating system has a special file for recording startup events. It is written after normal startup. If the startup fails, there will also be a corresponding record. The next time you start it, it will read it first and judge based on the read content. Similarly, the original poster's idea can be realized with the help of any power-off non-volatile memory. You can define a startup status information yourself, and one byte should be enough.

This post is from Linux and Android
 
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list