How do I add a kernel boot parameter?












129














I need to add the boot parameter foo=bar to my kernel. How can I do this once for testing, and permanently if testing was a success?










share|improve this question





























    129














    I need to add the boot parameter foo=bar to my kernel. How can I do this once for testing, and permanently if testing was a success?










    share|improve this question



























      129












      129








      129


      64





      I need to add the boot parameter foo=bar to my kernel. How can I do this once for testing, and permanently if testing was a success?










      share|improve this question















      I need to add the boot parameter foo=bar to my kernel. How can I do this once for testing, and permanently if testing was a success?







      kernel grub2






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 20 '13 at 18:06









      Jorge Castro

      36k105422617




      36k105422617










      asked Dec 30 '10 at 22:51









      htorquehtorque

      46.9k32172212




      46.9k32172212






















          3 Answers
          3






          active

          oldest

          votes


















          187














          To temporarily add a boot parameter to a kernel:




          1. Start your system and wait for the GRUB menu to show (if you don't see a GRUB menu, press and hold the left Shift key right after starting the system).

          2. Now highlight the kernel you want to use, and press the e key. You should be able to see and edit the commands associated with the highlighted kernel.

          3. Go down to the line starting with linux and add your parameter foo=bar to its end.

          4. Now press Ctrl + x to boot.



          To make this change permanent:





          1. From a terminal (or after pressing Alt + F2) run:



            gksudo gedit /etc/default/grub


            (or use sudo nano if gksudo or gedit are not available) and enter your password.




          2. Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT and append foo=bar to its end. For example:



            GRUB_CMDLINE_LINUX_DEFAULT="quiet splash foo=bar"


            Save the file and close the editor.




          3. Finally, start a terminal and run:



            sudo update-grub


            to update GRUB's configuration file (you probably need to enter your password).




          On the next reboot, the kernel should be started with the boot parameter. To permanently remove it, simply remove the parameter from GRUB_CMDLINE_LINUX_DEFAULT and run sudo update-grub again.



          To verify your changes, you can see exactly what parameters your kernel booted with by executing cat /proc/cmdline.



          Wiki Page:




          • https://help.ubuntu.com/community/BootOptions






          share|improve this answer



















          • 3




            FYI to test this run cat /proc/cmdline
            – Avindra Goolcharan
            Aug 3 '16 at 15:13










          • Shift doesn’t work for me. I used Esc instead. Had to be careful not to hold it too long or it would blow right through GRUB
            – eqzx
            Jul 7 '18 at 3:18



















          12














          To add any kernel option:




          • for a liveCD session: follow these steps


          • for an Existing Installation: use Boot-Repair's Add a kernel option or Edit GRUB configuration file options.



          enter image description here



          See also this documentation.






          share|improve this answer





























            11














            Alternatively, you may also use the handy grub-customizer:



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


            Just open a boot entry, and edit its kernel parameters as highlighted in the screenshot below:



            screenshot






            share|improve this answer























              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',
              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%2faskubuntu.com%2fquestions%2f19486%2fhow-do-i-add-a-kernel-boot-parameter%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              187














              To temporarily add a boot parameter to a kernel:




              1. Start your system and wait for the GRUB menu to show (if you don't see a GRUB menu, press and hold the left Shift key right after starting the system).

              2. Now highlight the kernel you want to use, and press the e key. You should be able to see and edit the commands associated with the highlighted kernel.

              3. Go down to the line starting with linux and add your parameter foo=bar to its end.

              4. Now press Ctrl + x to boot.



              To make this change permanent:





              1. From a terminal (or after pressing Alt + F2) run:



                gksudo gedit /etc/default/grub


                (or use sudo nano if gksudo or gedit are not available) and enter your password.




              2. Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT and append foo=bar to its end. For example:



                GRUB_CMDLINE_LINUX_DEFAULT="quiet splash foo=bar"


                Save the file and close the editor.




              3. Finally, start a terminal and run:



                sudo update-grub


                to update GRUB's configuration file (you probably need to enter your password).




              On the next reboot, the kernel should be started with the boot parameter. To permanently remove it, simply remove the parameter from GRUB_CMDLINE_LINUX_DEFAULT and run sudo update-grub again.



              To verify your changes, you can see exactly what parameters your kernel booted with by executing cat /proc/cmdline.



              Wiki Page:




              • https://help.ubuntu.com/community/BootOptions






              share|improve this answer



















              • 3




                FYI to test this run cat /proc/cmdline
                – Avindra Goolcharan
                Aug 3 '16 at 15:13










              • Shift doesn’t work for me. I used Esc instead. Had to be careful not to hold it too long or it would blow right through GRUB
                – eqzx
                Jul 7 '18 at 3:18
















              187














              To temporarily add a boot parameter to a kernel:




              1. Start your system and wait for the GRUB menu to show (if you don't see a GRUB menu, press and hold the left Shift key right after starting the system).

              2. Now highlight the kernel you want to use, and press the e key. You should be able to see and edit the commands associated with the highlighted kernel.

              3. Go down to the line starting with linux and add your parameter foo=bar to its end.

              4. Now press Ctrl + x to boot.



              To make this change permanent:





              1. From a terminal (or after pressing Alt + F2) run:



                gksudo gedit /etc/default/grub


                (or use sudo nano if gksudo or gedit are not available) and enter your password.




              2. Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT and append foo=bar to its end. For example:



                GRUB_CMDLINE_LINUX_DEFAULT="quiet splash foo=bar"


                Save the file and close the editor.




              3. Finally, start a terminal and run:



                sudo update-grub


                to update GRUB's configuration file (you probably need to enter your password).




              On the next reboot, the kernel should be started with the boot parameter. To permanently remove it, simply remove the parameter from GRUB_CMDLINE_LINUX_DEFAULT and run sudo update-grub again.



              To verify your changes, you can see exactly what parameters your kernel booted with by executing cat /proc/cmdline.



              Wiki Page:




              • https://help.ubuntu.com/community/BootOptions






              share|improve this answer



















              • 3




                FYI to test this run cat /proc/cmdline
                – Avindra Goolcharan
                Aug 3 '16 at 15:13










              • Shift doesn’t work for me. I used Esc instead. Had to be careful not to hold it too long or it would blow right through GRUB
                – eqzx
                Jul 7 '18 at 3:18














              187












              187








              187






              To temporarily add a boot parameter to a kernel:




              1. Start your system and wait for the GRUB menu to show (if you don't see a GRUB menu, press and hold the left Shift key right after starting the system).

              2. Now highlight the kernel you want to use, and press the e key. You should be able to see and edit the commands associated with the highlighted kernel.

              3. Go down to the line starting with linux and add your parameter foo=bar to its end.

              4. Now press Ctrl + x to boot.



              To make this change permanent:





              1. From a terminal (or after pressing Alt + F2) run:



                gksudo gedit /etc/default/grub


                (or use sudo nano if gksudo or gedit are not available) and enter your password.




              2. Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT and append foo=bar to its end. For example:



                GRUB_CMDLINE_LINUX_DEFAULT="quiet splash foo=bar"


                Save the file and close the editor.




              3. Finally, start a terminal and run:



                sudo update-grub


                to update GRUB's configuration file (you probably need to enter your password).




              On the next reboot, the kernel should be started with the boot parameter. To permanently remove it, simply remove the parameter from GRUB_CMDLINE_LINUX_DEFAULT and run sudo update-grub again.



              To verify your changes, you can see exactly what parameters your kernel booted with by executing cat /proc/cmdline.



              Wiki Page:




              • https://help.ubuntu.com/community/BootOptions






              share|improve this answer














              To temporarily add a boot parameter to a kernel:




              1. Start your system and wait for the GRUB menu to show (if you don't see a GRUB menu, press and hold the left Shift key right after starting the system).

              2. Now highlight the kernel you want to use, and press the e key. You should be able to see and edit the commands associated with the highlighted kernel.

              3. Go down to the line starting with linux and add your parameter foo=bar to its end.

              4. Now press Ctrl + x to boot.



              To make this change permanent:





              1. From a terminal (or after pressing Alt + F2) run:



                gksudo gedit /etc/default/grub


                (or use sudo nano if gksudo or gedit are not available) and enter your password.




              2. Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT and append foo=bar to its end. For example:



                GRUB_CMDLINE_LINUX_DEFAULT="quiet splash foo=bar"


                Save the file and close the editor.




              3. Finally, start a terminal and run:



                sudo update-grub


                to update GRUB's configuration file (you probably need to enter your password).




              On the next reboot, the kernel should be started with the boot parameter. To permanently remove it, simply remove the parameter from GRUB_CMDLINE_LINUX_DEFAULT and run sudo update-grub again.



              To verify your changes, you can see exactly what parameters your kernel booted with by executing cat /proc/cmdline.



              Wiki Page:




              • https://help.ubuntu.com/community/BootOptions







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jan 4 '18 at 15:16









              Zanna

              50.2k13133241




              50.2k13133241










              answered Dec 30 '10 at 22:51









              htorquehtorque

              46.9k32172212




              46.9k32172212








              • 3




                FYI to test this run cat /proc/cmdline
                – Avindra Goolcharan
                Aug 3 '16 at 15:13










              • Shift doesn’t work for me. I used Esc instead. Had to be careful not to hold it too long or it would blow right through GRUB
                – eqzx
                Jul 7 '18 at 3:18














              • 3




                FYI to test this run cat /proc/cmdline
                – Avindra Goolcharan
                Aug 3 '16 at 15:13










              • Shift doesn’t work for me. I used Esc instead. Had to be careful not to hold it too long or it would blow right through GRUB
                – eqzx
                Jul 7 '18 at 3:18








              3




              3




              FYI to test this run cat /proc/cmdline
              – Avindra Goolcharan
              Aug 3 '16 at 15:13




              FYI to test this run cat /proc/cmdline
              – Avindra Goolcharan
              Aug 3 '16 at 15:13












              Shift doesn’t work for me. I used Esc instead. Had to be careful not to hold it too long or it would blow right through GRUB
              – eqzx
              Jul 7 '18 at 3:18




              Shift doesn’t work for me. I used Esc instead. Had to be careful not to hold it too long or it would blow right through GRUB
              – eqzx
              Jul 7 '18 at 3:18













              12














              To add any kernel option:




              • for a liveCD session: follow these steps


              • for an Existing Installation: use Boot-Repair's Add a kernel option or Edit GRUB configuration file options.



              enter image description here



              See also this documentation.






              share|improve this answer


























                12














                To add any kernel option:




                • for a liveCD session: follow these steps


                • for an Existing Installation: use Boot-Repair's Add a kernel option or Edit GRUB configuration file options.



                enter image description here



                See also this documentation.






                share|improve this answer
























                  12












                  12








                  12






                  To add any kernel option:




                  • for a liveCD session: follow these steps


                  • for an Existing Installation: use Boot-Repair's Add a kernel option or Edit GRUB configuration file options.



                  enter image description here



                  See also this documentation.






                  share|improve this answer












                  To add any kernel option:




                  • for a liveCD session: follow these steps


                  • for an Existing Installation: use Boot-Repair's Add a kernel option or Edit GRUB configuration file options.



                  enter image description here



                  See also this documentation.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jul 5 '12 at 21:25









                  LovinBuntuLovinBuntu

                  2,84021519




                  2,84021519























                      11














                      Alternatively, you may also use the handy grub-customizer:



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


                      Just open a boot entry, and edit its kernel parameters as highlighted in the screenshot below:



                      screenshot






                      share|improve this answer




























                        11














                        Alternatively, you may also use the handy grub-customizer:



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


                        Just open a boot entry, and edit its kernel parameters as highlighted in the screenshot below:



                        screenshot






                        share|improve this answer


























                          11












                          11








                          11






                          Alternatively, you may also use the handy grub-customizer:



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


                          Just open a boot entry, and edit its kernel parameters as highlighted in the screenshot below:



                          screenshot






                          share|improve this answer














                          Alternatively, you may also use the handy grub-customizer:



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


                          Just open a boot entry, and edit its kernel parameters as highlighted in the screenshot below:



                          screenshot







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited May 19 '18 at 8:33









                          David Foerster

                          27.8k1364110




                          27.8k1364110










                          answered Dec 11 '12 at 1:59









                          jasxunjasxun

                          35625




                          35625






























                              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%2f19486%2fhow-do-i-add-a-kernel-boot-parameter%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

                              Human spaceflight

                              Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

                              File:DeusFollowingSea.jpg