PXE boot CentOS 7.2 diskless fails with “Failed to start Switch Root” The 2019 Stack Overflow Developer Survey Results Are InProblem setting up RHEL6 PXE serverPXE Boot FreeBSD ISO from a Linux PXE serverUnable to mount the file system from server to client while booting through networkCentOS 7 installer: blank screenCentOS 7 on Amazon ec2 hangs on rebootGetting “Too many slots” messages on CentOS 7 running as a domULinux diskless boot - NFS share not mounting during ramdisk bootPXE Boot Does Not Pass Kernel Boot Parameters to /proc/cmdline Centos 7.2Centos 7 ISCSI diskless boot with ibftInitramfs corrupted while PXE on Rocks node installation

What is the motivation for a law requiring 2 parties to consent for recording a conversation

Why doesn't shell automatically fix "useless use of cat"?

For what reasons would an animal species NOT cross a *horizontal* land bridge?

What to do when moving next to a bird sanctuary with a loosely-domesticated cat?

How can I add encounters in the Lost Mine of Phandelver campaign without giving PCs too much XP?

Why doesn't UInt have a toDouble()?

If a sorcerer casts the Banishment spell on a PC while in Avernus, does the PC return to their home plane?

Does HR tell a hiring manager about salary negotiations?

Dropping list elements from nested list after evaluation

How to obtain a position of last non-zero element

Are there any other methods to apply to solving simultaneous equations?

What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?

Is it possible for absolutely everyone to attain enlightenment?

Cooking pasta in a water boiler

Falsification in Math vs Science

Can withdrawing asylum be illegal?

Why was M87 targeted for the Event Horizon Telescope instead of Sagittarius A*?

Is it a good practice to use a static variable in a Test Class and use that in the actual class instead of Test.isRunningTest()?

Likelihood that a superbug or lethal virus could come from a landfill

Why “相同意思的词” is called “同义词” instead of "同意词"?

Mathematics of imaging the black hole

Can you cast a spell on someone in the Ethereal Plane, if you are on the Material Plane and have the True Seeing spell active?

Did any laptop computers have a built-in 5 1/4 inch floppy drive?

What do I do when my TA workload is more than expected?



PXE boot CentOS 7.2 diskless fails with “Failed to start Switch Root”



The 2019 Stack Overflow Developer Survey Results Are InProblem setting up RHEL6 PXE serverPXE Boot FreeBSD ISO from a Linux PXE serverUnable to mount the file system from server to client while booting through networkCentOS 7 installer: blank screenCentOS 7 on Amazon ec2 hangs on rebootGetting “Too many slots” messages on CentOS 7 running as a domULinux diskless boot - NFS share not mounting during ramdisk bootPXE Boot Does Not Pass Kernel Boot Parameters to /proc/cmdline Centos 7.2Centos 7 ISCSI diskless boot with ibftInitramfs corrupted while PXE on Rocks node installation



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am setting up a CentOS 7.2 server so clients can boot a diskless CentOS 7.2 image. I have done this with CentOS 6.6 and it works fine over multiple servers and clients over many years. Using the same configuration parameters.

/var/lib/tftpboot/pxelinux.cfg/default contains:



default menu.c32
prompt 0
timeout 100
TOTALTIMEOUT 300
ONTIMEOUT CentOS
MENU TITLE Linux 7.2 PXE Boot Menu
LABEL CentOS
MENU LABEL CentOS 7.2 x86_64 em1
KERNEL images/centos/x86_64/7.2/vmlinuz-3.10.0-327.el7.x86_64
APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=dhcp nfs=10.0.0.1:/diskless/centos/7.2/root rw quiet

When PXE booting the client it gets quite far, but stops at:

Starting Switch Root...
Failed to switch root: Specified switch root path /sysroot does not seem to be an OS tree. os-release file is missing.
initrd-switch-root.service: main process exited, code=exited, status=1/FAILURE


This drops me into the emergency shell, and if I look at /sysroot it is an empty directory!



I saved the diskless_initrd.img using



dracut -f diskless_initrd.img `uname -r`


and copying it to the specified location. I also tried "dracut -d nfs -d network" which some suggested.



I don't understand why this works with my CentOS 6.6 server but not here in 7.2.










share|improve this question














bumped to the homepage by Community 3 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.





















    0















    I am setting up a CentOS 7.2 server so clients can boot a diskless CentOS 7.2 image. I have done this with CentOS 6.6 and it works fine over multiple servers and clients over many years. Using the same configuration parameters.

    /var/lib/tftpboot/pxelinux.cfg/default contains:



    default menu.c32
    prompt 0
    timeout 100
    TOTALTIMEOUT 300
    ONTIMEOUT CentOS
    MENU TITLE Linux 7.2 PXE Boot Menu
    LABEL CentOS
    MENU LABEL CentOS 7.2 x86_64 em1
    KERNEL images/centos/x86_64/7.2/vmlinuz-3.10.0-327.el7.x86_64
    APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=dhcp nfs=10.0.0.1:/diskless/centos/7.2/root rw quiet

    When PXE booting the client it gets quite far, but stops at:

    Starting Switch Root...
    Failed to switch root: Specified switch root path /sysroot does not seem to be an OS tree. os-release file is missing.
    initrd-switch-root.service: main process exited, code=exited, status=1/FAILURE


    This drops me into the emergency shell, and if I look at /sysroot it is an empty directory!



    I saved the diskless_initrd.img using



    dracut -f diskless_initrd.img `uname -r`


    and copying it to the specified location. I also tried "dracut -d nfs -d network" which some suggested.



    I don't understand why this works with my CentOS 6.6 server but not here in 7.2.










    share|improve this question














    bumped to the homepage by Community 3 hours ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















      0












      0








      0








      I am setting up a CentOS 7.2 server so clients can boot a diskless CentOS 7.2 image. I have done this with CentOS 6.6 and it works fine over multiple servers and clients over many years. Using the same configuration parameters.

      /var/lib/tftpboot/pxelinux.cfg/default contains:



      default menu.c32
      prompt 0
      timeout 100
      TOTALTIMEOUT 300
      ONTIMEOUT CentOS
      MENU TITLE Linux 7.2 PXE Boot Menu
      LABEL CentOS
      MENU LABEL CentOS 7.2 x86_64 em1
      KERNEL images/centos/x86_64/7.2/vmlinuz-3.10.0-327.el7.x86_64
      APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=dhcp nfs=10.0.0.1:/diskless/centos/7.2/root rw quiet

      When PXE booting the client it gets quite far, but stops at:

      Starting Switch Root...
      Failed to switch root: Specified switch root path /sysroot does not seem to be an OS tree. os-release file is missing.
      initrd-switch-root.service: main process exited, code=exited, status=1/FAILURE


      This drops me into the emergency shell, and if I look at /sysroot it is an empty directory!



      I saved the diskless_initrd.img using



      dracut -f diskless_initrd.img `uname -r`


      and copying it to the specified location. I also tried "dracut -d nfs -d network" which some suggested.



      I don't understand why this works with my CentOS 6.6 server but not here in 7.2.










      share|improve this question














      I am setting up a CentOS 7.2 server so clients can boot a diskless CentOS 7.2 image. I have done this with CentOS 6.6 and it works fine over multiple servers and clients over many years. Using the same configuration parameters.

      /var/lib/tftpboot/pxelinux.cfg/default contains:



      default menu.c32
      prompt 0
      timeout 100
      TOTALTIMEOUT 300
      ONTIMEOUT CentOS
      MENU TITLE Linux 7.2 PXE Boot Menu
      LABEL CentOS
      MENU LABEL CentOS 7.2 x86_64 em1
      KERNEL images/centos/x86_64/7.2/vmlinuz-3.10.0-327.el7.x86_64
      APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=dhcp nfs=10.0.0.1:/diskless/centos/7.2/root rw quiet

      When PXE booting the client it gets quite far, but stops at:

      Starting Switch Root...
      Failed to switch root: Specified switch root path /sysroot does not seem to be an OS tree. os-release file is missing.
      initrd-switch-root.service: main process exited, code=exited, status=1/FAILURE


      This drops me into the emergency shell, and if I look at /sysroot it is an empty directory!



      I saved the diskless_initrd.img using



      dracut -f diskless_initrd.img `uname -r`


      and copying it to the specified location. I also tried "dracut -d nfs -d network" which some suggested.



      I don't understand why this works with my CentOS 6.6 server but not here in 7.2.







      centos7 pxe-boot dracut






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 8 '17 at 19:31









      John HupceyJohn Hupcey

      112




      112





      bumped to the homepage by Community 3 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 3 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















          2 Answers
          2






          active

          oldest

          votes


















          0














          You still working through this? I was having the same problem with RHEL/Centos 7.x. Never had this issue on 5.x or 6.x. I tried both legacy and UEFI mode with the same result.



          I found the problem in my process. Two things actually.



          1. I neglected to clean up /etc/sysconfig/network-scripts in my rsync'd filesystem. It still contained scripts from the source filesystem.


          2. We have multiple NICs on our diskless clients. We were missing certain boot parameters in the network boot configs, like so:



          APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=bond1:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root bond=bond1:eth4,eth5:mode=1 biosdevname=0 net.ifnames=0 rw quiet


          In your case you might not be using bonded network devices, but you may still need to specify the device name of the NIC that your diskless client obtains the filesystem on, like so...



          APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=eth3:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root biosdevname=0 net.ifnames=0 rw quiet





          share|improve this answer
































            0














            I returned to this issue after many months and I found out what I was missing - an active firewall. It appears the PXE/TFTP BOOT functions are able to transfer the vmlinuz and initrd images just fine without the firewall rules running, but when it came time to NFS transfer the root filesystem to the client, it could not.



            In Red Hat 7.3 I first copied the /etc/sysconfig/iptables file from my CentOS 6.6 server (from which the client could boot and mount the "diskless" filesystem) and then executed:




            systemctl enable firewalld



            systemctl start firewalld




            The client now successfully mounted the remote filesystem and came up to the Linux login prompt.



            Now to figure out which parts of that iptables file I really need in this instance.






            share|improve this answer























              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "2"
              ;
              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%2fserverfault.com%2fquestions%2f848899%2fpxe-boot-centos-7-2-diskless-fails-with-failed-to-start-switch-root%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














              You still working through this? I was having the same problem with RHEL/Centos 7.x. Never had this issue on 5.x or 6.x. I tried both legacy and UEFI mode with the same result.



              I found the problem in my process. Two things actually.



              1. I neglected to clean up /etc/sysconfig/network-scripts in my rsync'd filesystem. It still contained scripts from the source filesystem.


              2. We have multiple NICs on our diskless clients. We were missing certain boot parameters in the network boot configs, like so:



              APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=bond1:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root bond=bond1:eth4,eth5:mode=1 biosdevname=0 net.ifnames=0 rw quiet


              In your case you might not be using bonded network devices, but you may still need to specify the device name of the NIC that your diskless client obtains the filesystem on, like so...



              APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=eth3:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root biosdevname=0 net.ifnames=0 rw quiet





              share|improve this answer





























                0














                You still working through this? I was having the same problem with RHEL/Centos 7.x. Never had this issue on 5.x or 6.x. I tried both legacy and UEFI mode with the same result.



                I found the problem in my process. Two things actually.



                1. I neglected to clean up /etc/sysconfig/network-scripts in my rsync'd filesystem. It still contained scripts from the source filesystem.


                2. We have multiple NICs on our diskless clients. We were missing certain boot parameters in the network boot configs, like so:



                APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=bond1:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root bond=bond1:eth4,eth5:mode=1 biosdevname=0 net.ifnames=0 rw quiet


                In your case you might not be using bonded network devices, but you may still need to specify the device name of the NIC that your diskless client obtains the filesystem on, like so...



                APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=eth3:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root biosdevname=0 net.ifnames=0 rw quiet





                share|improve this answer



























                  0












                  0








                  0







                  You still working through this? I was having the same problem with RHEL/Centos 7.x. Never had this issue on 5.x or 6.x. I tried both legacy and UEFI mode with the same result.



                  I found the problem in my process. Two things actually.



                  1. I neglected to clean up /etc/sysconfig/network-scripts in my rsync'd filesystem. It still contained scripts from the source filesystem.


                  2. We have multiple NICs on our diskless clients. We were missing certain boot parameters in the network boot configs, like so:



                  APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=bond1:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root bond=bond1:eth4,eth5:mode=1 biosdevname=0 net.ifnames=0 rw quiet


                  In your case you might not be using bonded network devices, but you may still need to specify the device name of the NIC that your diskless client obtains the filesystem on, like so...



                  APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=eth3:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root biosdevname=0 net.ifnames=0 rw quiet





                  share|improve this answer















                  You still working through this? I was having the same problem with RHEL/Centos 7.x. Never had this issue on 5.x or 6.x. I tried both legacy and UEFI mode with the same result.



                  I found the problem in my process. Two things actually.



                  1. I neglected to clean up /etc/sysconfig/network-scripts in my rsync'd filesystem. It still contained scripts from the source filesystem.


                  2. We have multiple NICs on our diskless clients. We were missing certain boot parameters in the network boot configs, like so:



                  APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=bond1:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root bond=bond1:eth4,eth5:mode=1 biosdevname=0 net.ifnames=0 rw quiet


                  In your case you might not be using bonded network devices, but you may still need to specify the device name of the NIC that your diskless client obtains the filesystem on, like so...



                  APPEND initrd=images/centos/x86_64/7.2/diskless_initrd.img ip=eth3:dhcp root=nfs:10.0.0.1:/diskless/centos/7.2/root biosdevname=0 net.ifnames=0 rw quiet






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Sep 7 '17 at 7:42









                  Jenny D

                  24.1k116196




                  24.1k116196










                  answered Sep 6 '17 at 21:47









                  JaredJared

                  11




                  11























                      0














                      I returned to this issue after many months and I found out what I was missing - an active firewall. It appears the PXE/TFTP BOOT functions are able to transfer the vmlinuz and initrd images just fine without the firewall rules running, but when it came time to NFS transfer the root filesystem to the client, it could not.



                      In Red Hat 7.3 I first copied the /etc/sysconfig/iptables file from my CentOS 6.6 server (from which the client could boot and mount the "diskless" filesystem) and then executed:




                      systemctl enable firewalld



                      systemctl start firewalld




                      The client now successfully mounted the remote filesystem and came up to the Linux login prompt.



                      Now to figure out which parts of that iptables file I really need in this instance.






                      share|improve this answer



























                        0














                        I returned to this issue after many months and I found out what I was missing - an active firewall. It appears the PXE/TFTP BOOT functions are able to transfer the vmlinuz and initrd images just fine without the firewall rules running, but when it came time to NFS transfer the root filesystem to the client, it could not.



                        In Red Hat 7.3 I first copied the /etc/sysconfig/iptables file from my CentOS 6.6 server (from which the client could boot and mount the "diskless" filesystem) and then executed:




                        systemctl enable firewalld



                        systemctl start firewalld




                        The client now successfully mounted the remote filesystem and came up to the Linux login prompt.



                        Now to figure out which parts of that iptables file I really need in this instance.






                        share|improve this answer

























                          0












                          0








                          0







                          I returned to this issue after many months and I found out what I was missing - an active firewall. It appears the PXE/TFTP BOOT functions are able to transfer the vmlinuz and initrd images just fine without the firewall rules running, but when it came time to NFS transfer the root filesystem to the client, it could not.



                          In Red Hat 7.3 I first copied the /etc/sysconfig/iptables file from my CentOS 6.6 server (from which the client could boot and mount the "diskless" filesystem) and then executed:




                          systemctl enable firewalld



                          systemctl start firewalld




                          The client now successfully mounted the remote filesystem and came up to the Linux login prompt.



                          Now to figure out which parts of that iptables file I really need in this instance.






                          share|improve this answer













                          I returned to this issue after many months and I found out what I was missing - an active firewall. It appears the PXE/TFTP BOOT functions are able to transfer the vmlinuz and initrd images just fine without the firewall rules running, but when it came time to NFS transfer the root filesystem to the client, it could not.



                          In Red Hat 7.3 I first copied the /etc/sysconfig/iptables file from my CentOS 6.6 server (from which the client could boot and mount the "diskless" filesystem) and then executed:




                          systemctl enable firewalld



                          systemctl start firewalld




                          The client now successfully mounted the remote filesystem and came up to the Linux login prompt.



                          Now to figure out which parts of that iptables file I really need in this instance.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 5 '18 at 21:45









                          John HupceyJohn Hupcey

                          112




                          112



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Server Fault!


                              • 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%2fserverfault.com%2fquestions%2f848899%2fpxe-boot-centos-7-2-diskless-fails-with-failed-to-start-switch-root%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 to make RAID controller rescan devices The 2019 Stack Overflow Developer Survey Results Are InLSI MegaRAID SAS 9261-8i: Disk isn't recognized after replacementHow to monitor the hard disk status behind Dell PERC H710 Raid Controller with CentOS 6?LSI MegaRAID - Recreate missing RAID 1 arrayext. 2-bay USB-Drive with RAID: btrfs RAID vs built-in RAIDInvalid SAS topologyDoes enabling JBOD mode on LSI based controllers affect existing logical disks/arrays?Why is there a shift between the WWN reported from the controller and the Linux system?Optimal RAID 6+0 Setup for 40+ 4TB DisksAccidental SAS cable removal

                              Куамањотепек (Чилапа де Алварез) Садржај Становништво Види још Референце Спољашње везе Мени за навигацију17°19′47″N 99°1′51″W / 17.32972° СГШ; 99.03083° ЗГД / 17.32972; -99.0308317°19′47″N 99°1′51″W / 17.32972° СГШ; 99.03083° ЗГД / 17.32972; -99.030838877656„Instituto Nacional de Estadística y Geografía”„The GeoNames geographical database”Мексичка насељапроширитиуу

                              Can the Right Ascension and Argument of Perigee of a spacecraft's orbit keep varying by themselves with time? The 2019 Stack Overflow Developer Survey Results Are InHow is the altitude of a satellite defined, given that the Earth is not spherical?Why do satellites appear to move faster when overhead and slower closer to the horizon?For the mathematical relationship between J2 (km^5/s^2) and dimensionless J2 - which one is derived from the other?Why is Nodal precession affected by the rotational period of the planet?Why is it so difficult to predict the exact reentry location and time of a very low earth orbit object?Why are low earth orbit satellites not visible from the same place all the time?Perifocal coordinates and the orbit equationHow feasible is the Moonspike mission?What was the typical perigee after a shuttle de-orbit burn?I am having trouble calculating my classic orbital elements and am at a loss on where to lookAm I supposed to modify the gravitational constant with scale and why do fps & time scale changes cause my orbit to break?How Local time of a sun synchronous orbit is related to Right ascension of ascending node?What is wrong with my orbit sim equations? How can I fix them?How to obtain the initial positions and velocities of an inclined orbit?