How to dual boot two Linux distros?












1















I'm new on Linux and I want to install Antergos and CentOS in a single machine.




  • Do I need to have 2 /boot partitions?

  • Do I need to have 2 /swap partitions?

  • How to share files between the 2 OS?

  • How should my disk be partitioned?










share|improve this question





























    1















    I'm new on Linux and I want to install Antergos and CentOS in a single machine.




    • Do I need to have 2 /boot partitions?

    • Do I need to have 2 /swap partitions?

    • How to share files between the 2 OS?

    • How should my disk be partitioned?










    share|improve this question



























      1












      1








      1


      1






      I'm new on Linux and I want to install Antergos and CentOS in a single machine.




      • Do I need to have 2 /boot partitions?

      • Do I need to have 2 /swap partitions?

      • How to share files between the 2 OS?

      • How should my disk be partitioned?










      share|improve this question
















      I'm new on Linux and I want to install Antergos and CentOS in a single machine.




      • Do I need to have 2 /boot partitions?

      • Do I need to have 2 /swap partitions?

      • How to share files between the 2 OS?

      • How should my disk be partitioned?







      system-installation dual-boot grub






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 13 '17 at 12:39









      Stephen Rauch

      3,338101428




      3,338101428










      asked Nov 26 '16 at 18:23









      Luis VelizLuis Veliz

      150413




      150413






















          2 Answers
          2






          active

          oldest

          votes


















          3














          It's your choice; generally on a laptop to preserve precious space, you'll share your /home, /boot, swap partitions, however you can also have separate ones. Note only one partition will be loaded at boot.



          Each Linux distro will be able to find any other Linux distros, so if you have separate /boot and so grub configs, both grubs would have both distros anyway, but there really is no need to have multiple /boot partitions (unless you want one to work off legacy and one to work off UEFI, but that would require some additional tweaks).



          Typical layout for 2x distro;



          /dev/sda1 = /boot = shared
          /dev/sda2 = / = distro 1
          /dev/sda3 = / = distro 2
          /dev/sda4 = /home = shared
          /dev/sda5 = swap = shared


          If you want to go further, you would have 2x /usr and 2x /var (these should not be shared across different installs as they will have references to installed packages / files elsewhere).



          Here is the file structure we use in Linux:



          http://www.pathname.com/fhs/pub/fhs-2.3.html



          You can find a copy online by searching "linux fhs".






          share|improve this answer

































            0














            Legacy boot



            Install the first linux distro , you need to create the root partition and a swap partition , install your system the Grub should be installed on the Master Boot Record assuming on sda.



            You can create a separate /boot partition , home ,etc... for the 1st linux distro.



            To Install the second linux distro , you can create only the root partition



            It is possible to use the same swap partition.



            You can create a separate /boot , home ... for the second linux distro



            You can mount and use the same home , swap , /boot partition during the second linux install , but it is not recommended to use the same boot partition



            Some linux distro will ask you for the path to re-install GRUB on the MBR ,you can reinstall it also you can skip it.



            To skip the re-installation of GRUB by choosing the root partition of the second linux distro as path e,g: sda4 (not sda), After rebooting your system run grub-mkconfig -o /boot/grub/grub.cfg from the first linux distro to get a new entry.



            UEFI



            It is necessary to get an ESP partition to install the first linux distro , a root and a swap partiton and more .



            When you install the second linux distro do not format the ESP just mount it to install the boot-loader.then Create the root partition.




            How to share files between the 2 OS?




            You don't have a problem of sharing between linux OS.






            share|improve this answer























              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "106"
              };
              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: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              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%2funix.stackexchange.com%2fquestions%2f326230%2fhow-to-dual-boot-two-linux-distros%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









              3














              It's your choice; generally on a laptop to preserve precious space, you'll share your /home, /boot, swap partitions, however you can also have separate ones. Note only one partition will be loaded at boot.



              Each Linux distro will be able to find any other Linux distros, so if you have separate /boot and so grub configs, both grubs would have both distros anyway, but there really is no need to have multiple /boot partitions (unless you want one to work off legacy and one to work off UEFI, but that would require some additional tweaks).



              Typical layout for 2x distro;



              /dev/sda1 = /boot = shared
              /dev/sda2 = / = distro 1
              /dev/sda3 = / = distro 2
              /dev/sda4 = /home = shared
              /dev/sda5 = swap = shared


              If you want to go further, you would have 2x /usr and 2x /var (these should not be shared across different installs as they will have references to installed packages / files elsewhere).



              Here is the file structure we use in Linux:



              http://www.pathname.com/fhs/pub/fhs-2.3.html



              You can find a copy online by searching "linux fhs".






              share|improve this answer






























                3














                It's your choice; generally on a laptop to preserve precious space, you'll share your /home, /boot, swap partitions, however you can also have separate ones. Note only one partition will be loaded at boot.



                Each Linux distro will be able to find any other Linux distros, so if you have separate /boot and so grub configs, both grubs would have both distros anyway, but there really is no need to have multiple /boot partitions (unless you want one to work off legacy and one to work off UEFI, but that would require some additional tweaks).



                Typical layout for 2x distro;



                /dev/sda1 = /boot = shared
                /dev/sda2 = / = distro 1
                /dev/sda3 = / = distro 2
                /dev/sda4 = /home = shared
                /dev/sda5 = swap = shared


                If you want to go further, you would have 2x /usr and 2x /var (these should not be shared across different installs as they will have references to installed packages / files elsewhere).



                Here is the file structure we use in Linux:



                http://www.pathname.com/fhs/pub/fhs-2.3.html



                You can find a copy online by searching "linux fhs".






                share|improve this answer




























                  3












                  3








                  3







                  It's your choice; generally on a laptop to preserve precious space, you'll share your /home, /boot, swap partitions, however you can also have separate ones. Note only one partition will be loaded at boot.



                  Each Linux distro will be able to find any other Linux distros, so if you have separate /boot and so grub configs, both grubs would have both distros anyway, but there really is no need to have multiple /boot partitions (unless you want one to work off legacy and one to work off UEFI, but that would require some additional tweaks).



                  Typical layout for 2x distro;



                  /dev/sda1 = /boot = shared
                  /dev/sda2 = / = distro 1
                  /dev/sda3 = / = distro 2
                  /dev/sda4 = /home = shared
                  /dev/sda5 = swap = shared


                  If you want to go further, you would have 2x /usr and 2x /var (these should not be shared across different installs as they will have references to installed packages / files elsewhere).



                  Here is the file structure we use in Linux:



                  http://www.pathname.com/fhs/pub/fhs-2.3.html



                  You can find a copy online by searching "linux fhs".






                  share|improve this answer















                  It's your choice; generally on a laptop to preserve precious space, you'll share your /home, /boot, swap partitions, however you can also have separate ones. Note only one partition will be loaded at boot.



                  Each Linux distro will be able to find any other Linux distros, so if you have separate /boot and so grub configs, both grubs would have both distros anyway, but there really is no need to have multiple /boot partitions (unless you want one to work off legacy and one to work off UEFI, but that would require some additional tweaks).



                  Typical layout for 2x distro;



                  /dev/sda1 = /boot = shared
                  /dev/sda2 = / = distro 1
                  /dev/sda3 = / = distro 2
                  /dev/sda4 = /home = shared
                  /dev/sda5 = swap = shared


                  If you want to go further, you would have 2x /usr and 2x /var (these should not be shared across different installs as they will have references to installed packages / files elsewhere).



                  Here is the file structure we use in Linux:



                  http://www.pathname.com/fhs/pub/fhs-2.3.html



                  You can find a copy online by searching "linux fhs".







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 11 mins ago









                  Jeff Schaller

                  41.5k1056132




                  41.5k1056132










                  answered Nov 26 '16 at 18:42









                  mikejoneseymikejonesey

                  1,400415




                  1,400415

























                      0














                      Legacy boot



                      Install the first linux distro , you need to create the root partition and a swap partition , install your system the Grub should be installed on the Master Boot Record assuming on sda.



                      You can create a separate /boot partition , home ,etc... for the 1st linux distro.



                      To Install the second linux distro , you can create only the root partition



                      It is possible to use the same swap partition.



                      You can create a separate /boot , home ... for the second linux distro



                      You can mount and use the same home , swap , /boot partition during the second linux install , but it is not recommended to use the same boot partition



                      Some linux distro will ask you for the path to re-install GRUB on the MBR ,you can reinstall it also you can skip it.



                      To skip the re-installation of GRUB by choosing the root partition of the second linux distro as path e,g: sda4 (not sda), After rebooting your system run grub-mkconfig -o /boot/grub/grub.cfg from the first linux distro to get a new entry.



                      UEFI



                      It is necessary to get an ESP partition to install the first linux distro , a root and a swap partiton and more .



                      When you install the second linux distro do not format the ESP just mount it to install the boot-loader.then Create the root partition.




                      How to share files between the 2 OS?




                      You don't have a problem of sharing between linux OS.






                      share|improve this answer




























                        0














                        Legacy boot



                        Install the first linux distro , you need to create the root partition and a swap partition , install your system the Grub should be installed on the Master Boot Record assuming on sda.



                        You can create a separate /boot partition , home ,etc... for the 1st linux distro.



                        To Install the second linux distro , you can create only the root partition



                        It is possible to use the same swap partition.



                        You can create a separate /boot , home ... for the second linux distro



                        You can mount and use the same home , swap , /boot partition during the second linux install , but it is not recommended to use the same boot partition



                        Some linux distro will ask you for the path to re-install GRUB on the MBR ,you can reinstall it also you can skip it.



                        To skip the re-installation of GRUB by choosing the root partition of the second linux distro as path e,g: sda4 (not sda), After rebooting your system run grub-mkconfig -o /boot/grub/grub.cfg from the first linux distro to get a new entry.



                        UEFI



                        It is necessary to get an ESP partition to install the first linux distro , a root and a swap partiton and more .



                        When you install the second linux distro do not format the ESP just mount it to install the boot-loader.then Create the root partition.




                        How to share files between the 2 OS?




                        You don't have a problem of sharing between linux OS.






                        share|improve this answer


























                          0












                          0








                          0







                          Legacy boot



                          Install the first linux distro , you need to create the root partition and a swap partition , install your system the Grub should be installed on the Master Boot Record assuming on sda.



                          You can create a separate /boot partition , home ,etc... for the 1st linux distro.



                          To Install the second linux distro , you can create only the root partition



                          It is possible to use the same swap partition.



                          You can create a separate /boot , home ... for the second linux distro



                          You can mount and use the same home , swap , /boot partition during the second linux install , but it is not recommended to use the same boot partition



                          Some linux distro will ask you for the path to re-install GRUB on the MBR ,you can reinstall it also you can skip it.



                          To skip the re-installation of GRUB by choosing the root partition of the second linux distro as path e,g: sda4 (not sda), After rebooting your system run grub-mkconfig -o /boot/grub/grub.cfg from the first linux distro to get a new entry.



                          UEFI



                          It is necessary to get an ESP partition to install the first linux distro , a root and a swap partiton and more .



                          When you install the second linux distro do not format the ESP just mount it to install the boot-loader.then Create the root partition.




                          How to share files between the 2 OS?




                          You don't have a problem of sharing between linux OS.






                          share|improve this answer













                          Legacy boot



                          Install the first linux distro , you need to create the root partition and a swap partition , install your system the Grub should be installed on the Master Boot Record assuming on sda.



                          You can create a separate /boot partition , home ,etc... for the 1st linux distro.



                          To Install the second linux distro , you can create only the root partition



                          It is possible to use the same swap partition.



                          You can create a separate /boot , home ... for the second linux distro



                          You can mount and use the same home , swap , /boot partition during the second linux install , but it is not recommended to use the same boot partition



                          Some linux distro will ask you for the path to re-install GRUB on the MBR ,you can reinstall it also you can skip it.



                          To skip the re-installation of GRUB by choosing the root partition of the second linux distro as path e,g: sda4 (not sda), After rebooting your system run grub-mkconfig -o /boot/grub/grub.cfg from the first linux distro to get a new entry.



                          UEFI



                          It is necessary to get an ESP partition to install the first linux distro , a root and a swap partiton and more .



                          When you install the second linux distro do not format the ESP just mount it to install the boot-loader.then Create the root partition.




                          How to share files between the 2 OS?




                          You don't have a problem of sharing between linux OS.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 26 '16 at 21:24









                          GAD3RGAD3R

                          26.7k1756110




                          26.7k1756110






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Unix & Linux Stack Exchange!


                              • 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%2funix.stackexchange.com%2fquestions%2f326230%2fhow-to-dual-boot-two-linux-distros%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

                              Histoire des bourses de valeurs

                              Why is there Russian traffic in my log files?

                              Rename multiple files to decrement number in file name?