No announcement yet.

Software based solution to combat the cold weather! (for hard drives). Need C++ help.

  • Filter
  • Time
  • Show
Clear All
new posts

  • Software based solution to combat the cold weather! (for hard drives). Need C++ help.

    I know its not close to winter yet, but I just had a silly idea.

    I have a Seagate EE25 automotive grade drive, which is designed to work in very harsh temperature extremes. However, this winter when it hit >-40C, even this tough drive had problems spinning up to speed quickly enough. It seems that the fluid bearings are too thick to allow the platters from spinning to operational speed quickly enough. I never had any problems at these temperatures with my old endurastar, probably because the ee25 has a higher rotational speed than the endurastar. To get the computer to boot at these temperatures, I simply needed more time (about 10 seconds extra) between when power is applied to the drive (it starts spinning) and when it is detected by the BIOS.

    So my idea is to make a bootable usb key and set that as a secondary boot device. So when it is too cold and the primary drive is not detected (because its still spinning up to speed), the BIOS will automatically boot from the usb key. On the usb key, I want to make a simple program that will run for a user set amount of time, then automatically reboot the system. When the system reboots, hopefully the drive will be at operational speed and the system boots like normal. If not, the system boots from the usb key and the cycle continues until the drive is detected and operational. This is the theory, not sure if it will even work at all.

    So now I just need some help writing the program. I only know some basic C++, I was just wondering if anyone knows a C++ line that would 1. delay for a X amount of time and 2. reboot the system. Basically, the code would look like this:

    #include <iostream>
    using namespace std;
    int main()

    cout << "System temperature is too low, please wait while system warms...";
    ---INSERT HERE a line that will delay the system for a X amount of time---
    ---INSERT HERE a line that will automatically reboot the system---

    return 0;

    I would then compile this to a .exe, put it on the usb key and set it to automatically run through autoexec.bat

    So does anyone know the C++ code to do the delay and the reboot? This is just a bandaid solution to the cold weather until SSD prices come down. Opinions and criticism is also welcome.

  • #2
    I'm not real familiar with car pc setups, more or less trying to learn that part myself, but very familiar with computers. Depending on what options the BIOS has, you can usually set it to wait for a set amount of time before it even attempts to check for hard drives. You may want to look in your BIOS and see if it has the option. If it does, will save you the time and hassle of what you are talking about doing. Good luck.


    • #3
      Yup, Ive tried looking through the BIOS. There is a option to disable quick bios check, but that does not give me the extra 10 seconds I need to let the drive spin up to speed at -40C.