How to make hdparm settings survive reboot?












0















hdparm settings are lost after reboot. How to setup



hdparm -B60 /dev/sda


to be saved for the next reboot?










share|improve this question





























    0















    hdparm settings are lost after reboot. How to setup



    hdparm -B60 /dev/sda


    to be saved for the next reboot?










    share|improve this question



























      0












      0








      0








      hdparm settings are lost after reboot. How to setup



      hdparm -B60 /dev/sda


      to be saved for the next reboot?










      share|improve this question
















      hdparm settings are lost after reboot. How to setup



      hdparm -B60 /dev/sda


      to be saved for the next reboot?







      hard-drive sleep reboot suspend hdparm






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 29 at 12:23









      Kamil Maciorowski

      27.6k156083




      27.6k156083










      asked Jan 29 at 11:29









      BandolerBandoler

      63




      63






















          2 Answers
          2






          active

          oldest

          votes


















          0














          The most primitive approach is to put the hdparm -B60 /dev/sda command into /etc/rc.local. If you use systemd then you should see this: What is the correct substitute for rc.local in systemd instead of re-creating rc.local?



          But some distros (at least Debian and its derivatives) use /etc/hdparm.conf file. In my Debian man 5 hdparm.conf says




          This is the default configuration for hdparm for Debian. It is a rather simple script, [...]



          Setting an option outside of one of the stanzas enables it for all drives.



          If an option is listed twice, the second instance replaces the first.



          /sbin/hdparm is not run unless a block of the form:



            DEV {
          option
          option
          }


          exists. This blocks will cause /sbin/hdparm OPTIONS DEV to be run. Where OPTIONS is the concatenation of all options previously defined outside of a block and all options defined with in the block.



          [...]



          OPTIONS



          [...]



          -B apm setting
          apm = 255




          One should also read comments in the /etc/hdparm.conf file itself; and the entire /usr/share/doc/hdparm/README.Debian (the file may be gzipped, extract it).



          I think the following block in the configuration file will recreate your command (hdparm -B60 /dev/sda) on startup:



          /dev/sda {
          apm = 60
          }





          share|improve this answer

































            0














            Thank you for the answer.



            I fixed it with this program:



            gnome-disk-utility 3.28.3
            UDisks 2.7.6 (built against 2.7.6)



            Screenshot of UDisks / Settings



            The answer is very useful to me, next time I will make the settings in the "/etc/hdparm.conf."






            share|improve this answer

























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1399605%2fhow-to-make-hdparm-settings-survive-reboot%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              The most primitive approach is to put the hdparm -B60 /dev/sda command into /etc/rc.local. If you use systemd then you should see this: What is the correct substitute for rc.local in systemd instead of re-creating rc.local?



              But some distros (at least Debian and its derivatives) use /etc/hdparm.conf file. In my Debian man 5 hdparm.conf says




              This is the default configuration for hdparm for Debian. It is a rather simple script, [...]



              Setting an option outside of one of the stanzas enables it for all drives.



              If an option is listed twice, the second instance replaces the first.



              /sbin/hdparm is not run unless a block of the form:



                DEV {
              option
              option
              }


              exists. This blocks will cause /sbin/hdparm OPTIONS DEV to be run. Where OPTIONS is the concatenation of all options previously defined outside of a block and all options defined with in the block.



              [...]



              OPTIONS



              [...]



              -B apm setting
              apm = 255




              One should also read comments in the /etc/hdparm.conf file itself; and the entire /usr/share/doc/hdparm/README.Debian (the file may be gzipped, extract it).



              I think the following block in the configuration file will recreate your command (hdparm -B60 /dev/sda) on startup:



              /dev/sda {
              apm = 60
              }





              share|improve this answer






























                0














                The most primitive approach is to put the hdparm -B60 /dev/sda command into /etc/rc.local. If you use systemd then you should see this: What is the correct substitute for rc.local in systemd instead of re-creating rc.local?



                But some distros (at least Debian and its derivatives) use /etc/hdparm.conf file. In my Debian man 5 hdparm.conf says




                This is the default configuration for hdparm for Debian. It is a rather simple script, [...]



                Setting an option outside of one of the stanzas enables it for all drives.



                If an option is listed twice, the second instance replaces the first.



                /sbin/hdparm is not run unless a block of the form:



                  DEV {
                option
                option
                }


                exists. This blocks will cause /sbin/hdparm OPTIONS DEV to be run. Where OPTIONS is the concatenation of all options previously defined outside of a block and all options defined with in the block.



                [...]



                OPTIONS



                [...]



                -B apm setting
                apm = 255




                One should also read comments in the /etc/hdparm.conf file itself; and the entire /usr/share/doc/hdparm/README.Debian (the file may be gzipped, extract it).



                I think the following block in the configuration file will recreate your command (hdparm -B60 /dev/sda) on startup:



                /dev/sda {
                apm = 60
                }





                share|improve this answer




























                  0












                  0








                  0







                  The most primitive approach is to put the hdparm -B60 /dev/sda command into /etc/rc.local. If you use systemd then you should see this: What is the correct substitute for rc.local in systemd instead of re-creating rc.local?



                  But some distros (at least Debian and its derivatives) use /etc/hdparm.conf file. In my Debian man 5 hdparm.conf says




                  This is the default configuration for hdparm for Debian. It is a rather simple script, [...]



                  Setting an option outside of one of the stanzas enables it for all drives.



                  If an option is listed twice, the second instance replaces the first.



                  /sbin/hdparm is not run unless a block of the form:



                    DEV {
                  option
                  option
                  }


                  exists. This blocks will cause /sbin/hdparm OPTIONS DEV to be run. Where OPTIONS is the concatenation of all options previously defined outside of a block and all options defined with in the block.



                  [...]



                  OPTIONS



                  [...]



                  -B apm setting
                  apm = 255




                  One should also read comments in the /etc/hdparm.conf file itself; and the entire /usr/share/doc/hdparm/README.Debian (the file may be gzipped, extract it).



                  I think the following block in the configuration file will recreate your command (hdparm -B60 /dev/sda) on startup:



                  /dev/sda {
                  apm = 60
                  }





                  share|improve this answer















                  The most primitive approach is to put the hdparm -B60 /dev/sda command into /etc/rc.local. If you use systemd then you should see this: What is the correct substitute for rc.local in systemd instead of re-creating rc.local?



                  But some distros (at least Debian and its derivatives) use /etc/hdparm.conf file. In my Debian man 5 hdparm.conf says




                  This is the default configuration for hdparm for Debian. It is a rather simple script, [...]



                  Setting an option outside of one of the stanzas enables it for all drives.



                  If an option is listed twice, the second instance replaces the first.



                  /sbin/hdparm is not run unless a block of the form:



                    DEV {
                  option
                  option
                  }


                  exists. This blocks will cause /sbin/hdparm OPTIONS DEV to be run. Where OPTIONS is the concatenation of all options previously defined outside of a block and all options defined with in the block.



                  [...]



                  OPTIONS



                  [...]



                  -B apm setting
                  apm = 255




                  One should also read comments in the /etc/hdparm.conf file itself; and the entire /usr/share/doc/hdparm/README.Debian (the file may be gzipped, extract it).



                  I think the following block in the configuration file will recreate your command (hdparm -B60 /dev/sda) on startup:



                  /dev/sda {
                  apm = 60
                  }






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jan 29 at 12:48

























                  answered Jan 29 at 12:13









                  Kamil MaciorowskiKamil Maciorowski

                  27.6k156083




                  27.6k156083

























                      0














                      Thank you for the answer.



                      I fixed it with this program:



                      gnome-disk-utility 3.28.3
                      UDisks 2.7.6 (built against 2.7.6)



                      Screenshot of UDisks / Settings



                      The answer is very useful to me, next time I will make the settings in the "/etc/hdparm.conf."






                      share|improve this answer






























                        0














                        Thank you for the answer.



                        I fixed it with this program:



                        gnome-disk-utility 3.28.3
                        UDisks 2.7.6 (built against 2.7.6)



                        Screenshot of UDisks / Settings



                        The answer is very useful to me, next time I will make the settings in the "/etc/hdparm.conf."






                        share|improve this answer




























                          0












                          0








                          0







                          Thank you for the answer.



                          I fixed it with this program:



                          gnome-disk-utility 3.28.3
                          UDisks 2.7.6 (built against 2.7.6)



                          Screenshot of UDisks / Settings



                          The answer is very useful to me, next time I will make the settings in the "/etc/hdparm.conf."






                          share|improve this answer















                          Thank you for the answer.



                          I fixed it with this program:



                          gnome-disk-utility 3.28.3
                          UDisks 2.7.6 (built against 2.7.6)



                          Screenshot of UDisks / Settings



                          The answer is very useful to me, next time I will make the settings in the "/etc/hdparm.conf."







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Feb 6 at 10:44

























                          answered Feb 6 at 10:38









                          BandolerBandoler

                          63




                          63






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1399605%2fhow-to-make-hdparm-settings-survive-reboot%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              How do I know what Microsoft account the skydrive app is syncing to?

                              Grease: Live!

                              When does type information flow backwards in C++?