how to edit grub.cfg to boot win 7?











up vote
0
down vote

favorite












I can boot win7 when my laptop is on the start menu,by changing "insmod ldm" into "insmod part_msdos" in grub.cfg to boot window 7.



Before I update the kernel to 4.4.0-42, I can save the change. Now I can't save the file because it is read only.



Any suggestions?










share|improve this question


























    up vote
    0
    down vote

    favorite












    I can boot win7 when my laptop is on the start menu,by changing "insmod ldm" into "insmod part_msdos" in grub.cfg to boot window 7.



    Before I update the kernel to 4.4.0-42, I can save the change. Now I can't save the file because it is read only.



    Any suggestions?










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I can boot win7 when my laptop is on the start menu,by changing "insmod ldm" into "insmod part_msdos" in grub.cfg to boot window 7.



      Before I update the kernel to 4.4.0-42, I can save the change. Now I can't save the file because it is read only.



      Any suggestions?










      share|improve this question













      I can boot win7 when my laptop is on the start menu,by changing "insmod ldm" into "insmod part_msdos" in grub.cfg to boot window 7.



      Before I update the kernel to 4.4.0-42, I can save the change. Now I can't save the file because it is read only.



      Any suggestions?







      dual-boot 16.04 grub2






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Oct 15 '16 at 9:30









      larry

      614




      614






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote













          If the file permissions is your only problem, just change it.



          sudo chmod 777 "whateverfile"



          or if you want to be able to edit the entire directory.



          sudo chmod 777 "directory" -R



          *as a note 777 gives r/w access to every user so keep that in mind.



          Best, BoB






          share|improve this answer





















          • When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
            – larry
            Oct 15 '16 at 22:50






          • 1




            Bob. Changing system files to 777 is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just use sudo edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.
            – L. D. James
            Oct 15 '16 at 23:48


















          up vote
          0
          down vote













          You might notice that the grub.cfg file advises not to make changes to that file. To edit grub, make your changes to /etc/default/grub. Then run sudo update-grub. The update-grub will make the permanent changes to your grub.cfg file.



          If you are trying to make Windows your Priority Boot device, you can do that by make grub default to saved. This way Grub will remember the last OS you booted to and will boot to that OS until you decide to boot to a different one.



          Do do this, make these changes to your /etc/default/grub files:




          File Edit Options Buffers Tools Conf Help
          # If you change this file, run 'update-grub' afterwards to update
          # /boot/grub/grub.cfg.
          # For full documentation of the options in this file, see:
          # info -f grub -n 'Simple configuration'

          GRUB_DEFAULT="saved"
          GRUB_SAVEDEFAULT="true"
          #GRUB_HIDDEN_TIMEOUT="0"
          GRUB_HIDDEN_TIMEOUT_QUIET="true"
          GRUB_TIMEOUT="15"
          GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
          GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
          GRUB_CMDLINE_LINUX=""

          # Uncomment to enable BadRAM filtering, modify to suit your needs
          # This works with Linux (no patch required) and with any kernel that obt


          The changes from the default is highlighted by bold letters.



          Alternatively you can use the GUI application Grub Customizer. It's available via a the ppa:



          $ sudo add-apt-repository ppa:danielrichter2007/grub-customizer
          $ sudo apt-get update
          $ sudo apt-get install grub-customizer


          After installing the ppa you can run it from the Ubuntu Dash search (grub-customizer).



          This GUI application allows you to easily perform a number of options that you might not know how to look for such as sorting the order in which the Launchers Appear in the Boot Menu.






          share|improve this answer























          • Some applications were installed on windows. Ubuntu is just for study.
            – larry
            Oct 15 '16 at 22:47










          • Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked on answer when I meant to click on comment. Anyway, based on your question and comment, I have provided what it appears you are looking for.
            – L. D. James
            Oct 15 '16 at 23:30











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          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',
          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%2faskubuntu.com%2fquestions%2f837393%2fhow-to-edit-grub-cfg-to-boot-win-7%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








          up vote
          0
          down vote













          If the file permissions is your only problem, just change it.



          sudo chmod 777 "whateverfile"



          or if you want to be able to edit the entire directory.



          sudo chmod 777 "directory" -R



          *as a note 777 gives r/w access to every user so keep that in mind.



          Best, BoB






          share|improve this answer





















          • When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
            – larry
            Oct 15 '16 at 22:50






          • 1




            Bob. Changing system files to 777 is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just use sudo edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.
            – L. D. James
            Oct 15 '16 at 23:48















          up vote
          0
          down vote













          If the file permissions is your only problem, just change it.



          sudo chmod 777 "whateverfile"



          or if you want to be able to edit the entire directory.



          sudo chmod 777 "directory" -R



          *as a note 777 gives r/w access to every user so keep that in mind.



          Best, BoB






          share|improve this answer





















          • When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
            – larry
            Oct 15 '16 at 22:50






          • 1




            Bob. Changing system files to 777 is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just use sudo edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.
            – L. D. James
            Oct 15 '16 at 23:48













          up vote
          0
          down vote










          up vote
          0
          down vote









          If the file permissions is your only problem, just change it.



          sudo chmod 777 "whateverfile"



          or if you want to be able to edit the entire directory.



          sudo chmod 777 "directory" -R



          *as a note 777 gives r/w access to every user so keep that in mind.



          Best, BoB






          share|improve this answer












          If the file permissions is your only problem, just change it.



          sudo chmod 777 "whateverfile"



          or if you want to be able to edit the entire directory.



          sudo chmod 777 "directory" -R



          *as a note 777 gives r/w access to every user so keep that in mind.



          Best, BoB







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 15 '16 at 11:46









          BoB

          211




          211












          • When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
            – larry
            Oct 15 '16 at 22:50






          • 1




            Bob. Changing system files to 777 is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just use sudo edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.
            – L. D. James
            Oct 15 '16 at 23:48


















          • When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
            – larry
            Oct 15 '16 at 22:50






          • 1




            Bob. Changing system files to 777 is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just use sudo edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.
            – L. D. James
            Oct 15 '16 at 23:48
















          When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
          – larry
          Oct 15 '16 at 22:50




          When I update the kernel next time. the grub.cfg will be overwritten again. How can I change it permanently.
          – larry
          Oct 15 '16 at 22:50




          1




          1




          Bob. Changing system files to 777 is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just use sudo edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.
          – L. D. James
          Oct 15 '16 at 23:48




          Bob. Changing system files to 777 is a serious security issue. Also some applications will become broken if their files don't have the correct attributes. If he has the access to change the files to make them world accessible, he could use the same access to access the files the with the permission they already have. This way the system files will remain in proper integrity. Just use sudo edit the system configuration files. The particular file he's having problems with shouldn't be manually edited.
          – L. D. James
          Oct 15 '16 at 23:48












          up vote
          0
          down vote













          You might notice that the grub.cfg file advises not to make changes to that file. To edit grub, make your changes to /etc/default/grub. Then run sudo update-grub. The update-grub will make the permanent changes to your grub.cfg file.



          If you are trying to make Windows your Priority Boot device, you can do that by make grub default to saved. This way Grub will remember the last OS you booted to and will boot to that OS until you decide to boot to a different one.



          Do do this, make these changes to your /etc/default/grub files:




          File Edit Options Buffers Tools Conf Help
          # If you change this file, run 'update-grub' afterwards to update
          # /boot/grub/grub.cfg.
          # For full documentation of the options in this file, see:
          # info -f grub -n 'Simple configuration'

          GRUB_DEFAULT="saved"
          GRUB_SAVEDEFAULT="true"
          #GRUB_HIDDEN_TIMEOUT="0"
          GRUB_HIDDEN_TIMEOUT_QUIET="true"
          GRUB_TIMEOUT="15"
          GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
          GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
          GRUB_CMDLINE_LINUX=""

          # Uncomment to enable BadRAM filtering, modify to suit your needs
          # This works with Linux (no patch required) and with any kernel that obt


          The changes from the default is highlighted by bold letters.



          Alternatively you can use the GUI application Grub Customizer. It's available via a the ppa:



          $ sudo add-apt-repository ppa:danielrichter2007/grub-customizer
          $ sudo apt-get update
          $ sudo apt-get install grub-customizer


          After installing the ppa you can run it from the Ubuntu Dash search (grub-customizer).



          This GUI application allows you to easily perform a number of options that you might not know how to look for such as sorting the order in which the Launchers Appear in the Boot Menu.






          share|improve this answer























          • Some applications were installed on windows. Ubuntu is just for study.
            – larry
            Oct 15 '16 at 22:47










          • Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked on answer when I meant to click on comment. Anyway, based on your question and comment, I have provided what it appears you are looking for.
            – L. D. James
            Oct 15 '16 at 23:30















          up vote
          0
          down vote













          You might notice that the grub.cfg file advises not to make changes to that file. To edit grub, make your changes to /etc/default/grub. Then run sudo update-grub. The update-grub will make the permanent changes to your grub.cfg file.



          If you are trying to make Windows your Priority Boot device, you can do that by make grub default to saved. This way Grub will remember the last OS you booted to and will boot to that OS until you decide to boot to a different one.



          Do do this, make these changes to your /etc/default/grub files:




          File Edit Options Buffers Tools Conf Help
          # If you change this file, run 'update-grub' afterwards to update
          # /boot/grub/grub.cfg.
          # For full documentation of the options in this file, see:
          # info -f grub -n 'Simple configuration'

          GRUB_DEFAULT="saved"
          GRUB_SAVEDEFAULT="true"
          #GRUB_HIDDEN_TIMEOUT="0"
          GRUB_HIDDEN_TIMEOUT_QUIET="true"
          GRUB_TIMEOUT="15"
          GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
          GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
          GRUB_CMDLINE_LINUX=""

          # Uncomment to enable BadRAM filtering, modify to suit your needs
          # This works with Linux (no patch required) and with any kernel that obt


          The changes from the default is highlighted by bold letters.



          Alternatively you can use the GUI application Grub Customizer. It's available via a the ppa:



          $ sudo add-apt-repository ppa:danielrichter2007/grub-customizer
          $ sudo apt-get update
          $ sudo apt-get install grub-customizer


          After installing the ppa you can run it from the Ubuntu Dash search (grub-customizer).



          This GUI application allows you to easily perform a number of options that you might not know how to look for such as sorting the order in which the Launchers Appear in the Boot Menu.






          share|improve this answer























          • Some applications were installed on windows. Ubuntu is just for study.
            – larry
            Oct 15 '16 at 22:47










          • Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked on answer when I meant to click on comment. Anyway, based on your question and comment, I have provided what it appears you are looking for.
            – L. D. James
            Oct 15 '16 at 23:30













          up vote
          0
          down vote










          up vote
          0
          down vote









          You might notice that the grub.cfg file advises not to make changes to that file. To edit grub, make your changes to /etc/default/grub. Then run sudo update-grub. The update-grub will make the permanent changes to your grub.cfg file.



          If you are trying to make Windows your Priority Boot device, you can do that by make grub default to saved. This way Grub will remember the last OS you booted to and will boot to that OS until you decide to boot to a different one.



          Do do this, make these changes to your /etc/default/grub files:




          File Edit Options Buffers Tools Conf Help
          # If you change this file, run 'update-grub' afterwards to update
          # /boot/grub/grub.cfg.
          # For full documentation of the options in this file, see:
          # info -f grub -n 'Simple configuration'

          GRUB_DEFAULT="saved"
          GRUB_SAVEDEFAULT="true"
          #GRUB_HIDDEN_TIMEOUT="0"
          GRUB_HIDDEN_TIMEOUT_QUIET="true"
          GRUB_TIMEOUT="15"
          GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
          GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
          GRUB_CMDLINE_LINUX=""

          # Uncomment to enable BadRAM filtering, modify to suit your needs
          # This works with Linux (no patch required) and with any kernel that obt


          The changes from the default is highlighted by bold letters.



          Alternatively you can use the GUI application Grub Customizer. It's available via a the ppa:



          $ sudo add-apt-repository ppa:danielrichter2007/grub-customizer
          $ sudo apt-get update
          $ sudo apt-get install grub-customizer


          After installing the ppa you can run it from the Ubuntu Dash search (grub-customizer).



          This GUI application allows you to easily perform a number of options that you might not know how to look for such as sorting the order in which the Launchers Appear in the Boot Menu.






          share|improve this answer














          You might notice that the grub.cfg file advises not to make changes to that file. To edit grub, make your changes to /etc/default/grub. Then run sudo update-grub. The update-grub will make the permanent changes to your grub.cfg file.



          If you are trying to make Windows your Priority Boot device, you can do that by make grub default to saved. This way Grub will remember the last OS you booted to and will boot to that OS until you decide to boot to a different one.



          Do do this, make these changes to your /etc/default/grub files:




          File Edit Options Buffers Tools Conf Help
          # If you change this file, run 'update-grub' afterwards to update
          # /boot/grub/grub.cfg.
          # For full documentation of the options in this file, see:
          # info -f grub -n 'Simple configuration'

          GRUB_DEFAULT="saved"
          GRUB_SAVEDEFAULT="true"
          #GRUB_HIDDEN_TIMEOUT="0"
          GRUB_HIDDEN_TIMEOUT_QUIET="true"
          GRUB_TIMEOUT="15"
          GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
          GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
          GRUB_CMDLINE_LINUX=""

          # Uncomment to enable BadRAM filtering, modify to suit your needs
          # This works with Linux (no patch required) and with any kernel that obt


          The changes from the default is highlighted by bold letters.



          Alternatively you can use the GUI application Grub Customizer. It's available via a the ppa:



          $ sudo add-apt-repository ppa:danielrichter2007/grub-customizer
          $ sudo apt-get update
          $ sudo apt-get install grub-customizer


          After installing the ppa you can run it from the Ubuntu Dash search (grub-customizer).



          This GUI application allows you to easily perform a number of options that you might not know how to look for such as sorting the order in which the Launchers Appear in the Boot Menu.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Oct 15 '16 at 23:38

























          answered Oct 15 '16 at 9:44









          L. D. James

          18k43584




          18k43584












          • Some applications were installed on windows. Ubuntu is just for study.
            – larry
            Oct 15 '16 at 22:47










          • Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked on answer when I meant to click on comment. Anyway, based on your question and comment, I have provided what it appears you are looking for.
            – L. D. James
            Oct 15 '16 at 23:30


















          • Some applications were installed on windows. Ubuntu is just for study.
            – larry
            Oct 15 '16 at 22:47










          • Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked on answer when I meant to click on comment. Anyway, based on your question and comment, I have provided what it appears you are looking for.
            – L. D. James
            Oct 15 '16 at 23:30
















          Some applications were installed on windows. Ubuntu is just for study.
          – larry
          Oct 15 '16 at 22:47




          Some applications were installed on windows. Ubuntu is just for study.
          – larry
          Oct 15 '16 at 22:47












          Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked on answer when I meant to click on comment. Anyway, based on your question and comment, I have provided what it appears you are looking for.
          – L. D. James
          Oct 15 '16 at 23:30




          Thanks for getting back to me. I made a mistake (for the second time this year... I'll be more careful), but I meant for my question to be a comment so that I could get the information so that I could provide the correct details in my answer. I clicked on answer when I meant to click on comment. Anyway, based on your question and comment, I have provided what it appears you are looking for.
          – L. D. James
          Oct 15 '16 at 23:30


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • 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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2faskubuntu.com%2fquestions%2f837393%2fhow-to-edit-grub-cfg-to-boot-win-7%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

          Ellipse (mathématiques)

          Quarter-circle Tiles

          Mont Emei